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

Re: [PATCH v3] log --graph: customize the graph lines with config log.graphColors

From
Jeff King <peff@peff.net>
Date
Jan 9, 2017, 05:34 UTC
Message-ID
<20170109053446.2vg3y37ck5ahhyxg@sigill.intra.peff.net>
In-Reply-To
<20170108101333.26221-1-pclouds@gmail.com>
On Sun, Jan 08, 2017 at 05:13:33PM +0700, Nguyễn Thái Ngọc Duy wrote:
Show 10 quoted lines
> If you have a 256 colors terminal (or one with true color support), then
> the predefined 12 colors seem limited. On the other hand, you don't want
> to draw graph lines with every single color in this mode because the two
> colors could look extremely similar. This option allows you to hand pick
> the colors you want.
> 
> Even with standard terminal, if your background color is neither black
> or white, then the graph line may match your background and become
> hidden. You can exclude your background color (or simply the colors you
> hate) with this.
I like this approach much more than the 256-color option.
>  * I'm not going with the cumulative behavior because I think that's
>    just harder to manage colors, and we would need a way to remove
>    colors from the config too.

Yeah, figuring out the list semantics would be a pain. This makes it hard to exclude a single color, but I think it's more likely somebody would want to replace the whole set with something that works well against their background.

> +test_expect_success 'log --graph with merge with log.graphColors' '
> +	test_config log.graphColors " blue , cyan , red " &&

This funny syntax isn't required, right? It should work with the more natural:

    test_config log.graphColors "blue, cyan, red"
-Peff
Previous: Junio C HamanoNext: Duy Nguyen
Message 15 of 30 in “log: support 256 colors with --graph=256colors”
  1. log: support 256 colors with --graph=256colorsNguyễn Thái Ngọc Duy, Dec 20, 2016
  2. Jeff KingDec 20, 2016
  3. Duy NguyenDec 22, 2016
  4. Junio C HamanoDec 22, 2016
  5. Duy NguyenDec 25, 2016
  6. Junio C HamanoDec 20, 2016
  7. Duy NguyenDec 22, 2016
  8. log --graph: customize the graph lines with config log.graphColorsNguyễn Thái Ngọc Duy, Dec 24, 2016
  9. Junio C HamanoDec 25, 2016
  10. log --graph: customize the graph lines with config log.graphColorsNguyễn Thái Ngọc Duy, Jan 8, 2017
  11. Junio C HamanoJan 9, 2017
  12. Jeff KingJan 9, 2017
  13. Duy NguyenJan 9, 2017
  14. Junio C HamanoJan 9, 2017
  15. Jeff KingJan 9, 2017
  16. Duy NguyenJan 9, 2017
  17. log --graph: customize the graph lines with config log.graphColorsNguyễn Thái Ngọc Duy, Jan 9, 2017
  18. Junio C HamanoJan 9, 2017
  19. Duy NguyenJan 12, 2017
  20. 0/3 nd/log-graph-configurable-colorsNguyễn Thái Ngọc Duy, Jan 19, 2017
  21. 1/3 color.c: fix color_parse_mem() with value_len == 0Nguyễn Thái Ngọc Duy, Jan 19, 2017
  22. Jeff KingJan 19, 2017
  23. Jeff KingJan 28, 2017
  24. 2/3 color.c: trim leading spaces in color_parse_mem()Nguyễn Thái Ngọc Duy, Jan 19, 2017
  25. Jeff KingJan 19, 2017
  26. Junio C HamanoJan 19, 2017
  27. 3/3 log --graph: customize the graph lines with config log.graphColorsNguyễn Thái Ngọc Duy, Jan 19, 2017
  28. Jeff KingJan 19, 2017
  29. Junio C HamanoJan 19, 2017
  30. Junio C HamanoJan 19, 2017

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.