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 /http-push.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 'http-push.c')
-rw-r--r--http-push.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/http-push.c b/http-push.c
index e73864b51f..a8af6c0f69 100644
--- a/http-push.c
+++ b/http-push.c
@@ -365,7 +365,8 @@ static void start_put(struct transfer_request *request)
ssize_t size;
git_zstream stream;
- unpacked = read_object_file(&request->obj->oid, &type, &len);
+ unpacked = repo_read_object_file(the_repository, &request->obj->oid,
+ &type, &len);
hdrlen = format_object_header(hdr, sizeof(hdr), type, len);
/* Set it up */
@@ -1334,7 +1335,8 @@ static int get_delta(struct rev_info *revs, struct remote_lock *lock)
int count = 0;
while ((commit = get_revision(revs)) != NULL) {
- p = process_tree(get_commit_tree(commit), p);
+ p = process_tree(repo_get_commit_tree(the_repository, commit),
+ p);
commit->object.flags |= LOCAL;
if (!(commit->object.flags & UNINTERESTING))
count += add_send_request(&commit->object, lock);
@@ -1429,7 +1431,7 @@ static void one_remote_ref(const char *refname)
* Fetch a copy of the object if it doesn't exist locally - it
* may be required for updating server info later.
*/
- if (repo->can_update_info_refs && !has_object_file(&ref->old_oid)) {
+ if (repo->can_update_info_refs && !repo_has_object_file(the_repository, &ref->old_oid)) {
obj = lookup_unknown_object(the_repository, &ref->old_oid);
fprintf(stderr, " fetch %s for %s\n",
oid_to_hex(&ref->old_oid), refname);
@@ -1573,7 +1575,7 @@ static int verify_merge_base(struct object_id *head_oid, struct ref *remote)
struct commit *branch = lookup_commit_or_die(&remote->old_oid,
remote->name);
- return in_merge_bases(branch, head);
+ return repo_in_merge_bases(the_repository, branch, head);
}
static int delete_remote_branch(const char *pattern, int force)
@@ -1630,14 +1632,14 @@ static int delete_remote_branch(const char *pattern, int force)
return error("Remote HEAD symrefs too deep");
if (is_null_oid(&head_oid))
return error("Unable to resolve remote HEAD");
- if (!has_object_file(&head_oid))
+ if (!repo_has_object_file(the_repository, &head_oid))
return error("Remote HEAD resolves to object %s\nwhich does not exist locally, perhaps you need to fetch?", oid_to_hex(&head_oid));
/* Remote branch must resolve to a known object */
if (is_null_oid(&remote_ref->old_oid))
return error("Unable to resolve remote branch %s",
remote_ref->name);
- if (!has_object_file(&remote_ref->old_oid))
+ if (!repo_has_object_file(the_repository, &remote_ref->old_oid))
return error("Remote branch %s resolves to object %s\nwhich does not exist locally, perhaps you need to fetch?", remote_ref->name, oid_to_hex(&remote_ref->old_oid));
/* Remote branch must be an ancestor of remote HEAD */
@@ -1857,7 +1859,7 @@ int cmd_main(int argc, const char **argv)
if (!force_all &&
!is_null_oid(&ref->old_oid) &&
!ref->force) {
- if (!has_object_file(&ref->old_oid) ||
+ if (!repo_has_object_file(the_repository, &ref->old_oid) ||
!ref_newer(&ref->peer_ref->new_oid,
&ref->old_oid)) {
/*