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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 30, 2023, 15:13 UTC
Message-ID
<xmqqtty22ry9.fsf@gitster.g>
In-Reply-To
<xmqq1ql64796.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> "Raghul Nanth A via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> From: Raghul Nanth A <nanth.raghul@gmail.com>
>>
>> Add usage and performance tests for describe
>
> I think this sentence can easily go.
>
>> Describe uses the index when it is run with --dirty flag, which uses the
>> run_diff_index commmand. The command is sparse-index aware and hence we
>> can just set the requires-full-index to false
>
> End the sentence with full-stop.  More importantly, it would be
> nicer to have something to substantiate the "this is sparse aware"
> claim here, something like "since commit X" or "as shown in the test
> tXXXX.YY".

With a bit of digging into the history, I think the topic that was merged at 8d2c3732 (Merge branch 'ld/sparse-diff-blame', 2021-12-21) made various modes of "git diff" to be sparse-index aware. t1092 has tests for "git diff --cached", which uses the same machinery.

    Subject: [PATCH] describe: make it sparse-index aware
    "git describe" needs to compare the index and the working tree
    when (and only when) it is run with the "--dirty" flag.  This is
    done by calling the run_diff_index() function, which has been
    already made aware of the sparse-index in the series that led to
    8d2c3732 (Merge branch 'ld/sparse-diff-blame', 2021-12-21).
    t1092 has tests for "git diff --cached", which uses this exact
    machinery.
    Mark "git describe" that the command does not require the index
    to be expanded fully beforehand.
or something like that.
> Updated tests do look good, and the code change is of course minimal
> and to the point, which is also good.
Thanks.
Previous: Junio C HamanoNext: Victoria Dye
Message 14 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.