summaryrefslogtreecommitdiff
path: root/bundle.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-01-03 13:48:00 -0800
committerJunio C Hamano <gitster@pobox.com>2012-01-03 13:48:00 -0800
commit228c3418356d06d0596408bee1c863e53ca27d58 (patch)
treec31e492269375ccca3cc081b015d26c5f13769df /bundle.c
parent17b4e93d5b849293e6a3659bbc4075ed8a6e97e2 (diff)
parentbc0fe84b064d2185e147b7c1f98bb6f9b7966b2c (diff)
downloadgit-228c3418356d06d0596408bee1c863e53ca27d58.tar.gz
Merge branch 'maint'
* maint: docs: describe behavior of relative submodule URLs fix hang in git fetch if pointed at a 0 length bundle Documentation: read-tree --prefix works with existing subtrees Add MYMETA.json to perl/.gitignore
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundle.c b/bundle.c
index 4742f2734e..b8acf3c18b 100644
--- a/bundle.c
+++ b/bundle.c
@@ -31,8 +31,8 @@ static int strbuf_readline_fd(struct strbuf *sb, int fd)
while (1) {
char ch;
ssize_t len = xread(fd, &ch, 1);
- if (len < 0)
- return -1;
+ if (len <= 0)
+ return len;
strbuf_addch(sb, ch);
if (ch == '\n')
break;