git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs: clarify that refs/notes/ do not keep the attached objects alive
@ 2021-02-11  0:00 Martin von Zweigbergk
  2021-02-11  0:35 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Martin von Zweigbergk @ 2021-02-11  0:00 UTC (permalink / raw)
  To: git; +Cc: Martin von Zweigbergk

`git help gc` contains this snippet:

  "[...] 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 the objects that notes were
attached to are kept, but that is not the case. Let's clarify the
documentation by moving out the part about git notes to a separate
sentence.
---
 Documentation/git-gc.txt | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 0c114ad1ca..52824269a8 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -117,12 +117,14 @@ NOTES
 'git gc' tries very hard not to delete objects that are referenced
 anywhere in your repository. In particular, it will keep not only
 objects referenced by your current set of branches and tags, but also
-objects referenced by the index, remote-tracking branches, notes saved
-by 'git notes' under refs/notes/, reflogs (which may reference commits
-in branches that were later amended or rewound), and anything else in
-the refs/* namespace.  If you are expecting some objects to be deleted
-and they aren't, check all of those locations and decide whether it
-makes sense in your case to remove those references.
+objects referenced by the index, remote-tracking branches, reflogs
+(which may reference commits in branches that were later amended or
+rewound), and anything else in the refs/* namespace. Notes saved by
+'git notes' under refs/notes/ will be kept, but the objects (typically
+commits) they are attached to will not be. If you are expecting some
+objects to be deleted and they aren't, check all of those locations
+and decide whether it makes sense in your case to remove those
+references.
 
 On the other hand, when 'git gc' runs concurrently with another process,
 there is a risk of it deleting an object that the other process is using
-- 
2.30.0.478.g8a0d178c01-goog


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-02-11  7:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11  0:00 [PATCH] docs: clarify that refs/notes/ do not keep the attached objects alive Martin von Zweigbergk
2021-02-11  0:35 ` Junio C Hamano
2021-02-11  7:14   ` Martin von Zweigbergk
2021-02-11  7:30     ` Junio C Hamano
2021-02-11  7:38       ` Martin von Zweigbergk
2021-02-11  7:18 ` [PATCH v2] " Martin von Zweigbergk
2021-02-11  7:34   ` Junio C Hamano
2021-02-11  7:36     ` Martin von Zweigbergk
2021-02-11  7:39 ` [PATCH v3] " Martin von Zweigbergk
2021-02-11  7:43   ` Junio C Hamano

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).