1. Stefan Saasen
  2. git

Commits

Lea Wiemann  committed 422b206

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>

  • Participants
  • Parent commits 02c1719
  • Branches master

Comments (0)

Files changed (1)

File builtin-cat-file.c

View file
 
 	if (get_sha1(obj_name, sha1)) {
 		printf("%s missing\n", obj_name);
+		fflush(stdout);
 		return 0;
 	}