diff --git a/builtin-show-ref.c b/builtin-show-ref.c
index ae0edddac1ad63b849dc341c8dd6519181c1e18e..65051d14fde44c14d12099df656ac423bc1c347e 100644 (file)
--- a/builtin-show-ref.c
+++ b/builtin-show-ref.c
+#include "builtin.h"
#include "cache.h"
#include "refs.h"
#include "object.h"
}
if (verify) {
- unsigned char sha1[20];
-
+ if (!pattern)
+ die("--verify requires a reference");
while (*pattern) {
+ unsigned char sha1[20];
+
if (!prefixcmp(*pattern, "refs/") &&
resolve_ref(*pattern, sha1, 1, NULL)) {
if (!quiet)