Re: [PATCH 1/2] prepare_packed_git(): refactor garbage reporting in pack directory
- From
Doug Kelly <dougk.ff7@gmail.com>
- Date
- Nov 4, 2015, 19:56 UTC
- Message-ID
- <CAEtYS8Rp0Eb7uHB8kJ=muVWy6u+beB7kAAWZqPgTYqfuKx3P2A@mail.gmail.com>
- In-Reply-To
- <xmqqr3k5a76v.fsf@gitster.mtv.corp.google.com>
On Wed, Nov 4, 2015 at 1:35 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> Doug Kelly <dougk.ff7@gmail.com> writes: > >> I think the patches I sent (a bit prematurely) address the >> remaining comments... I did find there was a relevant test in >> t5304 already, so I added a new test in the same section (and >> cleaned up some of the garbage it wasn't removing before). I'm >> not sure if it's poor form to move tests around like this, but I >> figured it might be best to keep them logically grouped. > > OK, will queue as I didn't spot anything glaringly wrong ;-) > > I did wonder if we want to say anything about .bitmap files, though. > If there is one without matching .idx and .pack, shouldn't we report > just like we report .idx without .pack (or vice versa)? > > Thanks.
I think you're right -- this would be something worth following up on. At least, t5304 doesn't cover this case explicitly, but when I tried adding an empty bitmap with a bogus name, I did see a "no corresponding .idx or .pack" error, similar to the stale .keep file.
I'd trust your (and Jeff's) knowledge on this far more than my own, but would it be a bad idea to clean up .keep and .bitmap files if the .idx/.pack pair are missing? I think we may have had a discussion previously on how things along these lines might be racey -- but I don't know what order the .keep file is created in relation to the .idx/.pack.