git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Brian Hetro <whee@smaertness.net>
Date
Aug 27, 2007, 09:45 UTC
Message-ID
<20070827094543.GA8014@ruiner>
In-Reply-To
<20070827082550.GC17373@coredump.intra.peff.net>
On Mon, Aug 27, 2007 at 04:25:50 -0400, Jeff King wrote:
Show 7 quoted lines
> On Sun, Aug 26, 2007 at 02:35:26PM -0400, Brian Hetro wrote:
> 
> > 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.
Show 11 quoted lines
> A minor nit on the implementation:
> 
> > +	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
Previous: Jeff KingNext: Jeff King
Message 3 of 5 in “When nothing to git-commit, honor the git-status color setting.”
  1. When nothing to git-commit, honor the git-status color setting.Brian Hetro, Aug 26, 2007
  2. Jeff KingAug 27, 2007
  3. Brian HetroAug 27, 2007
  4. Jeff KingAug 27, 2007
  5. Brian HetroAug 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.