aboutsummaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-14 12:04:25 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-14 12:04:25 -0800
commitf4b6c6b90fdce12d69e4ad80ff6082405ec8cfb8 (patch)
tree53977ce9f7f60973239db3de43060cf947aa5a43 /git-commit.sh
parent6de33478affbf252066cc5863add213ca5cdc13c (diff)
parentc34c6008bcf2c66e17a97acc89be1144a6216f3f (diff)
downloadgit-f4b6c6b90fdce12d69e4ad80ff6082405ec8cfb8.tar.gz
git-f4b6c6b90fdce12d69e4ad80ff6082405ec8cfb8.tar.xz
Merge branch 'jc/int'
* jc/int: More tests in t3901. Consistent message encoding while reusing log from an existing commit. t3901: test "format-patch | am" pipe with i18n Use log output encoding in --pretty=email headers.
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 9fdf234b5..e23918cd6 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -429,7 +429,9 @@ then
fi
elif test "$use_commit" != ""
then
- git-cat-file commit "$use_commit" | sed -e '1,/^$/d'
+ encoding=$(git repo-config i18n.commitencoding || echo UTF-8)
+ git show -s --pretty=raw --encoding="$encoding" "$use_commit" |
+ sed -e '1,/^$/d' -e 's/^ //'
elif test -f "$GIT_DIR/MERGE_MSG"
then
cat "$GIT_DIR/MERGE_MSG"
@@ -491,7 +493,8 @@ then
q
}
'
- set_author_env=`git-cat-file commit "$use_commit" |
+ encoding=$(git repo-config i18n.commitencoding || echo UTF-8)
+ set_author_env=`git show -s --pretty=raw --encoding="$encoding" "$use_commit" |
LANG=C LC_ALL=C sed -ne "$pick_author_script"`
eval "$set_author_env"
export GIT_AUTHOR_NAME