about summary refs log tree commit diff
path: root/third_party/git/send-pack.c
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
commit93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch)
tree85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/send-pack.c
parent6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff)
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing
changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/send-pack.c')
-rw-r--r--third_party/git/send-pack.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/third_party/git/send-pack.c b/third_party/git/send-pack.c
index 0407841ae8..6dc16c3211 100644
--- a/third_party/git/send-pack.c
+++ b/third_party/git/send-pack.c
@@ -40,10 +40,7 @@ int option_parse_push_signed(const struct option *opt,
 
 static void feed_object(const struct object_id *oid, FILE *fh, int negative)
 {
-	if (negative &&
-	    !has_object_file_with_flags(oid,
-					OBJECT_INFO_SKIP_FETCH_OBJECT |
-					OBJECT_INFO_QUICK))
+	if (negative && !has_object_file(oid))
 		return;
 
 	if (negative)
@@ -567,6 +564,8 @@ int send_pack(struct send_pack_args *args,
 
 	if (need_pack_data && cmds_sent) {
 		if (pack_objects(out, remote_refs, extra_have, args) < 0) {
+			for (ref = remote_refs; ref; ref = ref->next)
+				ref->status = REF_STATUS_NONE;
 			if (args->stateless_rpc)
 				close(out);
 			if (git_connection_is_socket(conn))
@@ -574,12 +573,10 @@ int send_pack(struct send_pack_args *args,
 
 			/*
 			 * Do not even bother with the return value; we know we
-			 * are failing, and just want the error() side effects,
-			 * as well as marking refs with their remote status (if
-			 * we get one).
+			 * are failing, and just want the error() side effects.
 			 */
 			if (status_report)
-				receive_status(&reader, remote_refs);
+				receive_unpack_status(&reader);
 
 			if (use_sideband) {
 				close(demux.out);