summaryrefslogtreecommitdiff
path: root/builtin-cat-file.c
diff options
context:
space:
mode:
authorLea Wiemann <lewiemann@gmail.com>2008-06-03 20:34:17 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-03 12:40:12 -0700
commit422b206342047c9290362caeaa10cddbe3f9a23e (patch)
tree4bde6091864159f198fa03985b5e1c2a4777a349 /builtin-cat-file.c
parent02c17196e323d64b2062eb90b661ff3c65de1a07 (diff)
downloadgit-422b206342047c9290362caeaa10cddbe3f9a23e.tar.gz
cat-file --batch: flush stdout also when objects are missing
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 <LeWiemann@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-cat-file.c')
-rw-r--r--builtin-cat-file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-cat-file.c b/builtin-cat-file.c
index 200345e7fb..f8b3160668 100644
--- 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;
}