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

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

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Nov 26, 2009, 16:03 UTC
Message-ID
<4B0EA6DF.6070701@drmicha.warpmail.net>
In-Reply-To
<4B0EA06A.1050101@viscovery.net>
Johannes Sixt venit, vidit, dixit 26.11.2009 16:36:
Show 5 quoted lines
> Michael J Gruber schrieb:
>> * Is there any policy regarding use of putchar/puts vs. printf?
> 
> If the printed string contains color escapes that should be obeyed, you
> can use only fputs, printf, and fprintf. You should not use puts or putchar.

Oh, I don't use them with colors. I use only color_fprintf for that. I was wondering whether there's a preference of printf("%c", c) over putchar(c), for example.

>> * Even if I were to write tests for status -s: How do I test colors?
> 
> See t4034-diff-words.sh.
Thanks, I'll keep that in mind for the case that I do have to write test ;)
Michael
Previous: Johannes SixtNext: Junio C Hamano
Message 7 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.