summaryrefslogtreecommitdiffstats
path: root/bundle.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-01-03 22:48:00 +0100
committerJunio C Hamano <gitster@pobox.com>2012-01-03 22:48:00 +0100
commit228c3418356d06d0596408bee1c863e53ca27d58 (patch)
treec31e492269375ccca3cc081b015d26c5f13769df /bundle.c
parentUpdate draft release notes to 1.7.9 (diff)
parentMerge branch 'maint-1.7.7' into maint (diff)
downloadgit-228c3418356d06d0596408bee1c863e53ca27d58.tar.xz
git-228c3418356d06d0596408bee1c863e53ca27d58.zip
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;