Merge branch 'ab/remove-implicit-use-of-the-repository' into en/header-split-cache-h
* ab/remove-implicit-use-of-the-repository: libs: use "struct repository *" argument, not "the_repository" post-cocci: adjust comments for recent repo_* migration cocci: apply the "revision.h" part of "the_repository.pending" cocci: apply the "rerere.h" part of "the_repository.pending" cocci: apply the "refs.h" part of "the_repository.pending" cocci: apply the "promisor-remote.h" part of "the_repository.pending" cocci: apply the "packfile.h" part of "the_repository.pending" cocci: apply the "pretty.h" part of "the_repository.pending" cocci: apply the "object-store.h" part of "the_repository.pending" cocci: apply the "diff.h" part of "the_repository.pending" cocci: apply the "commit.h" part of "the_repository.pending" cocci: apply the "commit-reach.h" part of "the_repository.pending" cocci: apply the "cache.h" part of "the_repository.pending" cocci: add missing "the_repository" macros to "pending" cocci: sort "the_repository" rules by header cocci: fix incorrect & verbose "the_repository" rules cocci: remove dead rule from "the_repository.pending.cocci"
This commit is contained in:
@ -28,14 +28,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
|
||||
@ -45,7 +45,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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user