Remove --branch-log from fast-import.
[gitweb.git] / git-revert.sh
index c74af99a5165a4e2671761fd0977211fc7b4f663..866d622d2344a4bd1fea579fd5d1d6aee6615eee 100755 (executable)
@@ -81,7 +81,7 @@ prev=$(git-rev-parse --verify "$commit^1" 2>/dev/null) ||
 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"
@@ -146,6 +146,12 @@ cherry-pick)
 
 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