X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=transport-helper.c;h=6cf3bb324e149c0180d332497edf2b2c15a6b71c;hb=a6e3839976ed6328fccc83848c4f7c59d301edee;hp=143ca008c8f20384c8c4636e5372817946e66e14;hpb=53016f4c13c7b6cb95be4b9bd93b3f6cf30b3ad7;p=thirdparty%2Fgit.git diff --git a/transport-helper.c b/transport-helper.c index 143ca008c8..6cf3bb324e 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -573,7 +573,7 @@ static int run_connect(struct transport *transport, struct strbuf *cmdbuf) fprintf(stderr, "Debug: Falling back to dumb " "transport.\n"); } else { - die(_(_("unknown response to connect: %s")), + die(_("unknown response to connect: %s"), cmdbuf->buf); } @@ -1026,7 +1026,8 @@ static int push_refs(struct transport *transport, } -static int has_attribute(const char *attrs, const char *attr) { +static int has_attribute(const char *attrs, const char *attr) +{ int len; if (!attrs) return 0; @@ -1105,6 +1106,7 @@ static struct ref *get_refs_list(struct transport *transport, int for_push, } static struct transport_vtable vtable = { + 0, set_helper_option, get_refs_list, fetch, @@ -1224,9 +1226,8 @@ static int udt_do_read(struct unidirectional_transfer *t) return 0; /* No space for more. */ transfer_debug("%s is readable", t->src_name); - bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse); - if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN && - errno != EINTR) { + bytes = xread(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse); + if (bytes < 0) { error_errno(_("read(%s) failed"), t->src_name); return -1; } else if (bytes == 0) { @@ -1253,7 +1254,7 @@ static int udt_do_write(struct unidirectional_transfer *t) transfer_debug("%s is writable", t->dest_name); bytes = xwrite(t->dest, t->buf, t->bufuse); - if (bytes < 0 && errno != EWOULDBLOCK) { + if (bytes < 0) { error_errno(_("write(%s) failed"), t->dest_name); return -1; } else if (bytes > 0) {