Re: gc and repack ignore .git/*HEAD when checking reachability
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 8, 2016, 17:14 UTC
- Message-ID
- <xmqqa8hsm4qu.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160708064448.GA18043@x>
Josh Triplett <josh@joshtriplett.org> writes:
> That sounds reasonable. And if they *do* end up taking any time to > traverse, it's because they weren't reachable from other anchoring > points, so taking the extra time to traverse them seems fine.
The only thing that is hard is to clearly define _what_ are the new anchoring points.
It cannot be "anything directly under .git that has all-caps name that ends with _HEAD". The ones we write we know are going to be removed at some point in time (e.g. "git reset", "git bisect reset", "git merge --abort", etc.). We do not have any control on random ones that the users and third-party tools leave behind, holding onto irrelevant objects forever.