diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-18 12:01:38 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-22 17:05:04 -0800 |
commit | bc5d248a9fba11cb78dd0a3a91938d881dec1245 (patch) | |
tree | b070dd817bc859d41114f5583456b68ef029a623 | |
parent | a50f9fc5feb0a8b8afe51e75ae7c7a87446113e3 (diff) | |
download | git-bc5d248a9fba11cb78dd0a3a91938d881dec1245.tar.gz |
builtin-commit: do not color status output shown in the message template
Noticed by Ping Yin on the list.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin-commit.c | 5 | ||||
-rw-r--r-- | wt-status.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 5e2257c961..7616dd152f 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -159,7 +159,7 @@ static const char sign_off_header[] = "Signed-off-by: "; static int prepare_log_message(const char *index_file, const char *prefix) { struct stat statbuf; - int commitable; + int commitable, saved_color_setting; struct strbuf sb; char *buffer; FILE *fp; @@ -243,7 +243,10 @@ static int prepare_log_message(const char *index_file, const char *prefix) if (only_include_assumed) fprintf(fp, "# %s\n", only_include_assumed); + saved_color_setting = wt_status_use_color; + wt_status_use_color = 0; commitable = run_status(fp, index_file, prefix); + wt_status_use_color = saved_color_setting; fclose(fp); diff --git a/wt-status.h b/wt-status.h index f58ebcbb23..225fb4d535 100644 --- a/wt-status.h +++ b/wt-status.h @@ -27,6 +27,7 @@ struct wt_status { }; int git_status_config(const char *var, const char *value); +int wt_status_use_color; void wt_status_prepare(struct wt_status *s); void wt_status_print(struct wt_status *s); |