Merge branch 'kd/t0028-octal-del-is-377-not-777'
[gitweb.git] / builtin / show-ref.c
index 2f13f1316fadc2fc860fac75a161b47f7d11e391..6a706c02a6f9782ee4abb289cfafe468253aca1f 100644 (file)
@@ -23,7 +23,7 @@ static void show_one(const char *refname, const struct object_id *oid)
        const char *hex;
        struct object_id peeled;
 
-       if (!has_sha1_file(oid->hash))
+       if (!has_object_file(oid))
                die("git show-ref: bad ref %s (%s)", refname,
                    oid_to_hex(oid));
 
@@ -151,6 +151,7 @@ static int hash_callback(const struct option *opt, const char *arg, int unset)
 static int exclude_existing_callback(const struct option *opt, const char *arg,
                                     int unset)
 {
+       BUG_ON_OPT_NEG(unset);
        exclude_arg = 1;
        *(const char **)opt->value = arg;
        return 0;