From: Yann Dirson <dirson@bertin.fr>
To: git list <git@vger.kernel.org>
Subject: [BUG] "git commit" after "cherry-pick -n" conflict clobbers .git/COMMIT_EDITMSG
Date: Thu, 11 Oct 2012 11:33:52 +0200 [thread overview]
Message-ID: <20121011113352.006efa25@chalon.bertin.fr> (raw)
(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
next reply other threads:[~2012-10-11 9:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 9:33 Yann Dirson [this message]
2012-10-11 17:00 ` [BUG] "git commit" after "cherry-pick -n" conflict clobbers .git/COMMIT_EDITMSG Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2012-10-11 20:50 dirson
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=20121011113352.006efa25@chalon.bertin.fr \
--to=dirson@bertin.fr \
--cc=git@vger.kernel.org \
/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).