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

From: Catalin Marinas <[email-masked]>
Date: Fri, 31 Aug 2007 16:14:49 +0100

Jakub Narebski <[email-masked]> wrote:
> 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