OSDN Git Service

show-ref: remove dead `if (verify)' check
authorVladimir Panteleev <git@thecybershadow.net>
Mon, 23 Jan 2017 18:00:59 +0000 (18:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Jan 2017 20:06:30 +0000 (12:06 -0800)
As show_ref() is only ever called on the path where --verify is not
specified, `verify' can never possibly be true here.

Signed-off-by: Vladimir Panteleev <git@thecybershadow.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/show-ref.c

index 107d05f..2dfcb56 100644 (file)
@@ -73,9 +73,6 @@ static int show_ref(const char *refname, const struct object_id *oid,
                                continue;
                        if (len == reflen)
                                goto match;
-                       /* "--verify" requires an exact match */
-                       if (verify)
-                               continue;
                        if (refname[reflen - len - 1] == '/')
                                goto match;
                }