Re: [PATCH 3/9] t/helper: add 'find-pack' test-tool
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jun 21, 2023, 10:40 UTC
- Message-ID
- <CAP8UFD0GSTHJcagxhkKXZ5Lx7QMzpn3ve2XvvHDt6N=caM1DrQ@mail.gmail.com>
- In-Reply-To
- <xmqq1qicuwrw.fsf@gitster.g>
On Fri, Jun 16, 2023 at 1:32 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> > Christian Couder <christian.couder@gmail.com> writes: > > > In a following commit, we will make it possible to separate objects in > > different packfiles depending on a filter. > > > > To make sure that the right objects are in the right packs, let's add a > > new test-tool that can display which packfile(s) a given object is in. > > This tool would be serviceable if we only are interested in checking > just a few objects, but if we were to check many objects, I have to > wonder if it would be more efficient to use show-index to dump the > list of objects per pack, which should be sorted by object name, so > it should be trivial to run "comm" with the list of objects you want > to check.
I agree that this new tool is for checking just a few objects.
Show 7 quoted lines
> Or if you only are checking about a dozen or so, taking one or more > arguments from the command line and looping over them may also be > OK. The output format of course may have to be changed, if we were > to go that route, though. > > It really depends on the granularity at which this test helper wants > to work at, I think.
Yeah, in the previous commit implementing --print-filtered, we check that all the objects that should be printed to stdout are indeed printed. So later when git repack --filter=... is implemented by using git pack-objects --print-filtered and piping the printed objects to a regular git pack-objects command, I don't think it's necessary to test a lot of objects, as hopefully both pack-objects command are supposed to work well at that point.