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

2019-07-28 Thread Junio C Hamano
Elijah Newren 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 > cac

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

2019-07-26 Thread Elijah Newren
On Fri, Jul 26, 2019 at 1:11 PM Junio C Hamano wrote: > > Elijah Newren writes: > > > diff --git a/cache-tree.c b/cache-tree.c > > index 706ffcf188..99144b1704 100644 > > --- a/cache-tree.c > > +++ b/cache-tree.c > > @@ -613,14 +613,19 @@ int write_index_as_tree(struct object_id *oid, struct > >

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

2019-07-26 Thread Junio C Hamano
Elijah Newren writes: > diff --git a/cache-tree.c b/cache-tree.c > index 706ffcf188..99144b1704 100644 > --- a/cache-tree.c > +++ b/cache-tree.c > @@ -613,14 +613,19 @@ int write_index_as_tree(struct object_id *oid, struct > index_state *index_state, > int entries, was_valid; > struc

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

2019-07-26 Thread Elijah Newren
write_tree_from_memory() appeared to be a merge-recursive special that basically duplicated write_index_as_tree(). The two had a slightly different call structure but the big difference was just that write_index_as_tree() would always unconditionally read the index off of disk instead of working o