summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martinvonz@google.com>2021-02-11 07:39:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-11 07:43:55 (GMT)
commitfa9ab027bac58e4133b6fcea82c459934edb03b1 (patch)
tree34e8be454456c00a2fe538743e43231cd9e2a274 /Documentation
parent773e25afc41b1b6533fa9ae2cd825d0b4a697fad (diff)
downloadgit-fa9ab027bac58e4133b6fcea82c459934edb03b1.zip
git-fa9ab027bac58e4133b6fcea82c459934edb03b1.tar.gz
git-fa9ab027bac58e4133b6fcea82c459934edb03b1.tar.bz2
docs: clarify that refs/notes/ do not keep the attached objects alive
`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. Signed-off-by: Martin von Zweigbergk <martinvonz@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-gc.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 0c114ad..853967d 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. Note that a note
+(of the kind created by 'git notes') attached to an object does not
+contribute in keeping the object alive. 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