Re: [PATCH 6/9] sha1-file: use an object_directory for the main object dir

2018-11-22 Thread Jeff King
On Mon, Nov 12, 2018 at 11:04:52AM -0800, Stefan Beller wrote: > > for (odb = the_repository->objects->odb; odb; odb = odb->next) { > > if (odb->local) > > return odb->path; > > } > > return NULL; /* yikes? */ > > > > ? That feels like it's making things more

Re: [PATCH 6/9] sha1-file: use an object_directory for the main object dir

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 8:09 AM Jeff King wrote: > > On Mon, Nov 12, 2018 at 10:48:36AM -0500, Derrick Stolee wrote: > > > > If the "the first one is the main store, the rest are alternates" bit is > > > too subtle, we could mark each "struct object_directory" with a bit for > > > "is_local". > >

Re: [PATCH 6/9] sha1-file: use an object_directory for the main object dir

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 7:48 AM Derrick Stolee wrote: > [... lots of quoted text...] Some email readers are very good at recognizing unchanged quoted text and collapse it, not so at https://public-inbox.org/git/421d3b43-3425-72c9-218e-facd86e28...@gmail.com/ which I use to read through this

Re: [PATCH 6/9] sha1-file: use an object_directory for the main object dir

2018-11-12 Thread Jeff King
On Mon, Nov 12, 2018 at 10:48:36AM -0500, Derrick Stolee wrote: > > If the "the first one is the main store, the rest are alternates" bit is > > too subtle, we could mark each "struct object_directory" with a bit for > > "is_local". > > This is probably a good thing to do proactively. We have

Re: [PATCH 6/9] sha1-file: use an object_directory for the main object dir

2018-11-12 Thread Derrick Stolee
On 11/12/2018 9:50 AM, Jeff King wrote: Our handling of alternate object directories is needlessly different from the main object directory. As a result, many places in the code basically look like this: do_something(r->objects->objdir); for (odb = r->objects->alt_odb_list; odb; odb =

[PATCH 6/9] sha1-file: use an object_directory for the main object dir

2018-11-12 Thread Jeff King
Our handling of alternate object directories is needlessly different from the main object directory. As a result, many places in the code basically look like this: do_something(r->objects->objdir); for (odb = r->objects->alt_odb_list; odb; odb = odb->next) do_something(odb->path);