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

From: Junio C Hamano <[email-masked]>
Date: Thu, 24 Feb 2022 12:35:13 -0800

Tao Klerks <[email-masked]> writes:

>> 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.