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:
authorJunio C Hamano <gitster@pobox.com>2023-04-04 18:25:52 +0300
committerJunio C Hamano <gitster@pobox.com>2023-04-04 18:25:52 +0300
commite7dca80692dec7f0717d9ad6d978d0ceab90cf6a (patch)
tree3fd355c15df79b7e89ba63c906b6b5b34100513e /remote.c
parentec2f02696157d3781fbfd410f0017c49cc1eda01 (diff)
parent4a93b899c19794c28b140bf78a13fb9c2b34f433 (diff)
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"
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/remote.c b/remote.c
index c29e2f5298..6599d52de2 100644
--- a/remote.c
+++ b/remote.c
@@ -1169,7 +1169,7 @@ static int try_explicit_object_name(const char *name,
return 0;
}
- if (get_oid(name, &oid))
+ if (repo_get_oid(the_repository, name, &oid))
return -1;
if (match) {
@@ -1257,7 +1257,7 @@ static void show_push_unqualified_ref_name_error(const char *dst_value,
if (!advice_enabled(ADVICE_PUSH_UNQUALIFIED_REF_NAME))
return;
- if (get_oid(matched_src_name, &oid))
+ if (repo_get_oid(the_repository, matched_src_name, &oid))
BUG("'%s' is not a valid object, "
"match_explicit_lhs() should catch this!",
matched_src_name);
@@ -1765,7 +1765,7 @@ void set_ref_status_for_push(struct ref *remote_refs, int send_mirror,
if (!reject_reason && !ref->deletion && !is_null_oid(&ref->old_oid)) {
if (starts_with(ref->name, "refs/tags/"))
reject_reason = REF_STATUS_REJECT_ALREADY_EXISTS;
- else if (!has_object_file(&ref->old_oid))
+ else if (!repo_has_object_file(the_repository, &ref->old_oid))
reject_reason = REF_STATUS_REJECT_FETCH_FIRST;
else if (!lookup_commit_reference_gently(the_repository, &ref->old_oid, 1) ||
!lookup_commit_reference_gently(the_repository, &ref->new_oid, 1))
@@ -1814,8 +1814,9 @@ static void set_merge(struct remote_state *remote_state, struct branch *ret)
if (!remote_find_tracking(remote, ret->merge[i]) ||
strcmp(ret->remote_name, "."))
continue;
- if (dwim_ref(ret->merge_name[i], strlen(ret->merge_name[i]),
- &oid, &ref, 0) == 1)
+ if (repo_dwim_ref(the_repository, ret->merge_name[i],
+ strlen(ret->merge_name[i]), &oid, &ref,
+ 0) == 1)
ret->merge[i]->dst = ref;
else
ret->merge[i]->dst = xstrdup(ret->merge_name[i]);
@@ -2511,7 +2512,7 @@ static int parse_push_cas_option(struct push_cas_option *cas, const char *arg, i
entry->use_tracking = 1;
else if (!colon[1])
oidclr(&entry->expect);
- else if (get_oid(colon + 1, &entry->expect))
+ else if (repo_get_oid(the_repository, colon + 1, &entry->expect))
return error(_("cannot parse expected object name '%s'"),
colon + 1);
return 0;
@@ -2668,7 +2669,7 @@ static int is_reachable_in_reflog(const char *local, const struct ref *remote)
if (MERGE_BASES_BATCH_SIZE < size)
size = MERGE_BASES_BATCH_SIZE;
- if ((ret = in_merge_bases_many(commit, size, chunk)))
+ if ((ret = repo_in_merge_bases_many(the_repository, commit, size, chunk)))
break;
}