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:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 16:58:48 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-28 17:36:45 +0300
commitecb5091fd4301ac647db0bd2504112b38f7ee06d (patch)
tree3b068d4dae3a26444da0fa32e8efa700a50deab6 /object-name.c
parentcb338c23d6d518947bf6f7240bf30e2ec232bd3b (diff)
cocci: apply the "commit.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "commit.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-name.c')
-rw-r--r--object-name.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/object-name.c b/object-name.c
index 21e8f67489..2926f26251 100644
--- a/object-name.c
+++ b/object-name.c
@@ -1036,7 +1036,7 @@ static enum get_oid_result get_parent(struct repository *r,
if (ret)
return ret;
commit = lookup_commit_reference(r, &oid);
- if (parse_commit(commit))
+ if (repo_parse_commit(the_repository, commit))
return MISSING_OBJECT;
if (!idx) {
oidcpy(result, &commit->object.oid);
@@ -1070,7 +1070,7 @@ static enum get_oid_result get_nth_ancestor(struct repository *r,
return MISSING_OBJECT;
while (generation--) {
- if (parse_commit(commit) || !commit->parents)
+ if (repo_parse_commit(the_repository, commit) || !commit->parents)
return MISSING_OBJECT;
commit = commit->parents->item;
}
@@ -1361,10 +1361,10 @@ static int get_oid_oneline(struct repository *r,
commit = pop_most_recent_commit(&list, ONELINE_SEEN);
if (!parse_object(r, &commit->object.oid))
continue;
- buf = get_commit_buffer(commit, NULL);
+ buf = repo_get_commit_buffer(the_repository, commit, NULL);
p = strstr(buf, "\n\n");
matches = negative ^ (p && !regexec(&regex, p + 2, 0, NULL, 0));
- unuse_commit_buffer(commit, buf);
+ repo_unuse_commit_buffer(the_repository, commit, buf);
if (matches) {
oidcpy(oid, &commit->object.oid);