Re: [PATCH v2 3/3] for-each-ref: introduce %(color:...) for color

2013-11-18 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: Perhaps like this (obviously not tested as these three patches did not add any tests ;-) Sorry about that. I didn't notice t6300-for-each-ref.sh. Will fix in the next round. I also think that there should be a mechanism

[PATCH v2 3/3] for-each-ref: introduce %(color:...) for color

2013-11-13 Thread Ramkumar Ramachandra
Enhance 'git for-each-ref' with color formatting options. You can now use the following format in for-each-ref: %(color:green)%(refname:short)%(color:reset) Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Documentation/git-for-each-ref.txt | 4 builtin/for-each-ref.c

Re: [PATCH v2 3/3] for-each-ref: introduce %(color:...) for color

2013-11-13 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: + } else if (!prefixcmp(name, color)) { + ; How is %(color:short) parsed with this code? This part says, Yeah, I see something starting with color, and then later strchr(name, ':') will point formatp to short.

Re: [PATCH v2 3/3] for-each-ref: introduce %(color:...) for color

2013-11-13 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Ramkumar Ramachandra artag...@gmail.com writes: +} else if (!prefixcmp(name, color)) { +; How is %(color:short) parsed with this code? This part says, Yeah, I see something starting with color, and then later

Re: [PATCH v2 3/3] for-each-ref: introduce %(color:...) for color

2013-11-13 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Perhaps like this (obviously not tested as these three patches did not add any tests ;-) Sorry about that. I didn't notice t6300-for-each-ref.sh. Will fix in the next round. I also think that there should be a mechanism to do color:reset after each record is issued