Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-18 21:19:59 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-18 21:19:59 +0400
commite7bd907db6a707481066f2c8d58e208110824358 (patch)
tree62935f0d38aea2929b3abf3b6b7c28b226106f42 /fsck-cache.c
parent1024932f019905ff1a9e06e5acbee441919d4d05 (diff)
fsck-cache: read the default reference information even when
not doing reachability analysis. This avoids the dangling head problem, and means that just a plain "git-fsck-cache" with no parameters will DTRT.
Diffstat (limited to 'fsck-cache.c')
-rw-r--r--fsck-cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fsck-cache.c b/fsck-cache.c
index d2aff8c643..c4b1c1ae60 100644
--- a/fsck-cache.c
+++ b/fsck-cache.c
@@ -419,11 +419,11 @@ int main(int argc, char **argv)
}
/*
- * If we've been asked to do reachability without any explicit
- * head information, do the default ones from .git/refs. We also
- * consider the index file in this case (ie this implies --cache).
+ * If we've not been gived any explicit head information, do the
+ * default ones from .git/refs. We also consider the index file
+ * in this case (ie this implies --cache).
*/
- if (show_unreachable && !heads) {
+ if (!heads) {
get_default_heads();
keep_cache_objects = 1;
}