git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Victoria Dye <vdye@github.com>
Date
Mar 30, 2023, 16:23 UTC
Message-ID
<4f2fda36-111d-5bac-2322-1ebb3e508e4d@github.com>
In-Reply-To
<pull.1480.v3.git.git.1680155957146.gitgitgadget@gmail.com>
Raghul Nanth A via GitGitGadget wrote:
Show 11 quoted lines
> 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.

Show 13 quoted lines
> +	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@github.com/ [2] https://lore.kernel.org/git/20220923041842.27817-2-shaoxuan.yuan02@gmail.com/ [3] https://lore.kernel.org/git/90ebcb7b8ff4b4f1ba09abcbe636d639fa597e74.1646166271.git.gitgitgadget@gmail.com/ [4] https://lore.kernel.org/git/8c2fdb5a4fc3317c05324da54692036e36fc15f3.1651005800.git.gitgitgadget@gmail.com/

Show 7 quoted lines
> +'
> +
>  test_expect_success 'sparse index is not expanded: diff' '
>  	init_repos &&
>  
> 
> base-commit: 27d43aaaf50ef0ae014b88bba294f93658016a2e
Previous: Junio C HamanoNext: Raghul Nanth A
Message 15 of 21 in “describe: enable sparse index for describe”
  1. describe: enable sparse index for describeRaghul Nanth A via GitGitGadget, Mar 27, 2023
  2. Junio C HamanoMar 27, 2023
  3. Derrick StoleeMar 28, 2023
  4. Junio C HamanoMar 28, 2023
  5. Derrick StoleeMar 28, 2023
  6. describe: enable sparse index for describeRaghul Nanth A via GitGitGadget, Mar 29, 2023
  7. Junio C HamanoMar 29, 2023
  8. Victoria DyeMar 29, 2023
  9. Junio C HamanoMar 29, 2023
  10. Raghul NanthMar 30, 2023
  11. Victoria DyeApr 3, 2023
  12. describe: enable sparse index for describeRaghul Nanth A via GitGitGadget, Mar 30, 2023
  13. Junio C HamanoMar 30, 2023
  14. Junio C HamanoMar 30, 2023
  15. Victoria DyeMar 30, 2023
  16. [GSOC][PATCH] describe: enable sparse index for describeRaghul Nanth A, Mar 31, 2023
  17. Junio C HamanoMar 31, 2023
  18. [GSOC][PATCH v4] describe: enable sparse index for describeRaghul Nanth A, Mar 31, 2023
  19. Victoria DyeApr 3, 2023
  20. [GSOC][PATCH v5] describe: enable sparse index for describeRaghul Nanth A, Apr 3, 2023
  21. describe: enable sparse index for describeRaghul Nanth A, Apr 3, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.