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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 28, 2023, 20:24 UTC
Message-ID
<xmqqo7oceiab.fsf@gitster.g>
In-Reply-To
<ff521177-b0ad-c567-c51a-a6c191584d7c@github.com>
Derrick Stolee <derrickstolee@github.com> writes:
Show 13 quoted lines
>>>  			setup_work_tree();
>>> +			prepare_repo_settings(the_repository);
>>> +			the_repository->settings.command_requires_full_index = 0;
>> 
>> Offhand, the only case I know that "describe" even _needs_ a working
>> tree or the index is when asked to do the "--dirty" thing.  To
>> figure out if the working tree files are modified, the code calls
>> into run_diff_index(), but has that codepath been made sparse-index
>> aware already?
>
> It seems that this is a case where we can rely on the existing
> changes around run_diff_index(), which is nice. We get a very
> easy win for a narrow case.

Hmph, so "diff-index" is already sparse-index aware? I looked for any old commit that flips .command_requires_full_index to false for the command and didn't find it, and if I recall correctly (I only checked when I wrote the comment you are responding to), cmd_diff_index() does not do that, either, so I assumed that nobody has converted run_diff_index() yet. And that was where my question came from.

Thanks.
Previous: Derrick StoleeNext: Derrick Stolee
Message 4 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.