Re: [PATCH 1/2] Added basic color support to git add --interactive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 23, 2007 at 08:28:28AM +0200, Wincent Colaiuta wrote:

> I did too, where you add a third, optional "trailer" parameter to the 
> function where you pass the newline if there is one (following the style of 
> the functions in color.c). Pasting it below.

The problem with that approach is that you can only send in a single
line at a time (with the newline detached!), so it makes life harder for
the caller. E.g., there is at least one spot that uses a here-doc with
many lines; splitting that into a bunch of print_ansi_color calls would
be unnecessarily ugly.

> Having said that, I think this kind of function belongs in Git.pm, and the 

Yes! Most of this is obviously library-ish code, and should go into the
library.

> dependency on Term::ANSIColor should be replaced with dependency-free code 
> that generates the colors itself; this should be easy because the number of 

Out of curiosity, are people really running perl < 5.6?  Term::ANSIColor
has been in the base distribution for 7 years now.

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux