author | Junio C Hamano <junkio@cox.net> | |
Tue, 4 Apr 2006 06:43:16 +0000 (23:43 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 4 Apr 2006 06:43:16 +0000 (23:43 -0700) |
* lt/fix-sol-pack:
Use sigaction and SA_RESTART in read-tree.c; add option in Makefile.
safe_fgets() - even more anal fgets()
Use sigaction and SA_RESTART in read-tree.c; add option in Makefile.
safe_fgets() - even more anal fgets()
1 | 2 | |||
---|---|---|---|---|
pack-objects.c | patch | | diff1 | | diff2 | | blob | history |
read-tree.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc pack-objects.c
index 0ea16ad67fa7f14cf4dedf35a1adbd6da3856489,7d6247791d9374986c6fb85159433ecd91b9ccec..d7ba938af734f3ece9ff4f7060f32b8406f1827f
--- 1/pack-objects.c
--- 2/pack-objects.c
+++ b/pack-objects.c
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) {
- fprintf(stderr, "Counting objects...%d\r", nr_objects);
- progress_update = 0;
+ if (line[0] == '-') {
+ if (get_sha1_hex(line+1, sha1))
+ die("expected edge sha1, got garbage:\n %s",
+ line+1);
+ add_preferred_base(sha1);
+ continue;
}
if (get_sha1_hex(line, sha1))
die("expected sha1, got garbage:\n %s", line);
diff --cc read-tree.c
Simple merge