git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Martin von Zweigbergk <martinvonz@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: GC can lose objects pointed to only by notes?
Date: Wed, 10 Feb 2021 12:20:45 -0800	[thread overview]
Message-ID: <xmqq35y33c9u.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CANiSa6h=S6tHUR4hY85uZ7ZcnDc2mdUzPwyBDakQAa_NP+O0YA@mail.gmail.com> (Martin von Zweigbergk's message of "Wed, 10 Feb 2021 09:51:16 -1000")

Martin von Zweigbergk <martinvonz@gmail.com> 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.

      reply	other threads:[~2021-02-10 20:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 19:51 GC can lose objects pointed to only by notes? Martin von Zweigbergk
2021-02-10 20:20 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq35y33c9u.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=martinvonz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).