Re: [PATCH v3] describe: enable sparse index for describe

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

 



Raghul Nanth A via GitGitGadget wrote:
> diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh
> index 801919009e1..8bc35c51426 100755
> --- a/t/t1092-sparse-checkout-compatibility.sh
> +++ b/t/t1092-sparse-checkout-compatibility.sh
> @@ -1514,6 +1514,24 @@ test_expect_success 'sparse-index is not expanded: stash' '
>  	ensure_not_expanded stash pop
>  '
>  
> +test_expect_success 'sparse-index is not expanded: describe' '
> +	init_repos &&
> +	# Add tag to be read by describe

Please add newlines before these comments to visually space out the test &
make it more readable.

> +	git -C sparse-index tag -a v1.0 -m "Version 1" &&
> +	ensure_not_expanded describe --dirty &&
> +	cp sparse-index-out sparse-index-dirty &&
> +	ensure_not_expanded describe &&
> +	cp sparse-index-out sparse-index-normal &&
> +	# Check describe has same output on clean tree
> +	test_cmp sparse-index-dirty sparse-index-normal &&
> +	echo "test" >>sparse-index/g &&
> +	ensure_not_expanded describe --dirty &&
> +	echo "v1.0-dirty" > actual &&
> +	# Check describe on dirty work tree
> +	test_cmp sparse-index-out actual &&
> +	ensure_not_expanded describe

Sorry if I was unclear in my last review [1], but I did not mean that you
should add cases to this test (and, to be honest, the comparison of
'sparse-index-dirty' and 'sparse-index-normal' doesn't add much here).
Please add separate tests (as in, full 'test_expect_success' blocks) for
checking that the functionality of 'git describe' is consistent across
'full-checkout', 'sparse-checkout', and 'sparse-index'. Past sparse index
integrations ('git grep' [2], 'git read-tree' [3], 'git show' [4], etc.) are
a good reference for the types of tests that should be added.

[1] https://lore.kernel.org/git/8cb2b7a2-78f2-9221-1234-62814557d2d3@xxxxxxxxxx/
[2] https://lore.kernel.org/git/20220923041842.27817-2-shaoxuan.yuan02@xxxxxxxxx/
[3] https://lore.kernel.org/git/90ebcb7b8ff4b4f1ba09abcbe636d639fa597e74.1646166271.git.gitgitgadget@xxxxxxxxx/
[4] https://lore.kernel.org/git/8c2fdb5a4fc3317c05324da54692036e36fc15f3.1651005800.git.gitgitgadget@xxxxxxxxx/

> +'
> +
>  test_expect_success 'sparse index is not expanded: diff' '
>  	init_repos &&
>  
> 
> base-commit: 27d43aaaf50ef0ae014b88bba294f93658016a2e




[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