Re: [PATCH 3/9] t/helper: add 'find-pack' test-tool
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jun 21, 2023, 10:54 UTC
- Message-ID
- <ZJLW4TPDpxjkHS4h@nand.local>
- In-Reply-To
- <xmqq1qicuwrw.fsf@gitster.g>
On Thu, Jun 15, 2023 at 04:32:35PM -0700, Junio C Hamano wrote:
Show 14 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 was going to say the exact same thing. Even if we were checking many objects, can't we dump the output of show-index to a file, and then grep it repeatedly? Presumably these tests are working on repositories with tens of objects, so I doubt it matters much either way.
If we do end up taking this approach to use the test-helper instead, the implementation seems reasonable.
Thanks, Taylor