summaryrefslogtreecommitdiff
path: root/Documentation/git-gc.txt
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2019-04-07 19:52:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-08 08:01:09 (GMT)
commitdaecbf2261f595935c999a00a1f9bc433df80e2c (patch)
treeb7ab24622b02c352cc6fa618c7f16a0e97d73d76 /Documentation/git-gc.txt
parent73845048815bace98588df03ab76fa3e85fc0927 (diff)
downloadgit-daecbf2261f595935c999a00a1f9bc433df80e2c.zip
git-daecbf2261f595935c999a00a1f9bc433df80e2c.tar.gz
git-daecbf2261f595935c999a00a1f9bc433df80e2c.tar.bz2
gc docs: clarify that "gc" doesn't throw away referenced objects
Amend the "NOTES" section to fix up wording that's been with us since 3ffb58be0a ("doc/git-gc: add a note about what is collected", 2008-04-23). I can't remember when/where anymore (I think Freenode #Git), but at some point I was having a conversation with someone who was convinced that "gc" would prune things only referenced by e.g. refs/pull/*, and pointed to this section as proof. It turned out that they'd read the "branches and tags" wording here and thought just refs/{heads,tags}/* and refs/remotes/* etc. would be kept, which is what we enumerate explicitly. So let's say "other refs", even though just above we say "objects that are referenced anywhere in your repository". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-gc.txt')
-rw-r--r--Documentation/git-gc.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 5e80f30..9cdae58 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -119,8 +119,8 @@ 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, refs saved by 'git filter-branch' in
-refs/original/, or reflogs (which may reference commits in branches
-that were later amended or rewound).
+refs/original/, 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.