]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/commit.c
environment: store comment_line_char as a string
[thirdparty/git.git] / builtin / commit.c
index d496980421eefd0fef098375b3e47cc44eed4797..d8abbe48b17b9b63f47b59013ed61bcfcde4ddd4 100644 (file)
@@ -685,7 +685,7 @@ static void adjust_comment_line_char(const struct strbuf *sb)
        const char *p;
 
        if (!memchr(sb->buf, candidates[0], sb->len)) {
-               comment_line_char = candidates[0];
+               comment_line_str = xstrfmt("%c", candidates[0]);
                return;
        }
 
@@ -706,7 +706,7 @@ static void adjust_comment_line_char(const struct strbuf *sb)
        if (!*p)
                die(_("unable to select a comment character that is not used\n"
                      "in the current commit message"));
-       comment_line_char = *p;
+       comment_line_str = xstrfmt("%c", *p);
 }
 
 static void prepare_amend_commit(struct commit *commit, struct strbuf *sb,