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>maint
parent
83a2b841d6
commit
6f05b57da8
|
@ -34,6 +34,7 @@ int main(int ac, char **av)
|
||||||
int errs = 0;
|
int errs = 0;
|
||||||
int verbose = 0;
|
int verbose = 0;
|
||||||
int no_more_options = 0;
|
int no_more_options = 0;
|
||||||
|
int nothing_done = 1;
|
||||||
|
|
||||||
while (1 < ac) {
|
while (1 < ac) {
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
|
@ -50,8 +51,13 @@ int main(int ac, char **av)
|
||||||
strcpy(path, av[1]);
|
strcpy(path, av[1]);
|
||||||
if (verify_one_pack(path, verbose))
|
if (verify_one_pack(path, verbose))
|
||||||
errs++;
|
errs++;
|
||||||
|
nothing_done = 0;
|
||||||
}
|
}
|
||||||
ac--; av++;
|
ac--; av++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nothing_done)
|
||||||
|
usage(verify_pack_usage);
|
||||||
|
|
||||||
return !!errs;
|
return !!errs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue