diff --git a/git-revert.sh b/git-revert.sh
index c74af99a5165a4e2671761fd0977211fc7b4f663..49f00321b28833c24ebb78ea2104f34091d43017 100755 (executable)
--- a/git-revert.sh
+++ b/git-revert.sh
shift
done
+set_reflog_action "$me"
+
test "$me,$replay" = "revert,t" && usage
case "$no_commit" in
git-rev-parse --verify "$commit^2" >/dev/null 2>&1 &&
die "Cannot run $me a multi-parent commit."
-encoding=$(git repo-config i18n.commitencoding || echo UTF-8)
+encoding=$(git config i18n.commitencoding || echo UTF-8)
# "commit" is an existing commit. We would want to apply
# the difference it introduces since its first parent "prev"
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