git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
02c1719
)
cat-file --batch: flush stdout also when objects are missing
author
Lea Wiemann
<redacted>
Tue, 3 Jun 2008 18:34:17 +0000
(20:34 +0200)
committer
Junio C Hamano
<redacted>
Tue, 3 Jun 2008 19:40:12 +0000
(12:40 -0700)
cat-file --batch/--batch-check only flushes stdout when the object
exists, but not when it doesn't ("<object> missing"). This makes
bidirectional pipes hang.
Signed-off-by: Lea Wiemann <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin-cat-file.c
patch
|
blob
|
history
diff --git
a/builtin-cat-file.c
b/builtin-cat-file.c
index 200345e7fbd54d86fb1e4db228244b7a7a221562..f8b3160668e1eeff3ef9a893459c64992aa53b5b 100644
(file)
--- a/
builtin-cat-file.c
+++ b/
builtin-cat-file.c
@@
-159,6
+159,7
@@
static int batch_one_object(const char *obj_name, int print_contents)
if (get_sha1(obj_name, sha1)) {
printf("%s missing\n", obj_name);
+ fflush(stdout);
return 0;
}
git clone https://git.99rst.org/PROJECT