summaryrefslogtreecommitdiff
path: root/t/t3900-i18n-commit.sh
diff options
context:
space:
mode:
authorDoan Tran Cong Danh <congdanhqx@gmail.com>2019-11-08 09:43:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-11-11 00:43:48 (GMT)
commitb375744274113889c85bee69445375ce51e96648 (patch)
tree8299570133bb261f76b119a98c24c68333b76e42 /t/t3900-i18n-commit.sh
parent019a9d836230c8851aa8b0d4dc2e0dea42662a90 (diff)
downloadgit-b375744274113889c85bee69445375ce51e96648.zip
git-b375744274113889c85bee69445375ce51e96648.tar.gz
git-b375744274113889c85bee69445375ce51e96648.tar.bz2
sequencer: reencode squashing commit's message
On fixup/squash-ing rebase, git will create new commit in i18n.commitencoding, reencode the commit message to that said encode. Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3900-i18n-commit.sh')
-rwxr-xr-xt/t3900-i18n-commit.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index a518281..d277a9f 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -224,7 +224,15 @@ test_commit_autosquash_multi_encoding () {
git commit -a --$flag HEAD^ &&
git rebase --autosquash -i HEAD^^^ &&
git rev-list HEAD >actual &&
- test_line_count = 3 actual
+ test_line_count = 3 actual &&
+ iconv -f $old -t UTF-8 "$TEST_DIRECTORY"/t3900/$msg >expect &&
+ if test $flag = squash; then
+ subject="$(head -1 expect)" &&
+ printf "\nsquash! %s\n" "$subject" >>expect
+ fi &&
+ git cat-file commit HEAD^ >raw &&
+ (sed "1,/^$/d" raw | iconv -f $new -t utf-8) >actual &&
+ test_cmp expect actual
'
}