summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 889262e)
raw | patch | inline | side by side (parent: 889262e)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 25 Apr 2005 23:34:13 +0000 (16:34 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 25 Apr 2005 23:34:13 +0000 (16:34 -0700) |
This makes the default fsck behaviour be quiet for a repository
that doesn't have any problems. Which is good.
that doesn't have any problems. Which is good.
fsck-cache.c | patch | blob | history |
diff --git a/fsck-cache.c b/fsck-cache.c
index a83266ce2f3bd5b3ed8dae1e720825b9d9a4aadb..f9b1431dd8f4f3b426a7e410de952277aaa11401 100644 (file)
--- a/fsck-cache.c
+++ b/fsck-cache.c
#define REACHABLE 0x0001
+static int show_root = 0;
static int show_tags = 0;
static int show_unreachable = 0;
static unsigned char head_sha1[20];
return -1;
if (!commit->tree)
return -1;
- if (!commit->parents)
+ if (!commit->parents && show_root)
printf("root %s\n", sha1_to_hex(sha1));
if (!commit->date)
printf("bad commit date in %s\n", sha1_to_hex(sha1));
show_tags = 1;
continue;
}
+ if (!strcmp(arg, "--root")) {
+ show_root = 1;
+ continue;
+ }
if (*arg == '-')
usage("fsck-cache [--tags] [[--unreachable] <head-sha1>*]");
}