Skip to content

Commit

Permalink
git-verify-pack: show usage when no pack was specified
Browse files Browse the repository at this point in the history
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Rene Scharfe authored and Junio C Hamano committed Aug 10, 2006
1 parent 83a2b84 commit 6f05b57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions verify-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;
}

0 comments on commit 6f05b57

Please sign in to comment.