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

Re: [PATCH] pager: config variable pager.color

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 30, 2006, 09:33 UTC
Message-ID
<Pine.LNX.4.63.0607301132320.29667@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<E1G6zPH-00062L-Je@moooo.ath.cx>
Hi,
On Sun, 30 Jul 2006, Matthias Lederhofer wrote:
Show 11 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > Why? The three users of cmd_log_walk() need to call setup_pager() 
> > explicitely, when cmd_log_walk() can do it for them?
> 
> The explanation is below the commit message:
> "setup_pager has to be called before git_diff_ui_config because the
> latter uses pager_use_color initialized by setup_pager."
> 
> > Oh, and I do not really understand why you would enable color _at all_ if 
> > you want to disable it when paging. Do you have many instances when you 
> > want a color diff which is short enough not to be paged?
Show 6 quoted lines
> When I use a pager that escapes the escape character or highlights the
> content itself the output of git diff without the pager should have
> colors but not with the pager.  For example using git diff with a
> pathspec is quite short most of the time.  For git diff I have to
> enable paging manually and run git diff | $PAGER usually but git log
> uses the pager automatically and should not use colors with it.

I understand now. Maybe you want to put such reasoning into the commit message next time?

Ciao, Dscho

Previous: Matthias LederhoferNext: Junio C Hamano
Message 4 of 8 in “pager: config variable pager.color”
  1. pager: config variable pager.colorMatthias Lederhofer, Jul 29, 2006
  2. Johannes SchindelinJul 29, 2006
  3. Matthias LederhoferJul 30, 2006
  4. Johannes SchindelinJul 30, 2006
  5. Junio C HamanoJul 31, 2006
  6. Juergen RuehleJul 31, 2006
  7. Junio C HamanoJul 31, 2006
  8. Matthias LederhoferJul 31, 2006

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.