Ping Yin <pkufranky@gmail.com> writes:Although I admit I do not care much about the "status color", I suspect this patch is not quite right. When prepare_log_message() returns "no committable changes" and we are not in merge, the calling cmd_commit() does another run_status() to show the status of the index and the work tree to the stdout, and at that point, we _do_ want to honor the configuration setting you are discarding with this assignment. --- builtin-commit.c | 5 ++++- wt-status.h | 1 + 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/builtin-commit.c b/builtin-commit.c index 4e2f4aa..058cd32 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -300,7 +300,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; @@ -383,7 +383,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 f58ebcb..225fb4d 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); - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Jesper Krogh | Re: Linux 2.6.26-rc4 |
| Borislav Petkov | 2.6.23-rc1: no setup signature found... |
| Dmitry Torokhov | 2.6.27-rc8+ - first impressions |
| Andi Kleen | Re: 2.6.27-rc1: critical thermal shutdown on thinkpad x60 |
git: | |
| Ken Pratt | pack operation is thrashing my server |
| Martin Langhoff | parsecvs repository moved... |
| Johan Herland | [PATCH 3/6] git-fsck: Do thorough verification of tag objects. |
| Nigel Magnay | crlf with git-svn driving me nuts... |
| Joaquin Herrero | ssh hangs from Ubunty Feisty 7.04 to OpenBSD |
| Marco Peereboom | Re: Real men don't attack straw men |
| Pieter Verberne | Remove escape characters from file |
| L. V. Lammert | Re: About Xen: maybe a reiterative question but .. |
| Krzysztof Oledzki | Error: an inet prefix is expected rather than "0/0". |
| Evgeniy Polyakov | [resend take 2 4/4] DST Makefile/Kconfig files. |
| Denys Fedoryshchenko | thousands of classes, e1000 TX unit hang |
| Bruce Allen | e1000 full-duplex TCP performance well below wire speed |
| USB statistics | 23 minutes ago | Linux kernel |
| Block Sub System query | 4 hours ago | Linux kernel |
| kernel module to intercept socket creation | 5 hours ago | Linux kernel |
| Image size changing during each build | 5 hours ago | Linux kernel |
| Soft lock bug | 10 hours ago | Linux kernel |
| sysctl - dynamic registration problem | 17 hours ago | Linux kernel |
| Question on swap as ramdisk partition | 19 hours ago | Linux kernel |
| serial driver xmit problem | 1 day ago | Linux kernel |
| Generic Netlink subsytem | 1 day ago | Linux kernel |
| 'Report spam filter error' page broken | 1 day ago | KernelTrap Suggestions and Feedback |
