Re: [PATCH v6 4/6] builtin/tag: add --format argument for tag -v
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 18, 2017, 00:19 UTC
- Message-ID
- <xmqqmvepb4oj.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170117233723.23897-5-santiago@nyu.edu>
santiago@nyu.edu writes:
Show 13 quoted lines
> @@ -428,9 +443,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
> if (filter.merge_commit)
> die(_("--merged and --no-merged option are only allowed with -l"));
> if (cmdmode == 'd')
> - return for_each_tag_name(argv, delete_tag);
> - if (cmdmode == 'v')
> - return for_each_tag_name(argv, verify_tag);
> + return for_each_tag_name(argv, delete_tag, NULL);
> + if (cmdmode == 'v') {
> + if (format)
> + verify_ref_format(format);
> + return for_each_tag_name(argv, verify_tag, format);
> + }This triggers:
builtin/tag.c: In function 'cmd_tag':
builtin/tag.c:451:3: error: passing argument 3 of
'for_each_tag_name' discards 'const' qualifier from pointer target type [-Werror]
return for_each_tag_name(argv, verify_tag, format);Either for-each-tag-name's new parameter needs to be typed correctly, or the type of the "format" variable needs to be updated.