author | Junio C Hamano <gitster@pobox.com> | |
Wed, 14 Dec 2011 07:03:00 +0000 (23:03 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 14 Dec 2011 07:07:47 +0000 (23:07 -0800) |
* ks/tag-cleanup:
git-tag: introduce --cleanup option
Conflicts:
builtin/tag.c
git-tag: introduce --cleanup option
Conflicts:
builtin/tag.c
1 | 2 | |||
---|---|---|---|---|
builtin/tag.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/tag.c
index efb98726955837294190fcef365e45b0dd5f5396,0d68a95954e55cea1cf8de117d98ed3cd6970834..31f02e80f6b8fc22ed7ca7ae142c8d2f99084e8b
--- 1/builtin/tag.c
--- 2/builtin/tag.c
+++ b/builtin/tag.c
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);
}
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;