Subject: Re: [PATCH v2 07/20] Use write_index_as_tree() in lieu of write_tree_from_memory()

From: Junio C Hamano <[email-masked]>
Date: Sun, 28 Jul 2019 21:46:37 -0700

Elijah Newren <[email-masked]> writes:

> I thought about that briefly yesterday, but the fact that the
> write_locked_index() call only happens if !cache_tree_fully_valid()
> meant refactoring slightly more to get the helper to also return that
> boolean value, and since I was a little unsure of myself with
> cache-tree stuff in general I wanted to propose what looked like the
> minimally invasive changes first (by which I mean smallest patch).

Or have the caller check if cache-tree is fully valid, which is the
only case that you can build a tree (and a fully merged index would
be fully valid after you do cache_tree_update()).

> I'll take a closer look at this path.
> ...
> So, yeah, I need to put something from those BUG() messages back in;
> they clearly helped with that issue, and might help again in the
> future.

Thanks.