diff options
Diffstat (limited to 'builtin/show-ref.c')
-rw-r--r-- | builtin/show-ref.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 3af6a53ee9..a2243b4219 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -1,7 +1,10 @@ #include "builtin.h" #include "cache.h" #include "config.h" +#include "gettext.h" +#include "hex.h" #include "refs.h" +#include "object-name.h" #include "object-store.h" #include "object.h" #include "tag.h" @@ -26,14 +29,14 @@ static void show_one(const char *refname, const struct object_id *oid) const char *hex; struct object_id peeled; - if (!has_object_file(oid)) + if (!repo_has_object_file(the_repository, oid)) die("git show-ref: bad ref %s (%s)", refname, oid_to_hex(oid)); if (quiet) return; - hex = find_unique_abbrev(oid, abbrev); + hex = repo_find_unique_abbrev(the_repository, oid, abbrev); if (hash_only) printf("%s\n", hex); else @@ -43,7 +46,7 @@ static void show_one(const char *refname, const struct object_id *oid) return; if (!peel_iterated_oid(oid, &peeled)) { - hex = find_unique_abbrev(&peeled, abbrev); + hex = repo_find_unique_abbrev(the_repository, &peeled, abbrev); printf("%s %s^{}\n", hex, refname); } } |