summaryrefslogtreecommitdiff
path: root/copy.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-05 11:50:24 -0800
committerJunio C Hamano <junkio@cox.net>2005-11-05 11:50:24 -0800
commit87ce294c9129879f717f8749cae1c659e18a3823 (patch)
tree7bda83efef0ee677e4e743954bc00bdcf6a63874 /copy.c
parent6ddc0964034342519a87fe013781abf31c6db6ad (diff)
parent3d95bf074e8532fd0643b886422eddd0768a3f2c (diff)
GIT 0.99.9dv0.99.9d
This is primarily to include the 'git clone -l' (without -s) fix, first spotted and diagnosed by Linus and caused James Bottomley's repository to become unreadable. It also contains documentation updates happened on the "master" branch since 0.99.9c Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/copy.c b/copy.c
index 20092757d3..e1cd5d0650 100644
--- a/copy.c
+++ b/copy.c
@@ -10,10 +10,13 @@ int copy_fd(int ifd, int ofd)
if (!len)
break;
if (len < 0) {
+ int read_error;
if (errno == EAGAIN)
continue;
+ read_error = errno;
+ close(ifd);
return error("copy-fd: read returned %s",
- strerror(errno));
+ strerror(read_error));
}
while (1) {
int written = write(ofd, buf, len);