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

Re: [PATCH] builtin/config.c: don't print a newline with --color

From
Jeff King <peff@peff.net>
Date
Mar 7, 2019, 02:57 UTC
Message-ID
<20190307025703.GA25656@sigill.intra.peff.net>
In-Reply-To
<xmqqbm2no6by.fsf@gitster-ct.c.googlers.com>
On Thu, Mar 07, 2019 at 09:50:57AM +0900, Junio C Hamano wrote:
Show 10 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > Mostly I was just surprised by the new behavior. Perhaps the right
> > solution is not a patch to the code, but to the documentation. Something
> > like:
> 
> Let me forge your sign-off and commit this to prevent us from
> forgetting.
> 
> Thanks, all.
Thanks for tying this up. One minor nit:
Show 12 quoted lines
> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index 1bfe9f56a7..611a32445c 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -240,7 +240,9 @@ Valid `<type>`'s include:
>  	output.  The optional `default` parameter is used instead, if
>  	there is no color configured for `name`.
>  +
> -`--type=color [--default=<default>]` is preferred over `--get-color`.
> +`--type=color [--default=<default>]` is preferred over `--get-color`
> +(but note that `--get-color` will omit the trailing newline printed by
> +--type=color).
That final line probably should have literal quotes, like:
  `--type=color`).
-Peff
Previous: Junio C HamanoNext: Taylor Blau
Message 15 of 18 in “builtin/config.c: don't print a newline with --color”
  1. builtin/config.c: don't print a newline with --colorTaylor Blau, Mar 2, 2019
  2. Eric SunshineMar 2, 2019
  3. Johannes SchindelinMar 2, 2019
  4. Jeff KingMar 3, 2019
  5. Johannes SchindelinMar 5, 2019
  6. Taylor BlauMar 6, 2019
  7. Junio C HamanoMar 3, 2019
  8. Jeff KingMar 3, 2019
  9. Junio C HamanoMar 4, 2019
  10. Junio C HamanoMar 4, 2019
  11. Jeff KingMar 5, 2019
  12. Junio C HamanoMar 5, 2019
  13. Taylor BlauMar 6, 2019
  14. Junio C HamanoMar 7, 2019
  15. Jeff KingMar 7, 2019
  16. Documentation/config: note trailing newline with --type=colorTaylor Blau, Mar 6, 2019
  17. Jeff KingMar 7, 2019
  18. Junio C HamanoMar 7, 2019

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.