GNU bug report logs - #20062
[PATCH] diff: add support for --color

Previous Next

Package: diffutils;

Reported by: Giuseppe Scrivano <gscrivan <at> redhat.com>

Date: Sun, 8 Mar 2015 21:57:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Giuseppe Scrivano <gscrivan <at> redhat.com>
Cc: Eric Blake <eblake <at> redhat.com>, 20062 <at> debbugs.gnu.org
Subject: bug#20062: [bug-diffutils] bug#20062: bug#20062: [PATCH] diff: add support for --color
Date: Tue, 10 Mar 2015 17:06:36 -0700
Giuseppe Scrivano wrote:
> the
> most it can hang is the time needed to print a single line.

There's no limit on line length though, right?  Other than available memory.  So 
this could be a problem.  ('ls' doesn't have a similar problem, if I understand 
it correctly, as OSes typically have reasonably short limits on file name length.)

>> >Also, 'diff --color' needn't mess with signal handling unless isatty
>> >(fileno (outfile)).
> Should this also be done if --color=always is used?

Yes.  diff needs to mess with signal handling only if both (1) diff is 
outputting colors and (2) the output is a terminal.  This is independent of why 
diff is doing (1).




This bug report was last modified 8 years and 79 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.