summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index ef5f0b24cb..ae62a25f52 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -694,50 +694,51 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
if (use_editor && include_status) {
char *ai_tmp, *ci_tmp;
if (in_merge)
- fprintf(s->fp,
- "#\n"
- "# It looks like you may be committing a MERGE.\n"
- "# If this is not correct, please remove the file\n"
- "# %s\n"
- "# and try again.\n"
- "#\n",
+ status_printf_ln(s, GIT_COLOR_NORMAL,
+ "\n"
+ "It looks like you may be committing a MERGE.\n"
+ "If this is not correct, please remove the file\n"
+ " %s\n"
+ "and try again.\n"
+ "",
git_path("MERGE_HEAD"));
- fprintf(s->fp,
- "\n"
- "# Please enter the commit message for your changes.");
+ fprintf(s->fp, "\n");
+ status_printf(s, GIT_COLOR_NORMAL,
+ "Please enter the commit message for your changes.");
if (cleanup_mode == CLEANUP_ALL)
- fprintf(s->fp,
+ status_printf_more(s, GIT_COLOR_NORMAL,
" Lines starting\n"
- "# with '#' will be ignored, and an empty"
+ "with '#' will be ignored, and an empty"
" message aborts the commit.\n");
else /* CLEANUP_SPACE, that is. */
- fprintf(s->fp,
+ status_printf_more(s, GIT_COLOR_NORMAL,
" Lines starting\n"
- "# with '#' will be kept; you may remove them"
+ "with '#' will be kept; you may remove them"
" yourself if you want to.\n"
- "# An empty message aborts the commit.\n");
+ "An empty message aborts the commit.\n");
if (only_include_assumed)
- fprintf(s->fp, "# %s\n", only_include_assumed);
+ status_printf_ln(s, GIT_COLOR_NORMAL,
+ "%s", only_include_assumed);
ai_tmp = cut_ident_timestamp_part(author_ident->buf);
ci_tmp = cut_ident_timestamp_part(committer_ident.buf);
if (strcmp(author_ident->buf, committer_ident.buf))
- fprintf(s->fp,
+ status_printf_ln(s, GIT_COLOR_NORMAL,
"%s"
- "# Author: %s\n",
- ident_shown++ ? "" : "#\n",
+ "Author: %s",
+ ident_shown++ ? "" : "\n",
author_ident->buf);
if (!user_ident_sufficiently_given())
- fprintf(s->fp,
+ status_printf_ln(s, GIT_COLOR_NORMAL,
"%s"
- "# Committer: %s\n",
- ident_shown++ ? "" : "#\n",
+ "Committer: %s",
+ ident_shown++ ? "" : "\n",
committer_ident.buf);
if (ident_shown)
- fprintf(s->fp, "#\n");
+ status_printf_ln(s, GIT_COLOR_NORMAL, "");
saved_color_setting = s->use_color;
s->use_color = 0;