Re: [PATCH v4 3/8] t3900: demonstrate git-rebase problem with multi encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 &&
                git config i18n.commitencoding ISO-2022-JP &&
                echo ISO-2022-JP >>F &&
                git commit -a -F "$TEST_DIRECTORY/t3900/ISO-2022-JP.txt" &&
                test_tick &&
                echo intermediate stuff >>G &&
                git add G &&
                git commit -a -m "intermediate commit" &&
                test_tick &&
                git config i18n.commitencoding UTF-8 &&
                echo UTF-8-fixup >>F &&
                git commit -a --fixup HEAD^ &&
                git rebase --autosquash -i HEAD^^^ &&
                git rev-list HEAD >actual &&
                test_line_count = 3 actual &&
                iconv -f ISO-2022-JP -t utf-8 "$TEST_DIRECTORY/t3900/ISO-2022-JP.txt" >expect &&
                git cat-file commit HEAD^ >raw &&
                (sed "1,/^$/d" raw | iconv -f UTF-8 -t utf-8) >actual &&
                test_cmp expect actual

I think it's easier to manual run the test step with this log.

-- 
Danh



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux