Re: [PATCH/RFC v2 05/16] t2104: Don't fail for index versions other than [23]

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

 



Thomas Gummerer <t.gummerer@xxxxxxxxx> writes:

> t2104 currently checks for the exact index version 2 or 3,
> depending if there is a skip-worktree flag or not. Other
> index versions do not use extended flags and thus cannot
> be tested for version changes.
>
> Make this test update the index to version 2 at the beginning
> of the test. Testing the skip-worktree flags for the default
> index format is still covered by t7011 and t7012.
>
> Signed-off-by: Thomas Gummerer <t.gummerer@xxxxxxxxx>
> ---
>  t/t2104-update-index-skip-worktree.sh |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/t/t2104-update-index-skip-worktree.sh b/t/t2104-update-index-skip-worktree.sh
> index 1d0879b..4ef7d99 100755
> --- a/t/t2104-update-index-skip-worktree.sh
> +++ b/t/t2104-update-index-skip-worktree.sh
> @@ -25,7 +25,8 @@ test_expect_success 'setup' '
>  	mkdir sub &&
>  	touch ./1 ./2 sub/1 sub/2 &&
>  	git add 1 2 sub/1 sub/2 &&
> -	git ls-files -t | test_cmp expect.full -
> +	git ls-files -t | test_cmp expect.full - &&
> +	git update-index --index-version=2
>  '

Makes sense, but wouldn't it make even more sense to do this at the
very beginning?  i.e.

        git update-index --index-version 2 &&
	mkdir sub &&
        touch 1 2 sub/1 sub/2 &&
        git add 1 2 sub/1 sub/2 &&
        git ls-files -t | test_cmp expect.full -

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]