3 # Copyright (c) 2009 Eric Wong
5 test_description
='git svn refuses to dcommit non-UTF8 messages'
7 TEST_FAILS_SANITIZE_LEAK
=true
10 # ISO-2022-JP can pass for valid UTF-8, so skipping that in this test
12 for H
in ISO8859-1 eucJP
14 test_expect_success
"$H setup" '
16 svn_cmd import -m "$H test" $H "$svnrepo"/$H &&
17 git svn clone "$svnrepo"/$H $H
21 for H
in ISO8859-1 eucJP
23 test_expect_success
"$H commit on git side" '
26 git config i18n.commitencoding $H &&
27 git checkout -b t refs/remotes/git-svn &&
30 git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
31 E=$(git cat-file commit HEAD | sed -ne "s/^encoding //p") &&
37 for H
in ISO8859-1 eucJP
39 test_expect_success
"$H dcommit to svn" '
42 git config --unset i18n.commitencoding &&
43 test_must_fail git svn dcommit