Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx> --- builtin/for-each-ref.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index 1d4083c..c22f200 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -432,7 +432,7 @@ static void grab_person(const char *who, struct atom_value *val, int deref, stru if (name[wholen] != 0 && strcmp(name + wholen, "name") && strcmp(name + wholen, "email") && - prefixcmp(name + wholen, "date")) + !has_prefix(name + wholen, "date")) continue; if (!wholine) wholine = find_wholine(who, wholen, buf, sz); @@ -444,7 +444,7 @@ static void grab_person(const char *who, struct atom_value *val, int deref, stru v->s = copy_name(wholine); else if (!strcmp(name + wholen, "email")) v->s = copy_email(wholine); - else if (!prefixcmp(name + wholen, "date")) + else if (has_prefix(name + wholen, "date")) grab_date(wholine, v, name); } @@ -466,7 +466,7 @@ static void grab_person(const char *who, struct atom_value *val, int deref, stru if (deref) name++; - if (!prefixcmp(name, "creatordate")) + if (has_prefix(name, "creatordate")) grab_date(wholine, v, name); else if (!strcmp(name, "creator")) v->s = copy_line(wholine); @@ -646,14 +646,14 @@ static void populate_value(struct refinfo *ref) name++; } - if (!prefixcmp(name, "refname")) + if (has_prefix(name, "refname")) refname = ref->refname; - else if (!prefixcmp(name, "symref")) + else if (has_prefix(name, "symref")) refname = ref->symref ? ref->symref : ""; - else if (!prefixcmp(name, "upstream")) { + else if (has_prefix(name, "upstream")) { struct branch *branch; /* only local branches may have an upstream */ - if (prefixcmp(ref->refname, "refs/heads/")) + if (!has_prefix(ref->refname, "refs/heads/")) continue; branch = branch_get(ref->refname + 11); -- 1.8.4.1.566.geca833c -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html