From: Junio C Hamano Date: Wed, 14 Dec 2011 07:03:00 +0000 (-0800) Subject: Merge branch 'ks/tag-cleanup' X-Git-Tag: v1.7.9-rc0~64 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b3f17ac3d6609c1ccede32ef783d4f2e92e7eba6;p=git.git Merge branch 'ks/tag-cleanup' * ks/tag-cleanup: git-tag: introduce --cleanup option Conflicts: builtin/tag.c --- b3f17ac3d6609c1ccede32ef783d4f2e92e7eba6 diff --cc builtin/tag.c index efb987269,0d68a9595..31f02e80f --- a/builtin/tag.c +++ b/builtin/tag.c @@@ -214,13 -268,32 +214,22 @@@ static const char tag_template[] N_("\n" "#\n" "# Write a tag message\n" + "# Lines starting with '#' will be ignored.\n" + "#\n"); + + static const char tag_template_nocleanup[] = + N_("\n" + "#\n" + "# Write a tag message\n" + "# Lines starting with '#' will be kept; you may remove them" + " yourself if you want to.\n" "#\n"); -static void set_signingkey(const char *value) -{ - if (strlcpy(signingkey, value, sizeof(signingkey)) >= sizeof(signingkey)) - die(_("signing key value too long (%.10s...)"), value); -} - static int git_tag_config(const char *var, const char *value, void *cb) { - if (!strcmp(var, "user.signingkey")) { - if (!value) - return config_error_nonbool(var); - set_signingkey(value); - return 0; - } - + int status = git_gpg_config(var, value, cb); + if (status) + return status; return git_default_config(var, value, cb); } @@@ -398,10 -491,10 +427,10 @@@ int cmd_tag(int argc, const char **argv argc = parse_options(argc, argv, prefix, options, git_tag_usage, 0); if (keyid) { - sign = 1; + opt.sign = 1; - set_signingkey(keyid); + set_signing_key(keyid); } - if (sign) + if (opt.sign) annotate = 1; if (argc == 0 && !(delete || verify)) list = 1;