for-each-ref: avoid color leakage
authorRamkumar Ramachandra <artagnon@gmail.com>
Mon, 18 Nov 2013 17:39:13 +0000 (23:09 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Nov 2013 18:14:15 +0000 (10:14 -0800)
To make sure that an invocation like the following doesn't leak color,

$ git for-each-ref --format='%(subject)%(color:green)'

auto-reset at the end of the format string when the last color token
seen in the format string isn't a color-reset.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found