X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-verify-tag.c;h=729a1593e61d87ad4596f07e7faedac81de64e81;hb=b938f62a208d24f3d6bed260ceb809cd6b3924d7;hp=92eaa89a45eff2e76e531a914bdccca5fafe98b0;hpb=547905f8cd2a04b3e1117f00025b60f81aa60f47;p=git.git diff --git a/builtin-verify-tag.c b/builtin-verify-tag.c index 92eaa89a4..729a1593e 100644 --- a/builtin-verify-tag.c +++ b/builtin-verify-tag.c @@ -12,7 +12,7 @@ #include static const char builtin_verify_tag_usage[] = - "git-verify-tag [-v|--verbose] ..."; + "git verify-tag [-v|--verbose] ..."; #define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----" @@ -92,14 +92,15 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix) 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);