for-each-ref: use skip_prefix() to avoid duplicate string comparison
authorRené Scharfe <redacted>
Sat, 21 Feb 2015 19:51:28 +0000 (20:51 +0100)
committerJunio C Hamano <redacted>
Sun, 22 Feb 2015 20:01:37 +0000 (12:01 -0800)
commit008d5d005d862d9b0309af94dfc266e3b06bdf6d
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/for-each-ref.c
git clone https://git.99rst.org/PROJECT