git-verify-pack: show usage when no pack was specified
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
Rene Scharfe committed
Aug 10, 2006 at 17:02 UTC
6f05b57da8e82c471ea6765da67e813d496ed278
1 file changed
+6
verify-pack.c
+6
@@ -34,6 +34,7 @@ int main(int ac, char **av)
34
int errs = 0;
35
int verbose = 0;
36
int no_more_options = 0;
37
+ int nothing_done = 1;
38
39
while (1 < ac) {
40
char path[PATH_MAX];
@@ -50,8 +51,13 @@ int main(int ac, char **av)
51
strcpy(path, av[1]);
52
if (verify_one_pack(path, verbose))
53
errs++;
54
+ nothing_done = 0;
55
}
56
ac--; av++;
57
}
58
+
59
+ if (nothing_done)
60
+ usage(verify_pack_usage);
61
+
62
return !!errs;
63
}