git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-update-index: report(...) now flushes stdout after printing the report line
@ 2009-11-19 21:17 Sebastian Thiel
  2009-12-30 13:41 ` Nanako Shiraishi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sebastian Thiel @ 2009-11-19 21:17 UTC (permalink / raw)
  To: git

This makes it equivalent to the behavior of git-hash-object and allows tools to
write one path
to stdin, flush and assure the work is done once it reads the corresponding
report line.
Previously attempting to do that would result in the program blocking as
git-update-index
did not flush its report line (yet). External programs use the git-hash-object
like behavior
to precisely control when which work is done while providing just-in-time
feedback to the end-user.
---
 builtin-update-index.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/builtin-update-index.c b/builtin-update-index.c
index 92beaaf..08bf933 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -37,6 +37,7 @@ static void report(const char *fmt, ...)
 	va_start(vp, fmt);
 	vprintf(fmt, vp);
 	putchar('\n');
+	maybe_flush_or_die(stdout, "line to stdout");
 	va_end(vp);
 }
 
-- 
1.6.5.3.172.g9e796

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-01-06  1:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-19 21:17 [PATCH] git-update-index: report(...) now flushes stdout after printing the report line Sebastian Thiel
2009-12-30 13:41 ` Nanako Shiraishi
2009-12-30 19:46   ` Junio C Hamano
2009-12-30 13:56 ` Sebastian Thiel
2010-01-03 10:41 ` Sebastian Thiel
2010-01-03 23:03   ` Tay Ray Chuan
2010-01-04 10:30     ` Sebastian Thiel
2010-01-06  1:04     ` Junio C Hamano
2010-01-06  1:51       ` Tay Ray Chuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).