From 037de004c68d704abf839eebe075c58c9603f8f3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 20 May 2024 07:14:36 +0200 Subject: Adding upstream version 1:2.45.1. Signed-off-by: Daniel Baumann --- http-push.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'http-push.c') diff --git a/http-push.c b/http-push.c index a704f49..1fe5122 100644 --- a/http-push.c +++ b/http-push.c @@ -6,10 +6,8 @@ #include "tag.h" #include "blob.h" #include "http.h" -#include "refs.h" #include "diff.h" #include "revision.h" -#include "exec-cmd.h" #include "remote.h" #include "list-objects.h" #include "setup.h" @@ -17,6 +15,7 @@ #include "strvec.h" #include "tree.h" #include "tree-walk.h" +#include "url.h" #include "packfile.h" #include "object-store-ll.h" #include "commit-reach.h" @@ -1308,7 +1307,7 @@ static struct object_list **process_tree(struct tree *tree, obj->flags |= SEEN; p = add_one_object(obj, p); - init_tree_desc(&desc, tree->buffer, tree->size); + init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size); while (tree_entry(&desc, &entry)) switch (object_type(entry.mode)) { @@ -1576,8 +1575,11 @@ static int verify_merge_base(struct object_id *head_oid, struct ref *remote) struct commit *head = lookup_commit_or_die(head_oid, "HEAD"); struct commit *branch = lookup_commit_or_die(&remote->old_oid, remote->name); + int ret = repo_in_merge_bases(the_repository, branch, head); - return repo_in_merge_bases(the_repository, branch, head); + if (ret < 0) + exit(128); + return ret; } static int delete_remote_branch(const char *pattern, int force) @@ -1852,6 +1854,7 @@ int cmd_main(int argc, const char **argv) if (oideq(&ref->old_oid, &ref->peer_ref->new_oid)) { if (push_verbosely) + /* stable plumbing output; do not modify or localize */ fprintf(stderr, "'%s': up-to-date\n", ref->name); if (helper_status) printf("ok %s up to date\n", ref->name); @@ -1872,6 +1875,7 @@ int cmd_main(int argc, const char **argv) * commits at the remote end and likely * we were not up to date to begin with. */ + /* stable plumbing output; do not modify or localize */ error("remote '%s' is not an ancestor of\n" "local '%s'.\n" "Maybe you are not up-to-date and " -- cgit v1.2.3