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

Re: [PATCH 3/3] Write index when populating empty untracked cache

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 24, 2022, 20:35 UTC
Message-ID
<xmqq5yp4knpa.fsf@gitster.g>
In-Reply-To
<CAPMMpogerttWdjGBNxJaqHT4bd3_igDx4_Fxev2eNHqexZ=aLQ@mail.gmail.com>
Tao Klerks <tao@klerks.biz> writes:
Show 6 quoted lines
>> The logic sounds fairly straight-forward.
>
> I didn't understand here whether you were confirming that the change
> seems to make sense (yay!), or commenting that the extra comment block
> is redundant, stating something obvious, and should better be removed.
> Could you confirm please?
I meant the former when I wrote it.

But now you made me re-read the patch, I am becoming slightly sympathetic to the "do we even need to comment?" interpretation, too ;-)

The question is if the comment to these two statements is redundant.
	if (!dir->untracked->root) {
		/*
		 * If we've had to initialize the root, then what we had was an
		 * empty uninitialized untracked cache structure. We will be
		 * populating it now, so we should trigger an index write.
		 */
		FLEX_ALLOC_STR(dir->untracked->root, name, "");
		istate->cache_changed |= UNTRACKED_CHANGED;
	}
I can be pursuaded either way.
Previous: Tao KlerksNext: Tao Klerks via GitGitGadget
Message 8 of 19 in “Empty untracked cache performance issue”
  1. 0/3 Empty untracked cache performance issueTao Klerks via GitGitGadget, Jun 24, 2021
  2. 1/3 Add a second's delay to t7519 for untracked cacheTao Klerks via GitGitGadget, Jun 24, 2021
  3. Junio C HamanoJun 29, 2021
  4. 2/3 In t7519, populate untracked cache before testTao Klerks via GitGitGadget, Jun 24, 2021
  5. 3/3 Write index when populating empty untracked cacheTao Klerks via GitGitGadget, Jun 24, 2021
  6. Junio C HamanoJun 29, 2021
  7. Tao KlerksFeb 24, 2022
  8. Junio C HamanoFeb 24, 2022
  9. 0/3 Empty untracked cache performance issueTao Klerks via GitGitGadget, Feb 25, 2022
  10. 1/3 t7519: avoid file to index mtime race for untracked cacheTao Klerks via GitGitGadget, Feb 25, 2022
  11. Junio C HamanoFeb 25, 2022
  12. Tao KlerksFeb 27, 2022
  13. 2/3 t7519: populate untracked cache before testTao Klerks via GitGitGadget, Feb 25, 2022
  14. 3/3 untracked-cache: write index when populating empty untracked cacheTao Klerks via GitGitGadget, Feb 25, 2022
  15. Junio C HamanoFeb 25, 2022
  16. 0/3 Empty untracked cache performance issueTao Klerks via GitGitGadget, Feb 27, 2022
  17. 1/3 t7519: avoid file to index mtime race for untracked cacheTao Klerks via GitGitGadget, Feb 27, 2022
  18. 2/3 t7519: populate untracked cache before testTao Klerks via GitGitGadget, Feb 27, 2022
  19. 3/3 untracked-cache: write index when populating empty untracked cacheTao Klerks via GitGitGadget, Feb 27, 2022

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.