Subject: Re: [PATCH] builtin/pack-objects.c: introduce `pack.extraCruftTips`

From: Junio C Hamano <[email-masked]>
Date: Thu, 20 Apr 2023 12:52:55 -0700

Taylor Blau <[email-masked]> writes:

>> But it makes me wonder if it would make the life of end-users simpler
>> if we reserve a special ref hierarchy, say "refs/crufts/*", than
>> having to write a program for doing something like this.
>
> Ideally, yes. But I think there are certain instances where there are
> far too many (disconnected) objects that creating a reference for each
> part of the unreachable object graph that we want to keep is infeasible.
>
> Another way to think about pack.extraCruftTips is that the program
> invocation is acting like the refs/crufts hierarchy would if it existed,
> but without actually having to write all of those references down.

I do not need another way, actually.

If it is infeasible to keep track of what we want to keep from
expiration because they are too numerous and disconnected, I have to
wonder how a programatic way to enumerate them is feasible,
especially the enumeration is for doing something useful.  

You can write a program that enumerates all the loose objects and
existing object names that appear in .idx files and such a program
will cover "everything is too disconnected" case, but that does not
count as a useful use case---disabling cruft expiration would
achieve the same thing.  Is there a less hand-wavy use case you have
in mind?

THanks.