summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-04-04 10:46:14 -0400
committerLibravatar Junio C Hamano <junkio@cox.net>2007-04-05 15:00:03 -0700
commit566842f62bdf1f16c2e94fb431445d2e6c0f3f0b (patch)
tree3c70147e9fb6cc2e8b850f32a9ecd86b8d6e6126 /Documentation
parentclean up and optimize nth_packed_object_sha1() usage (diff)
downloadtgif-566842f62bdf1f16c2e94fb431445d2e6c0f3f0b.tar.xz
Fix lost-found to show commits only referenced by reflogs
Prior to 1.5.0 the git-lost-found utility was useful to locate commits that were not referenced by any ref. These were often amends, or resets, or tips of branches that had been deleted. Being able to locate a 'lost' commit and recover it by creating a new branch was a useful feature in those days. Unfortunately 1.5.0 added the reflogs to the reachability analysis performed by git-fsck, which means that most commits users would consider to be lost are still reachable through a reflog. So most (or all!) commits are reachable, and nothing gets output from git-lost-found. Now git-fsck can be told to ignore reflogs during its reachability analysis, making git-lost-found useful again to locate commits that are no longer referenced by a ref itself, but may still be referenced by a reflog. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-fsck.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt
index 058009d2fa..8c68cf0372 100644
--- a/Documentation/git-fsck.txt
+++ b/Documentation/git-fsck.txt
@@ -9,7 +9,7 @@ git-fsck - Verifies the connectivity and validity of the objects in the database
SYNOPSIS
--------
[verse]
-'git-fsck' [--tags] [--root] [--unreachable] [--cache]
+'git-fsck' [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]
[--full] [--strict] [<object>*]
DESCRIPTION
@@ -38,6 +38,12 @@ index file and all SHA1 references in .git/refs/* as heads.
Consider any object recorded in the index also as a head node for
an unreachability trace.
+--no-reflogs::
+ Do not consider commits that are referenced only by an
+ entry in a reflog to be reachable. This option is meant
+ only to search for commits that used to be in a ref, but
+ now aren't, but are still in that corresponding reflog.
+
--full::
Check not just objects in GIT_OBJECT_DIRECTORY
($GIT_DIR/objects), but also the ones found in alternate