X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-show-ref.c;h=65051d14fde44c14d12099df656ac423bc1c347e;hb=be6042cfa59358b733b6f9ba05bcbc317998d9fe;hp=ae0edddac1ad63b849dc341c8dd6519181c1e18e;hpb=4b22f634a3f1752d98e1fc5eee4fa7ce0efe157c;p=git.git diff --git a/builtin-show-ref.c b/builtin-show-ref.c index ae0edddac..65051d14f 100644 --- a/builtin-show-ref.c +++ b/builtin-show-ref.c @@ -1,3 +1,4 @@ +#include "builtin.h" #include "cache.h" #include "refs.h" #include "object.h" @@ -221,9 +222,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)