Re: stgit: lost all my patches again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2007-11-28 11:58:14 -0500, Jon Smirl wrote:

> 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?

Well, the thing is, it's never unable to repair.

However, I could add another repair mode: reset the branch head to the
latest point in the reflog where it was consistent with StGit's
metadata.

repair would have two flags to select the original or this new repair
mode, and if the user doesn't give either flag, repair points out that
she has two choices, and what they mean:

  "If you want to undo the last 3 git commands

     pull : Fast forward
     commit (amend): fix
     reset --hard kha/experimental: updating HEAD

   call stg repair --undo. If you want StGit to adjust to the new
   situation, call stg repair --assimilate."

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

Not that much. It was the push following the repair that killed you.
The repair alone is totally benign; doing

  $ stg repair && git reset --hard foobar && stg repair

gives the same result as just

  $ git reset --hard foobar && stg repair

except for creating a few new patches that you can safely delete.

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux