On Thu, Nov 07, 2019 at 01:48:54PM +0700, Danh Doan wrote: > On 2019-11-07 01:02:33 -0500, Jeff King wrote: > > On Thu, Nov 07, 2019 at 09:56:14AM +0700, Doan Tran Cong Danh wrote: > > > > > +test_commit_autosquash_multi_encoding () { > > > + flag=$1 > > > + old=$2 > > > + new=$3 > > > + msg=$4 > > > + test_expect_failure "commit --$flag into $old from $new" ' > > > + git checkout -b '$flag-$old-$new' C0 && > > > > These single quotes are funny; they close the test-snippet string, so > > these variables are outside of any quoting (and thus subject to > > whitespace splitting). > > Yes, those quotes are funny, and I'm also aware that > they will be subjected to whitespace spliting. > But those quotes were intentional, they're there in order to have > better log with: > > ./t3900-i18n-commit.sh -v > > With those funny quotes, we will see this (verbose) log: > > expecting success of 3900.38 'commit --fixup into ISO-2022-JP from UTF-8': > git checkout -b fixup-ISO-2022-JP-UTF-8 C0 && Yes, it's true you get the expanded version here, but... > git config i18n.commitencoding ISO-2022-JP && > echo ISO-2022-JP >>F && > git commit -a -F "$TEST_DIRECTORY/t3900/ISO-2022-JP.txt" && ...you still can't just run this manually because of other lines like this one. It's also weirdly unlike all of the other tests, which creates confusion for people reading the code. IMHO the tradeoff isn't worth it. -Peff