diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2013-11-18 21:39:13 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-11-19 22:14:15 +0400 |
commit | db64eb655b48ea2c635480c6cc992b0156817aeb (patch) | |
tree | 87d42cabc931a0cc1419e5b1433d8da10540a9fc /t/t6300-for-each-ref.sh | |
parent | fddb74c94777351d549b2ddaa36612c41b2176f1 (diff) |
for-each-ref: avoid color leakage
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>
Diffstat (limited to 't/t6300-for-each-ref.sh')
-rwxr-xr-x | t/t6300-for-each-ref.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index 69e3155a62..46866bab01 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -356,7 +356,7 @@ $(git rev-parse --short refs/tags/two) $(get_color green)two$(get_color reset) EOF test_expect_success 'Check %(color:...) ' ' - git for-each-ref --format="%(objectname:short) %(color:green)%(refname:short)%(color:reset)" >actual && + git for-each-ref --format="%(objectname:short) %(color:green)%(refname:short)" >actual && test_cmp expected actual ' |