Subject: Re: gc and repack ignore .git/*HEAD when checking reachability

From: Junio C Hamano <[email-masked]>
Date: Fri, 08 Jul 2016 10:14:33 -0700

Josh Triplett <[email-masked]> 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.