Skip to content

Commit

Permalink
sequencer: use configured comment character
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
aschrab authored and gitster committed Jul 16, 2018
1 parent ed84343 commit 02cfd14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sequencer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 02cfd14

Please sign in to comment.