summaryrefslogtreecommitdiff
path: root/pack-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack-objects.c')
-rw-r--r--pack-objects.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pack-objects.c b/pack-objects.c
index 084c2006a9..7d6247791d 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -915,9 +915,10 @@ int main(int argc, char **argv)
break;
if (!ferror(stdin))
die("fgets returned NULL, not EOF, not error!");
- if (errno == EINTR)
- continue;
- die("fgets: %s", strerror(errno));
+ if (errno != EINTR)
+ die("fgets: %s", strerror(errno));
+ clearerr(stdin);
+ continue;
}
if (progress_update) {