summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Vladimir Panteleev <git@thecybershadow.net>2017-01-23 18:00:59 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-23 12:06:30 -0800
commit02bdc9d9f6ef6ae2f304121a0cf169f7c50f2370 (patch)
treea9699073c66e5308f84cbdf0784171c89a0f8a19
parentshow-ref: detect dangling refs under --verify as well (diff)
downloadtgif-02bdc9d9f6ef6ae2f304121a0cf169f7c50f2370.tar.xz
show-ref: remove dead `if (verify)' check
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>
-rw-r--r--builtin/show-ref.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 107d05fe0e..2dfcb5634c 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -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;
}