t: prefer "git config --file" to GIT_CONFIG
[gitweb.git] / transport-helper.c
index 2010674bb4add9c09d02d703b5337a69b14a58a6..ad72fbd53cb7bfc7fc037d98288b0cc831ea949a 100644 (file)
@@ -360,6 +360,12 @@ static int fetch_with_fetch(struct transport *transport,
            data->transport_options.check_self_contained_and_connected)
                set_helper_option(transport, "check-connectivity", "true");
 
+       if (transport->cloning)
+               set_helper_option(transport, "cloning", "true");
+
+       if (data->transport_options.update_shallow)
+               set_helper_option(transport, "update-shallow", "true");
+
        for (i = 0; i < nr_heads; i++) {
                const struct ref *posn = to_fetch[i];
                if (posn->status & REF_STATUS_UPTODATE)
@@ -1129,9 +1135,8 @@ static int udt_do_write(struct unidirectional_transfer *t)
                return 0;       /* Nothing to write. */
 
        transfer_debug("%s is writable", t->dest_name);
-       bytes = write(t->dest, t->buf, t->bufuse);
-       if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN &&
-               errno != EINTR) {
+       bytes = xwrite(t->dest, t->buf, t->bufuse);
+       if (bytes < 0 && errno != EWOULDBLOCK) {
                error("write(%s) failed: %s", t->dest_name, strerror(errno));
                return -1;
        } else if (bytes > 0) {