peel_ref: do not return a null sha1
[gitweb.git] / builtin / describe.c
index 9f63067f50a6f49d61d40474608535905bec905b..94b06069a0f79e2300c6e56239d61eeebde992d5 100644 (file)
@@ -144,7 +144,7 @@ static int get_name(const char *path, const unsigned char *sha1, int flag, void
        if (!all && !might_be_tag)
                return 0;
 
-       if (!peel_ref(path, peeled) && !is_null_sha1(peeled)) {
+       if (!peel_ref(path, peeled)) {
                is_tag = !!hashcmp(sha1, peeled);
        } else {
                hashcpy(peeled, sha1);