diff options
author | Doan Tran Cong Danh <congdanhqx@gmail.com> | 2019-11-08 12:43:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-11-11 03:43:48 +0300 |
commit | b375744274113889c85bee69445375ce51e96648 (patch) | |
tree | 8299570133bb261f76b119a98c24c68333b76e42 /t/t3900-i18n-commit.sh | |
parent | 019a9d836230c8851aa8b0d4dc2e0dea42662a90 (diff) |
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-x | t/t3900-i18n-commit.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh index a518281b04..d277a9f4b7 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 ' } |