Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-07 Thread Jeff King
On Mon, May 07, 2018 at 10:35:53AM +0900, Junio C Hamano wrote: > > So really, I guess all I am arguing for is having GIT_COLOR_INV (or > > REVERSE) as a constant, and then teaching the code to combine it with > > the existing "new" color. It's perfectly OK to have: > > > > \x1b[7m\x1b[36m > >

Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-07 Thread Jeff King
On Sun, May 06, 2018 at 09:20:46PM -0400, Johannes Schindelin wrote: > > Heh, of course you knew that already, as I just noticed your patch is > > using the reverse attribute internally (I had thought at first glance > > you were just specifying the background independently). > > > > So really,

Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-06 Thread Johannes Schindelin
Hi Junio, On Mon, 7 May 2018, Junio C Hamano wrote: > Jeff King writes: > > > So really, I guess all I am arguing for is having GIT_COLOR_INV (or > > REVERSE) as a constant, and then teaching the code to combine it with > > the existing "new" color. It's perfectly OK to have: >

Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-06 Thread Junio C Hamano
Jeff King writes: > On Sun, May 06, 2018 at 02:35:44AM -0400, Jeff King wrote: > >> You'd have to introduce GIT_COLOR_REVERSE. I don't think we have a >> constant for it yet, but it's \x[7m. > > Heh, of course you knew that already, as I just noticed your patch is > using the

Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-06 Thread Johannes Schindelin
Hi Peff, On Sun, 6 May 2018, Jeff King wrote: > On Sun, May 06, 2018 at 02:35:44AM -0400, Jeff King wrote: > > > You'd have to introduce GIT_COLOR_REVERSE. I don't think we have a > > constant for it yet, but it's \x[7m. > > Heh, of course you knew that already, as I just noticed your patch is

Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-06 Thread Jeff King
On Sun, May 06, 2018 at 02:35:44AM -0400, Jeff King wrote: > You'd have to introduce GIT_COLOR_REVERSE. I don't think we have a > constant for it yet, but it's \x[7m. Heh, of course you knew that already, as I just noticed your patch is using the reverse attribute internally (I had thought at

Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-06 Thread Jeff King
On Sun, May 06, 2018 at 12:03:50AM +0200, Johannes Schindelin wrote: > > There's a "reverse" attribute (which we already parse and support) that > > can do this without having to repeat the colors. AFAIK it's well > > supported everywhere, but I could be wrong. > > How would I use that here,

Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-05 Thread Johannes Schindelin
Hi Peff, On Sat, 5 May 2018, Jeff King wrote: > On Fri, May 04, 2018 at 05:34:58PM +0200, Johannes Schindelin wrote: > > > For every regular color, there exists the inverted equivalent where > > background and foreground colors are exchanged. > > > > We will use this in the next commit to

Re: [PATCH v2 13/18] color: provide inverted colors, too

2018-05-05 Thread Jeff King
On Fri, May 04, 2018 at 05:34:58PM +0200, Johannes Schindelin wrote: > For every regular color, there exists the inverted equivalent where > background and foreground colors are exchanged. > > We will use this in the next commit to allow inverting *just* the +/- > signs in a diff. There's a

[PATCH v2 13/18] color: provide inverted colors, too

2018-05-04 Thread Johannes Schindelin
For every regular color, there exists the inverted equivalent where background and foreground colors are exchanged. We will use this in the next commit to allow inverting *just* the +/- signs in a diff. Signed-off-by: Johannes Schindelin --- color.h | 6 ++ 1