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

Re: [StGit] How do I get colored diff output?

From
CMCatalin Marinas <catalin.marinas@arm.com>
Date
Aug 31, 2007, 15:14 UTC
Message-ID
<tnxveavviqe.fsf@arm.com>
In-Reply-To
<fb6sst$6rt$2@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> wrote:
Show 8 quoted lines
> Catalin Marinas wrote:
>
>> I now tried the example stgit.pager option and it looks bad indeed. In
>> the meantime, there is a diffcol.sh script in the contrib directory, I
>> use this instead and it looks much nicer.
>
> That means it should be not removed even though git-diff learned
> --color...

It looks nicer than "filterdiff | colordiff" (and probably pretty similar to the git-diff --color output).

It shouldn't be removed yet because there is no support in StGIT to pass these options automatically. Since StGIT uses git-diff-tree/index directly, always passing the --color option to these tools is not feasible as they cannot detect whether the output is tty or file. This functionality is currently handled by the pydoc.pager function.

Using git-diff would require a bit of work as well since StGIT first captures the output and displays it afterwards via pydoc.pager. We might change this at some point since GIT now has proper support for PAGER.

-- 
Catalin
Previous: Jakub Narebski
Message 5 of 5 in “[StGit] How do I get colored diff output?”
  1. Peter BaumannAug 30, 2007
  2. Catalin MarinasAug 30, 2007
  3. Peter BaumannAug 30, 2007
  4. Jakub NarebskiAug 30, 2007
  5. Catalin MarinasAug 31, 2007

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.