Merge branch 'ja/doc-style-fix'
[gitweb.git] / transport.c
index 040e92c1344ef96cc7a6f13fcda9734ad7c4edb5..e078812897eddefcd5a55a7d474dd4a7a89434fc 100644 (file)
@@ -154,7 +154,7 @@ static int fetch_refs_from_bundle(struct transport *transport,
                               int nr_heads, struct ref **to_fetch)
 {
        struct bundle_transport_data *data = transport->data;
-       return unbundle(&data->header, data->fd,
+       return unbundle(the_repository, &data->header, data->fd,
                        transport->progress ? BUNDLE_VERBOSE : 0);
 }
 
@@ -273,7 +273,8 @@ static struct ref *handshake(struct transport *transport, int for_push,
 
        packet_reader_init(&reader, data->fd[0], NULL, 0,
                           PACKET_READ_CHOMP_NEWLINE |
-                          PACKET_READ_GENTLE_ON_EOF);
+                          PACKET_READ_GENTLE_ON_EOF |
+                          PACKET_READ_DIE_ON_ERR_PACKET);
 
        data->version = discover_version(&reader);
        switch (data->version) {
@@ -1105,7 +1106,8 @@ static int run_pre_push_hook(struct transport *transport,
        return ret;
 }
 
-int transport_push(struct transport *transport,
+int transport_push(struct repository *r,
+                  struct transport *transport,
                   struct refspec *rs, int flags,
                   unsigned int *reject_reasons)
 {
@@ -1172,7 +1174,7 @@ int transport_push(struct transport *transport,
                                        oid_array_append(&commits,
                                                          &ref->new_oid);
 
-                       if (!push_unpushed_submodules(the_repository,
+                       if (!push_unpushed_submodules(r,
                                                      &commits,
                                                      transport->remote,
                                                      rs,
@@ -1197,7 +1199,7 @@ int transport_push(struct transport *transport,
                                        oid_array_append(&commits,
                                                          &ref->new_oid);
 
-                       if (find_unpushed_submodules(the_repository,
+                       if (find_unpushed_submodules(r,
                                                     &commits,
                                                     transport->remote->name,
                                                     &needs_pushing)) {