提交 d2761895 编写于 作者: O Olivier Marin 提交者: Junio C Hamano

builtin-verify-tag: fix -v option parsing

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: NOlivier Marin <dkr@freesurf.fr>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 7ddea13a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册