[BUG] "git commit" after "cherry-pick -n" conflict clobbers .git/COMMIT_EDITMSG

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

 



(only tested with 1.7.10.x for now)

~/softs/linux$ echo foo > .git/COMMIT_EDITMSG
~/softs/linux$ git cherry-pick -n b55f3d92cd
error: could not apply b55f3d9... Linux 2.6.32.26
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
~/softs/linux$ cat .git/COMMIT_EDITMSG
foo

So far, so good.  But then "git commit" brings me the message from the
cherry-picked commit plus the list of conflicted files, and I can verify that
it is now the contents of .git/COMMIT_EDITMSG.

Surely the fact I passed "-n" should prevent cloberring the message, even in the
event of a conflict.  I suppose that would imply not creating .git/MERGE_MSG in that
case, but just removing it still causes .git/COMMIT_EDITMSG to be clobbered, this
time with nothing but the "git status"-derived comments.

-- 
Yann Dirson - Bertin Technologies
--
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]