@matheusbsbs / matheus-bagliano / commits / 6e2931a8ed
Fork 0

Use nice names in conflict markers during cherry-pick/revert.

Always call the current HEAD 'HEAD', and name the patch being cherry-picked or reverted by its oneline subject rather than its SHA1. This matches git am's behavior and is done because users most commonly are cherry-picking by SHA1 rather than by ref name. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn O. Pearce committed Jan 15, 2007 at 01:41 UTC 6e2931a8ed887bd75ed68085a7e04bc88574d69e
1 file changed +6
git-revert.sh
+6
@@ -146,6 +146,12 @@ cherry-pick)
146
147 esac >.msg
148
149 +eval GITHEAD_$head=HEAD
150 +eval GITHEAD_$next='`git show -s \
151 + --pretty=oneline --encoding="$encoding" "$commit" |
152 + sed -e "s/^[^ ]* //"`'
153 +export GITHEAD_$head GITHEAD_$next
154 +
155 # This three way merge is an interesting one. We are at
156 # $head, and would want to apply the change between $commit
157 # and $prev on top of us (when reverting), or the change between