]> granicus.if.org Git - git/commitdiff
sequencer: use configured comment character
authorAaron Schrab <aaron@schrab.com>
Mon, 16 Jul 2018 04:59:02 +0000 (00:59 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jul 2018 18:04:56 +0000 (11:04 -0700)
Use the configured comment character when generating comments about
branches in a todo list.  Failure to honor this configuration causes a
failure to parse the resulting todo list.

Setting core.commentChar to "auto" will not be honored here, and the
previously configured or default value will be used instead. But, since
the todo list will consist of only generated content, there should not
be any non-comment lines beginning with that character.

Signed-off-by: Aaron Schrab <aaron@schrab.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c

index 5354d4d51e62a31d5254334851bce1b5bb5558a9..c80de6ceac6beaa60349474a373364023f1e6461 100644 (file)
@@ -3994,7 +3994,7 @@ static int make_script_with_merges(struct pretty_print_context *pp,
                entry = oidmap_get(&state.commit2label, &commit->object.oid);
 
                if (entry)
-                       fprintf(out, "\n# Branch %s\n", entry->string);
+                       fprintf(out, "\n%c Branch %s\n", comment_line_char, entry->string);
                else
                        fprintf(out, "\n");