git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: stgit: lost all my patches again
Date: Wed, 28 Nov 2007 11:58:14 -0500	[thread overview]
Message-ID: <9e4733910711280858j5d03b3acleac0ece7b0a67f66@mail.gmail.com> (raw)
In-Reply-To: <20071128164113.GA20749@diana.vm.bytemark.co.uk>

On 11/28/07, Karl Hasselström <kha@treskal.com> wrote:
> On 2007-11-28 11:21:05 -0500, Jon Smirl wrote:
>
> > On 11/28/07, Karl Hasselström <kha@treskal.com> wrote:
> >
> > > On 2007-11-28 10:06:57 -0500, Jon Smirl wrote:
> > >
> > > > stg repair -- partial repair, some patches empty, half are pushed
> > >
> > > Modulo any bugs, this should have adjusted the appliedness of your
> > > patches to match the new HEAD (patches are applied iff they are
> > > reachable from HEAD) and made patches of any non-patch commits
> > > sitting between a patch and HEAD. Nothing else. In particular, it
> > > doesn't change your existing patches or change HEAD, so those
> > > empty patches were empty even before the repair. (Modulo any bugs,
> > > of course, but that kind of bug seems really unlikely.)
> >
> > I don't know exactly what is going one, but all of my patches are in
> > commits in front of the rebase. I believe when they were applied
> > again, git detected that the changes were already in the tree and
> > that why the patches are empty. Normally stg would have popped all
> > my patches before doing the rebase.
>
> Ah, yes, if you "stg push" after the repair, that's what you can
> expect to happen. And once you've done that, it gets a little messier
> to recover. (Basically, what you'd do is delete the messed-up patches,
> git-reset to where you were before the git-rebase, and then "stg
> uncommit".)
>
> > I have messed the branch up doing manual recover, but the conditions
> > are easy enough to recreate.
>
> So I guess "stg repair" is working as intended, and what needs
> changing is its documentation: point out in greater detail that you
> should
>

After someone runs the wrong command their first instinct will be to
run stg repair. Can stg repair be made smart enough to not attempt a
repair if it is unable to do so and print a message referring people
back to the manual on how to move the head back?

When I ran stg repair after the wrong git rebase command, I compounded
the problem further.


>   1. Figure out where you _want_ HEAD to be.
>
>   2. git-reset your way there.
>
>   3. Run stg repair if necessary. (And if you just reset back to where
>      StGit thinks you are, you don't need to. But it's safe to run
>      repair in that case too -- it'll just do nothing.)
>
> In that order.
>
> The only thing repair does is fix up StGit's metadata to match what
> HEAD is right now. If HEAD isn't what you want it to be, then you want
> to fix that first. In particular, to just go back to where you were
> the last time StGit heard from you, do
>
>   $ git reset --hard $(stg id $(stg top))
>
> We need a proper manual to explain this in. :-)
>
> --
> Karl Hasselström, kha@treskal.com
>       www.treskal.com/kalle
>


-- 
Jon Smirl
jonsmirl@gmail.com

  reply	other threads:[~2007-11-28 16:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 22:17 stgit: lost all my patches again Jon Smirl
2007-11-27 22:24 ` Jakub Narebski
2007-11-27 23:12 ` Jon Smirl
2007-11-28  9:34   ` Karl Hasselström
2007-11-28 10:17     ` StGit hooks Karl Hasselström
2007-11-28 11:44       ` Andreas Ericsson
2007-11-28 12:19         ` Karl Hasselström
2007-11-28 13:14           ` Andreas Ericsson
2007-11-28 13:26             ` Karl Hasselström
2007-11-28 14:11               ` Andreas Ericsson
2007-11-28 14:53                 ` Jon Smirl
2007-11-28 14:58                   ` Andreas Ericsson
2007-11-28 15:40                     ` Karl Hasselström
2007-11-28 17:06                       ` Andreas Ericsson
2007-11-28 17:21                         ` Karl Hasselström
2007-11-28 19:31                           ` Junio C Hamano
2007-11-28 15:06     ` stgit: lost all my patches again Jon Smirl
2007-11-28 16:04       ` Karl Hasselström
2007-11-28 16:21         ` Jon Smirl
2007-11-28 16:41           ` Karl Hasselström
2007-11-28 16:58             ` Jon Smirl [this message]
2007-11-28 17:19               ` Karl Hasselström
2007-11-30  6:35             ` [StGit PATCH] Make "stg repair" help text more helpful Karl Hasselström
2007-11-28  0:37 ` stgit: lost all my patches again Junio C Hamano
2007-11-28  2:59   ` Jon Smirl
2007-11-28  6:32     ` Karl Hasselström
  -- strict thread matches above, loose matches on Subject: below --
2007-10-04  5:29 Jon Smirl
2007-10-04  8:33 ` Karl Hasselström
2007-10-04 12:10   ` Jon Smirl
2007-10-04 13:06   ` Jon Smirl
2007-10-04 15:38     ` Karl Hasselström
2007-10-04 15:45   ` David Brown
2007-10-04 17:29     ` Karl Hasselström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e4733910711280858j5d03b3acleac0ece7b0a67f66@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).