]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/tag.c
prefer comment_line_str to comment_line_char for printing
[thirdparty/git.git] / builtin / tag.c
index 19a7e06bf414ccf811c93f0ac941a142a7fabef2..721d07a589733ebe5dddcf886e017a021364ef39 100644 (file)
@@ -158,11 +158,11 @@ static int do_sign(struct strbuf *buffer)
 
 static const char tag_template[] =
        N_("\nWrite a message for tag:\n  %s\n"
-       "Lines starting with '%c' will be ignored.\n");
+       "Lines starting with '%s' will be ignored.\n");
 
 static const char tag_template_nocleanup[] =
        N_("\nWrite a message for tag:\n  %s\n"
-       "Lines starting with '%c' will be kept; you may remove them"
+       "Lines starting with '%s' will be kept; you may remove them"
        " yourself if you want to.\n");
 
 static int git_tag_config(const char *var, const char *value,
@@ -291,11 +291,11 @@ static void create_tag(const struct object_id *object, const char *object_ref,
                        struct strbuf buf = STRBUF_INIT;
                        strbuf_addch(&buf, '\n');
                        if (opt->cleanup_mode == CLEANUP_ALL)
-                               strbuf_commented_addf(&buf, comment_line_char,
-                                     _(tag_template), tag, comment_line_char);
+                               strbuf_commented_addf(&buf, comment_line_str,
+                                     _(tag_template), tag, comment_line_str);
                        else
-                               strbuf_commented_addf(&buf, comment_line_char,
-                                     _(tag_template_nocleanup), tag, comment_line_char);
+                               strbuf_commented_addf(&buf, comment_line_str,
+                                     _(tag_template_nocleanup), tag, comment_line_str);
                        write_or_die(fd, buf.buf, buf.len);
                        strbuf_release(&buf);
                }
@@ -310,7 +310,7 @@ static void create_tag(const struct object_id *object, const char *object_ref,
 
        if (opt->cleanup_mode != CLEANUP_NONE)
                strbuf_stripspace(buf,
-                 opt->cleanup_mode == CLEANUP_ALL ? comment_line_char : '\0');
+                 opt->cleanup_mode == CLEANUP_ALL ? comment_line_str : NULL);
 
        if (!opt->message_given && !buf->len)
                die(_("no tag message?"));