Re: [PATCH] builtin/pack-objects.c: introduce `pack.extraCruftTips`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 20, 2023, 19:52 UTC
- Message-ID
- <xmqq1qkez5yg.fsf@gitster.g>
- In-Reply-To
- <ZEGSvfEkE5PhokKv@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 11 quoted lines
>> 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.