Re: [PATCH v2 07/20] Use write_index_as_tree() in lieu of write_tree_from_memory()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 29, 2019, 04:46 UTC
- Message-ID
- <xmqqr269la6q.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CABPp-BExLuH9mz6sgjTbKXg44zmT3PcRsy+A8s-9PAQuxDuXfw@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 6 quoted lines
> 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()).
Show 5 quoted lines
> 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.