Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
cvsimport: Improve formating consistency
[gitweb.git]
/
builtin-show-ref.c
diff --git
a/builtin-show-ref.c
b/builtin-show-ref.c
index ae0edddac1ad63b849dc341c8dd6519181c1e18e..9463ff0e69b15fc0e544259e64960bc942a98368 100644
(file)
--- a/
builtin-show-ref.c
+++ b/
builtin-show-ref.c
@@
-221,9
+221,11
@@
int cmd_show_ref(int argc, const char **argv, const char *prefix)
}
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)