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:
@@ -298,7 +298,7 @@ static void export_blob(const struct object_id *oid)
|
||||
object = (struct object *)lookup_blob(the_repository, oid);
|
||||
eaten = 0;
|
||||
} else {
|
||||
buf = read_object_file(oid, &type, &size);
|
||||
buf = repo_read_object_file(the_repository, oid, &type, &size);
|
||||
if (!buf)
|
||||
die("could not read blob %s", oid_to_hex(oid));
|
||||
if (check_object_signature(the_repository, oid, buf, size,
|
||||
@@ -620,7 +620,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev,
|
||||
rev->diffopt.output_format = DIFF_FORMAT_CALLBACK;
|
||||
|
||||
parse_commit_or_die(commit);
|
||||
commit_buffer = get_commit_buffer(commit, NULL);
|
||||
commit_buffer = repo_get_commit_buffer(the_repository, commit, NULL);
|
||||
author = strstr(commit_buffer, "\nauthor ");
|
||||
if (!author)
|
||||
die("could not find author in commit %s",
|
||||
@@ -701,7 +701,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev,
|
||||
? strlen(message) : 0),
|
||||
reencoded ? reencoded : message ? message : "");
|
||||
free(reencoded);
|
||||
unuse_commit_buffer(commit, commit_buffer);
|
||||
repo_unuse_commit_buffer(the_repository, commit, commit_buffer);
|
||||
|
||||
for (i = 0, p = commit->parents; p; p = p->next) {
|
||||
struct object *obj = &p->item->object;
|
||||
@@ -768,7 +768,8 @@ static void handle_tag(const char *name, struct tag *tag)
|
||||
return;
|
||||
}
|
||||
|
||||
buf = read_object_file(&tag->object.oid, &type, &size);
|
||||
buf = repo_read_object_file(the_repository, &tag->object.oid, &type,
|
||||
&size);
|
||||
if (!buf)
|
||||
die("could not read tag %s", oid_to_hex(&tag->object.oid));
|
||||
message = memmem(buf, size, "\n\n", 2);
|
||||
@@ -919,7 +920,8 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info)
|
||||
if (e->flags & UNINTERESTING)
|
||||
continue;
|
||||
|
||||
if (dwim_ref(e->name, strlen(e->name), &oid, &full_name, 0) != 1)
|
||||
if (repo_dwim_ref(the_repository, e->name, strlen(e->name),
|
||||
&oid, &full_name, 0) != 1)
|
||||
continue;
|
||||
|
||||
if (refspecs.nr) {
|
||||
|
||||
Reference in New Issue
Block a user