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:
@ -184,7 +184,7 @@ static void name_rev(struct commit *start_commit,
|
||||
size_t parents_to_queue_nr, parents_to_queue_alloc = 0;
|
||||
struct rev_name *start_name;
|
||||
|
||||
parse_commit(start_commit);
|
||||
repo_parse_commit(the_repository, start_commit);
|
||||
if (commit_is_before_cutoff(start_commit))
|
||||
return;
|
||||
|
||||
@ -214,7 +214,7 @@ static void name_rev(struct commit *start_commit,
|
||||
struct rev_name *parent_name;
|
||||
int generation, distance;
|
||||
|
||||
parse_commit(parent);
|
||||
repo_parse_commit(the_repository, parent);
|
||||
if (commit_is_before_cutoff(parent))
|
||||
continue;
|
||||
|
||||
@ -496,7 +496,8 @@ static void show_name(const struct object *obj,
|
||||
else if (allow_undefined)
|
||||
printf("undefined\n");
|
||||
else if (always)
|
||||
printf("%s\n", find_unique_abbrev(oid, DEFAULT_ABBREV));
|
||||
printf("%s\n",
|
||||
repo_find_unique_abbrev(the_repository, oid, DEFAULT_ABBREV));
|
||||
else
|
||||
die("cannot describe '%s'", oid_to_hex(oid));
|
||||
strbuf_release(&buf);
|
||||
@ -530,7 +531,7 @@ static void name_rev_line(char *p, struct name_ref_data *data)
|
||||
counter = 0;
|
||||
|
||||
*(p+1) = 0;
|
||||
if (!get_oid(p - (hexsz - 1), &oid)) {
|
||||
if (!repo_get_oid(the_repository, p - (hexsz - 1), &oid)) {
|
||||
struct object *o =
|
||||
lookup_object(the_repository, &oid);
|
||||
if (o)
|
||||
@ -607,7 +608,7 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
|
||||
struct object *object;
|
||||
struct commit *commit;
|
||||
|
||||
if (get_oid(*argv, &oid)) {
|
||||
if (repo_get_oid(the_repository, *argv, &oid)) {
|
||||
fprintf(stderr, "Could not get sha1 for %s. Skipping.\n",
|
||||
*argv);
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user