summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: acb4441)
raw | patch | inline | side by side (parent: acb4441)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 15 Jan 2007 06:41:22 +0000 (01:41 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 15 Jan 2007 07:17:32 +0000 (23:17 -0800) |
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>
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>
git-revert.sh | patch | blob | history |
diff --git a/git-revert.sh b/git-revert.sh
index c74af99a5165a4e2671761fd0977211fc7b4f663..bb8f1ca24aadf47734049b740be8f539e0e9325d 100755 (executable)
--- a/git-revert.sh
+++ b/git-revert.sh
esac >.msg
+eval GITHEAD_$head=HEAD
+eval GITHEAD_$next='`git show -s \
+ --pretty=oneline --encoding="$encoding" "$commit" |
+ sed -e "s/^[^ ]* //"`'
+export GITHEAD_$head GITHEAD_$next
+
# This three way merge is an interesting one. We are at
# $head, and would want to apply the change between $commit
# and $prev on top of us (when reverting), or the change between