Re: [PATCH] connected.c: reprepare packs for corner cases
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 13, 2020, 01:14 UTC
- Message-ID
- <xmqq36addpiv.fsf@gitster.c.googlers.com>
- In-Reply-To
- <7378a863-7e2a-455e-4635-e07938ef3381@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 5 quoted lines
> I wonder if we could do something more complicated in the long-term, > which was recommended to me by Jeff Hostetler: add the pack to the > packed_git list once we've indexed it. That way, we don't reprepare > and scan the packs one-by-one, but instead we insert to the list > a single pack that we already know about.
Yup, that was the first thing that came to my mind, i.e. the code that installs a new packfile on disk in our repository must be ours, so we should be able to tell that code to add the new packfile to the in-core list without having to scan.
We may still need to scan when that strategy "fails" to protect against racing with simultaneous repacking, though.