On Fri, Oct 28, 2022 at 10:26 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Taylor Blau <me@xxxxxxxxxxxx> writes: > > >> > This feature is, from an end-user's point of view, very similar to > >> > "git prune-packed", in that we prune data that is not necessary due > >> > to redundancy. Nobody runs "prune-packed" directly; most people are > >> > even unaware of it being run on their behalf when they run "git gc". > >> ... > > If we don't intend to have `git repack --filter` part of our backwards > > compatibility guarantee, then I would prefer to see the implementation > > just live in git-gc from start to finish. > > I am OK with that, too. We do not have to expose the option to > users of pack-objects at all. You might mean "to users of `git repack`", as `git pack-objects` already has a `--filter=<filter-spec>` option. > Just make "gc" the single entry point > and that should be quite clean. I am Ok with that if there is a simple way to not call `git pack-objects` twice in some cases (once through git repack and once through this new feature). I may be missing something, but unfortunately I don't see one. (Or maybe you mean that `--filter` in `git gc` should be an option that is incompatible with other `git gc` options and configuration parameters, so that when `git gc --filter=XXX` is called it only performs what `git repack --filter=XXX` performs in the implementation I sent, but then people might want to call `git gc` twice instead of once, if they also want other usual gc housekeeping tasks to be performed. I don't think that's the way `git gc` has been designed for now though.)