summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ddea13)
raw | patch | inline | side by side (parent: 7ddea13)
author | Olivier Marin <dkr@freesurf.fr> | |
Mon, 28 Jul 2008 10:48:44 +0000 (12:48 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 29 Jul 2008 06:02:11 +0000 (23:02 -0700) |
Since the C rewrite, "git verify-tag -v" just does nothing instead of
printing the usage message with an error. This patch fix the regression.
Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
printing the usage message with an error. This patch fix the regression.
Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-verify-tag.c | patch | blob | history |
diff --git a/builtin-verify-tag.c b/builtin-verify-tag.c
index 7d837f0f98bfdf558d4c8eaf5a9090fa3be35b6d..729a1593e61d87ad4596f07e7faedac81de64e81 100644 (file)
--- a/builtin-verify-tag.c
+++ b/builtin-verify-tag.c
git_config(git_default_config, NULL);
- if (argc == 1)
- usage(builtin_verify_tag_usage);
-
- if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose")) {
+ if (argc > 1 &&
+ (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose"))) {
verbose = 1;
i++;
}
+ if (argc <= i)
+ usage(builtin_verify_tag_usage);
+
/* sometimes the program was terminated because this signal
* was received in the process of writing the gpg input: */
signal(SIGPIPE, SIG_IGN);