Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

Re: [PATCH] When nothing to git-commit, honor the git-status color setting.

From: Brian Hetro <hidden>
Date: 2016-06-15 22:43:31

On Mon, Aug 27, 2007 at 04:25:50 -0400, Jeff King wrote:
On Sun, Aug 26, 2007 at 02:35:26PM -0400, Brian Hetro wrote:
quoted
Instead of disabling color all of the time during a git-commit, allow
the user's config preference in the situation where there is nothing
to commit.  In this situation, the status is printed to the terminal
and not sent to COMMIT_EDITMSG, so honoring the status color setting
is expected.
A minor nit on the implementation:
quoted
+	if test "$status_only" = "t" -o "$use_status_color" = "t"; then
+		color=
+	else
+		color=--nocolor
+	fi
This variable doesn't really say "use color"; it says "don't explicitly
turn off color". So perhaps there is a better name (respect_color or
similar)?
I was thinking more along the lines of "use color as if you had run
git-status" when I decided on $use_status_color.  Perhaps there is a
better name.

Brian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help