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

Re: [RFC/PATCH 2/2] status -s: obey color.status

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 27, 2009, 05:15 UTC
Message-ID
<7vws1cwnu0.fsf@alter.siamese.dyndns.org>
In-Reply-To
<26d0a2022638ad7b75268ca291b8d02a22f1f66c.1259248243.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> * Should I rename wt-status.c's color() into something more unique when
>   I export it?

Is it an option to instead move short_unmerged(), short_status() and friends to wt-status.c from builtin-commit.c? It's been quite a while since I worked on the code, so I don't recall why it needs such cross references at low level between two files.

> * Is there any policy regarding use of putchar/puts vs. printf?

J6t addressed it. You have mixture of putchar(' ') and printf(" ") which looks somewhat funny ;-)

> * The way it is done now I "color" a space, otherwise one would need to
>   break down the print statements even more. Since we always color the
>   foreground only it is no problem, is it?
Some people do configure to use "reverse".  For example, I have:
    [diff.color]
            old = red reverse
            whitespace = blue reverse
    [status.color]
            updated = green
            changed = red
            untracked = blue reverse

The output should be consistent between long and short format (I do not offhand recall what we do for the long format, though).

Previous: Michael J GruberNext: Michael J Gruber
Message 13 of 14 in “status -s: Use the same config as status”
  1. 0/2 status -s: Use the same config as statusMichael J Gruber, Nov 26, 2009
  2. 1/2 status -s: respect the status.relativePaths optionMichael J Gruber, Nov 26, 2009
  3. Junio C HamanoNov 27, 2009
  4. Jeff KingNov 27, 2009
  5. 2/2 status -s: obey color.statusMichael J Gruber, Nov 26, 2009
  6. Johannes SixtNov 26, 2009
  7. Michael J GruberNov 26, 2009
  8. Junio C HamanoNov 26, 2009
  9. Add a notice that only certain functions can print color escape codesJohannes Sixt, Nov 27, 2009
  10. Junio C HamanoNov 27, 2009
  11. Johannes SixtNov 27, 2009
  12. Michael J GruberNov 27, 2009
  13. Junio C HamanoNov 27, 2009
  14. Michael J GruberNov 27, 2009

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.