server-1.2-branch accidentally merged with master

Ray Lehtiniemi rayl at mail.com
Mon Oct 9 21:40:26 PDT 2006


On Monday 09 October 2006 18:40, Alan Coopersmith wrote:
> In attempting to checkin a simple configure.ac script fix to the
> server-1.2-branch today, I appear to have accidentally merged
> master into the server-1.2-branch.   Is there any way to undo this?

fair warning, i'm not really a git guru, but something like this
might do the trick, assuming my footnotes [1] are correct...

  # save a ref to the bad branch tip
  $ git tag keepme server-1.2-branch

  # reset the branch back to where it should be
  $ git update-ref refs/heads/server-1.2-branch 
b8596aff00afa8b2641f46d14aca444ce712ccc0

  # see if things look sane
  $ gitk server-1.2-branch master

  # if so, get rid of the temporary ref to the branch tip
  $ git tag -d keepme

  # if not, restore the bad branch tip and ask a git grown-up :-)
  $ git update-ref refs/heads/server-1.2-branch keepme

this will drop the configure.ac patch from 1.2 branch, so you'll need to 
reapply it afterwards.

finally, anyone who has already pulled the bad 1.2 branch into
their local repo will get an error message when they next try to
pull, to the effect that things won't fast-forward nicely.  in
this situation, they must tell git that it's okay to discard the
(incorrect) history by editing their .git/remotes/origin and adding
a plus sign to the server-1.2-branch entry, like this:

  Pull: +refs/heads/server-1.2-branch:refs/heads/server-1.2-branch

then do the pull again. afterwards, they should remove the plus sign so that 
the normal history sanity checking is reactivated for this branch.


hope it helps

ray


---------------------------------------------------------------------

[1]

looking at the xserver repository, it seems that you want to undo
the merge created by commit 89987cadb1cd3ba9575895d95f21637b3c33d9e3?

it also appears that this unwanted merge took place last friday evening
around 9 pm, rather than as part of today's configure.ac checkin and
cherrypick around 6:30 pm....
 
it seems like before this merge happened, the master branch was
likely pointing to 4c342246300e06bdf5c9c62cc1d2f6aa57a524db "Merge
branch 'XACE-modular'", which you merged friday evening around 7 pm,
correct?

and it looks like server-1.2-branch was probably pointing to
b8596aff00afa8b2641f46d14aca444ce712ccc0, "Allow the xfree86 ddx utils
to be optionally built. Patch by Eugene Konev.", which you cherry-picked
from master on friday evening around 8:30 pm, correct?






More information about the xorg mailing list