Re: GC can lose objects pointed to only by notes?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 10, 2021, 20:20 UTC
- Message-ID
- <xmqq35y33c9u.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CANiSa6h=S6tHUR4hY85uZ7ZcnDc2mdUzPwyBDakQAa_NP+O0YA@mail.gmail.com>
Martin von Zweigbergk <martinvonz@gmail.com> writes:
Show 6 quoted lines
> 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.