for-each-ref: use skip_prefix() to avoid duplicate string comparison
commit008d5d005d862d9b0309af94dfc266e3b06bdf6d
authorRené Scharfe <l.s.r@web.de>
Sat, 21 Feb 2015 19:51:28 +0000 (21 20:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Feb 2015 20:01:37 +0000 (22 12:01 -0800)
tree39b28e6863a17274972a08d19f99b232fd29e766
parent2ae7f90f263760abd242501471f123632395d7b3
for-each-ref: use skip_prefix() to avoid duplicate string comparison

Use skip_prefix() to get the part after "color:" (if present) and only
compare it with "reset" instead of comparing the whole string again.
This gets rid of the duplicate "color:" part of the string constant.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/for-each-ref.c