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

Re: [RFC][PATCH V1] diff-tree: integrate with sparse index

From
Junio C Hamano <gitster@pobox.com>
Date
May 16, 2023, 23:14 UTC
Message-ID
<xmqqsfbvswci.fsf@gitster.g>
In-Reply-To
<fa24482c-7c48-9b7f-5d97-3dbf9822728c@github.com>
Victoria Dye <vdye@github.com> writes:
> Longer version: 

Thanks, as usual, for a great review. A lot of the stuff you wrote should inspire and result in an improved log message that explains why this change is sufficient to teach diff-tree to take advantage of the sparse index.

Show 5 quoted lines
> However, 'DIFF_SETUP_USE_SIZE_CACHE' seems to be unused as of 6e0b8ed6d35
> (diff.c: do not use a separate "size cache"., 2007-05-07) and nothing about
> 'detect_rename' otherwise indicates index usage, so AFAICT that whole
> condition can be dropped (along with DIFF_SETUP_USE_SIZE_CACHE,
> DIFF_SETUP_REVERSE, and diff_options.setup).

True. The size cache does not exist anymore. 6b5ee137 (Diff clean-up., 2005-09-21) restructured the command line option parsing quite a bit, and we lost DIFF_SETUP_REVERSE, which is a bit that gets OR'ed in to a file-scope diff_setup_opt static of each of the command in the diff family. The bit and the diff_setup_opt variable got replaced with members of "struct diff_options", and I should have removed the macro at the same time.

> Note that, if you want to make
> that change in this series, it should be done in a separate patch _before_
> this one (since dropping the deprecated setup infrastructure isn't really
> part of the sparse index integration).

Or after this one, perhaps? I agree that the clean-up opportunity you found is very much unrelated to the work to teach diff-tree to take advantage of the sparse index.

THanks.
Previous: Victoria DyeNext: Victoria Dye
Message 3 of 7 in “diff-tree: integrate with sparse index”
  1. Shuqi LiangMay 15, 2023
  2. Victoria DyeMay 16, 2023
  3. Junio C HamanoMay 16, 2023
  4. Victoria DyeMay 17, 2023
  5. diff-tree: integrate with sparse indexShuqi Liang, May 18, 2023
  6. Victoria DyeMay 22, 2023
  7. Junio C HamanoMay 23, 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.