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:46 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-28 17:36:36 +0300
commitd850b7a545fcfbd97460a921c7f7c59d933eb0f7 (patch)
treee36940d63b92557a8d930301ff96e70e55cc222d /commit.c
parent7258e892d2c0f7a615562656e9978f39f610c056 (diff)
cocci: apply the "cache.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "cache.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/commit.c b/commit.c
index e433c33bb0..06a7c728e8 100644
--- a/commit.c
+++ b/commit.c
@@ -80,7 +80,7 @@ struct commit *lookup_commit_reference_by_name(const char *name)
struct object_id oid;
struct commit *commit;
- if (get_oid_committish(name, &oid))
+ if (repo_get_oid_committish(the_repository, name, &oid))
return NULL;
commit = lookup_commit_reference(the_repository, &oid);
if (parse_commit(commit))
@@ -1271,7 +1271,8 @@ void verify_merge_signature(struct commit *commit, int verbosity,
ret = check_commit_signature(commit, &signature_check);
- find_unique_abbrev_r(hex, &commit->object.oid, DEFAULT_ABBREV);
+ repo_find_unique_abbrev_r(the_repository, hex, &commit->object.oid,
+ DEFAULT_ABBREV);
switch (signature_check.result) {
case 'G':
if (ret || (check_trust && signature_check.trust_level < TRUST_MARGINAL))
@@ -1632,10 +1633,11 @@ struct commit *get_merge_parent(const char *name)
struct object *obj;
struct commit *commit;
struct object_id oid;
- if (get_oid(name, &oid))
+ if (repo_get_oid(the_repository, name, &oid))
return NULL;
obj = parse_object(the_repository, &oid);
- commit = (struct commit *)peel_to_type(name, 0, obj, OBJ_COMMIT);
+ commit = (struct commit *)repo_peel_to_type(the_repository, name, 0,
+ obj, OBJ_COMMIT);
if (commit && !merge_remote_util(commit))
set_merge_remote_desc(commit, name, obj);
return commit;