1. Stefan Saasen
  2. git

Commits

Rene Scharfe  committed 6f05b57

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>

  • Participants
  • Parent commits 83a2b84
  • Branches master

Comments (0)

Files changed (1)

File verify-pack.c

View file
  • Ignore whitespace
 	int errs = 0;
 	int verbose = 0;
 	int no_more_options = 0;
+	int nothing_done = 1;
 
 	while (1 < ac) {
 		char path[PATH_MAX];
 			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;
 }