From: Rene Scharfe Date: Thu, 10 Aug 2006 15:02:31 +0000 (+0200) Subject: git-verify-pack: show usage when no pack was specified X-Git-Tag: v1.4.2~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6f05b57da8e82c471ea6765da67e813d496ed278;p=git.git git-verify-pack: show usage when no pack was specified Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- diff --git a/verify-pack.c b/verify-pack.c index ef00204ad..7201596bf 100644 --- a/verify-pack.c +++ b/verify-pack.c @@ -34,6 +34,7 @@ int main(int ac, char **av) int errs = 0; int verbose = 0; int no_more_options = 0; + int nothing_done = 1; while (1 < ac) { char path[PATH_MAX]; @@ -50,8 +51,13 @@ int main(int ac, char **av) strcpy(path, av[1]); if (verify_one_pack(path, verbose)) errs++; + nothing_done = 0; } ac--; av++; } + + if (nothing_done) + usage(verify_pack_usage); + return !!errs; }