Re: [PATCH v2 0/4] [RFC] repack: add --filter=
- From
Robert Coup <robert.coup@koordinates.com>
- Date
- Feb 23, 2022, 15:40 UTC
- Message-ID
- <CAFLLRpKLSxLV82SCr8x=BBRBybxj1XOxb=Srs5_X2idvvb1YEg@mail.gmail.com>
- In-Reply-To
- <CAP8UFD3U4t-inWC5mZYhybWpjVwkqA7v4hYZ5voBOEJ=+_Y1kQ@mail.gmail.com>
Hi Christian,
On Tue, 22 Feb 2022 at 17:11, Christian Couder <christian.couder@gmail.com> wrote:
> > In some cases we just know the objects we are removing are stored by a > promisor remote or are replicated on different physical machines or > both, so you should be fine with this.
From my point of view I think the goal here is great.
Show 5 quoted lines
> > Another option would be to prune the repository according to objects > > that are already made available by a promisor remote. > > If the objects have just been properly transferred to the promisor > remote, the check will just waste resources.
As far as I can see this patch doesn't know or check that any of the filtered-out objects are held anywhere else... it simply applies a filter during repacking and the excluded objects are dropped. That's the aspect I have concerns about.
Maybe an approach where you build/get/maintain a list of objects-I-definitely-have-elsewhere and pass it as an exclude list to repack would be a cleaner/safer/easier solution? If you're confident enough you don't need to check with the promisor remote then you can use a local list, or even something generated with `rev-list --filter=`.
Thanks,
Rob :)