From: Lea Wiemann Date: Tue, 3 Jun 2008 18:34:17 +0000 (+0200) Subject: cat-file --batch: flush stdout also when objects are missing X-Git-Tag: v1.5.6-rc2~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=422b206342047c9290362caeaa10cddbe3f9a23e;p=git.git 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 (" missing"). This makes bidirectional pipes hang. Signed-off-by: Lea Wiemann Signed-off-by: Junio C Hamano --- diff --git a/builtin-cat-file.c b/builtin-cat-file.c index 200345e7f..f8b316066 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; }