From: Junio C Hamano Date: Wed, 10 Feb 2021 20:20:45 GMT Subject: Re: GC can lose objects pointed to only by notes? Message-ID: In-Reply-To: Martin von Zweigbergk writes: > From the "NOTES" section in `git help gc`: > "[...] it will keep [..] objects referenced by the index, > remote-tracking branches, notes saved by git notes under refs/notes/" > > I had interpreted that as saying that it will keep objects pointed to > by notes saved under refs/notes. The documentation needs updating. There is no reachability from the notes that point at an otherwise uninteresting objects that are not pointed at by real refs, so a note that talks about a commit that is pruned will become stale. It is the reason why we need the "git notes prune" subcommand. Thanks.