diff options
Diffstat (limited to 'builtin/show-ref.c')
-rw-r--r-- | builtin/show-ref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 6d4e669002..0e53e3da4f 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -202,7 +202,7 @@ int cmd_show_ref(int argc, const char **argv, const char *prefix) while (*pattern) { struct object_id oid; - if (starts_with(*pattern, "refs/") && + if ((starts_with(*pattern, "refs/") || !strcmp(*pattern, "HEAD")) && !read_ref(*pattern, oid.hash)) { if (!quiet) show_one(*pattern, &oid); |