Skip to contentSkip to conversation

git-cherry-pick -x works with conflicting commits

PATCH In review Rafael Garcia-Suarez 2 participants 4 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-cherry-pick -x works with conflicting commits

So this patch fixes the docs to reflect that.

---
 Documentation/git-cherry-pick.txt |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Documentation/git-cherry-pick.txt +1 -2
index f0beb41..475e168 100644
@@ -29,8 +29,7 @@ OPTIONS
 -x::
 	When recording the commit, append to the original commit
 	message a note that indicates which commit this change
-	was cherry-picked from.  Append the note only for cherry
-	picks without conflicts.  Do not use this option if
+	was cherry-picked from.  Do not use this option if
 	you are cherry-picking from your private branch because
 	the information is useless to the recipient.  If on the
 	other hand you are cherry-picking between two publicly
Signature · 1 line
1.5.5.rc1
#1 lore raw

When I'm using "git commit -c <id>" as suggested by git-cherry-pick upon conflict, I do not get the mention "(cherry picked from commit <id>)", at least with version 1.5.4.1. How did you get it?

Cheers,

Signature · 2 lines
Jean-Baptiste Quenot
http://caraldi.com/jbq/blog/
#2 lore raw
Quoted 3 lines · Jean-Baptiste Quenot

When I'm using "git commit -c <id>" as suggested by git-cherry-pick
upon conflict, I do not get the mention "(cherry picked from commit <id>)", at least with version 1.5.4.1. How did you get it?

I use the most recent git from master, and simply do git-add and git-commit without arguments after having resolving the conflict. The commit message in MERGE_MSG, that I checked, does have the "cherry picked from commit <id>" mention (before the conflict list).

#3 lore raw

All right, I see. The conflict error message was confusing me:

------------------------------------------------------------------------
fatal: Entry 'azerty' would be overwritten by merge. Cannot merge. Automatic cherry-pick failed. After resolving the conflicts, mark the corrected paths with 'git add <paths>' or 'git rm <paths>' and commit the result.
When commiting, use the option '-c c17532f' to retain authorship and message.
------------------------------------------------------------------------

The last sentence does not make much sense when -x is specified.

Cheers,

Signature · 2 lines
Jean-Baptiste Quenot
http://caraldi.com/jbq/blog/