Code

Quiet make: do not leave Windows behind
[git.git] / builtin-verify-tag.c
index 7d837f0f98bfdf558d4c8eaf5a9090fa3be35b6d..7f7fda42f9b7ab272ff2b3fa4ad1984a79f11ce0 100644 (file)
@@ -55,7 +55,7 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose)
        close(gpg.in);
        ret = finish_command(&gpg);
 
-       unlink(path);
+       unlink_or_warn(path);
 
        return ret;
 }
@@ -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);