pack-protocol.txt: accept error packets in any context
[gitweb.git] / upload-pack.c
index 1638825ee85c6875d7bf60658cea9ea62bec4245..08b547cf01bffe219140a7c3fa5ffb855b82058f 100644 (file)
@@ -1078,7 +1078,9 @@ void upload_pack(struct upload_pack_options *options)
        if (options->advertise_refs)
                return;
 
-       packet_reader_init(&reader, 0, NULL, 0, PACKET_READ_CHOMP_NEWLINE);
+       packet_reader_init(&reader, 0, NULL, 0,
+                          PACKET_READ_CHOMP_NEWLINE |
+                          PACKET_READ_DIE_ON_ERR_PACKET);
 
        receive_needs(&reader, &want_obj);
        if (want_obj.nr) {