]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/show-ref.c
show-ref --verify: accept pseudorefs
[thirdparty/git.git] / builtin / show-ref.c
index 79955c2856eacea0398a7fd9e90f34c790bbd8cd..1c15421e6008e80b1983c168592998f17667bf58 100644 (file)
@@ -172,7 +172,7 @@ static int cmd_show_ref__verify(const struct show_one_options *show_one_opts,
        while (*refs) {
                struct object_id oid;
 
-               if ((starts_with(*refs, "refs/") || !strcmp(*refs, "HEAD")) &&
+               if ((starts_with(*refs, "refs/") || refname_is_safe(*refs)) &&
                    !read_ref(*refs, &oid)) {
                        show_one(show_one_opts, *refs, &oid);
                }