Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-05-18 01:51:54 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-18 02:13:10 +0300
commitb9dbddf6dace2094061d5093743f29c100cfd534 (patch)
tree4c2143fa3129fc1d9e9f2d138b60c4ba419c93af /commit.c
parent2f6c767fd49a1fb324c2d19fcee1fe227d816e11 (diff)
commit: allow lookup_commit_graft to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/commit.c b/commit.c
index eef1675d69..b01cc0c3e0 100644
--- a/commit.c
+++ b/commit.c
@@ -209,14 +209,14 @@ static void prepare_commit_graft(struct repository *r)
r->parsed_objects->commit_graft_prepared = 1;
}
-struct commit_graft *lookup_commit_graft_the_repository(const struct object_id *oid)
+struct commit_graft *lookup_commit_graft(struct repository *r, const struct object_id *oid)
{
int pos;
- prepare_commit_graft(the_repository);
- pos = commit_graft_pos(the_repository, oid->hash);
+ prepare_commit_graft(r);
+ pos = commit_graft_pos(r, oid->hash);
if (pos < 0)
return NULL;
- return the_repository->parsed_objects->grafts[pos];
+ return r->parsed_objects->grafts[pos];
}
int for_each_commit_graft(each_commit_graft_fn fn, void *cb_data)