aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/show-ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/show-ref.c')
-rw-r--r--builtin/show-ref.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index f81209f23c..623a52a45f 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -35,7 +35,8 @@ static void show_one(const struct show_one_options *opts,
const char *hex;
struct object_id peeled;
- if (!repo_has_object_file(the_repository, oid))
+ if (!has_object(the_repository, oid,
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
die("git show-ref: bad ref %s (%s)", refname,
oid_to_hex(oid));