git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG?] git checkout -b removes MERGE_HEAD
@ 2010-11-18  7:15 Jan Hudec
  2010-11-18 18:39 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Hudec @ 2010-11-18  7:15 UTC (permalink / raw)
  To: git

Hello all,

I am not sure whether it is a bug or not, but it definitely did
surprise me a lot. The use-case was as follows:

 - I checked out master and ran a merge from branch (let's call
   it "branch"). It had a lot of conflicts, so I needed to test
   the result well.
 - During the testing I found a problem, but it may have already
   existed on master before the merge.
 - Therefore I needed to return to clean master, test it and return
   to the merge. So I thought I'd commit the merge to a temporary
   branch, test master again and merge the temporary to master if
   the problem is not from the merge. So I did:

   $ git checkout -b temp
   $ git commit

   OOPS! It forgot it was a merge.

Yes, I could have simply commited to master and reset --hard it
back. But I didn't expect it to forget it was a merge in the first
place. After all, it does NOT touch the index nor the working tree,
so why should it clear the MERGE_HEAD and MERGE_MSG?

So should this behaviour be changed?

Thanks,
Jan

-- 
                                        - Jan Hudec <bulb@ucw.cz>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-18 19:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18  7:15 [BUG?] git checkout -b removes MERGE_HEAD Jan Hudec
2010-11-18 18:39 ` Junio C Hamano
2010-11-18 19:01   ` Jan Hudec
2010-11-18 19:26   ` Jeff King

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).