git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] diff-tree: stop on broken output pipe
@ 2006-01-02  0:17 Johannes Schindelin
  2006-01-02  1:21 ` Andreas Ericsson
  2006-01-06 22:36 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Schindelin @ 2006-01-02  0:17 UTC (permalink / raw)
  To: git, junkio


---

	Without this, on my iBook git-whatchanged keeps running when I 
	quit "less". I have to interrupt the process a second time. No
	idea why it works on Linux.

 diff-tree.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

a3ff3aa99f1cc7d1e59563fbf22fed8a4f3f2d24
diff --git a/diff-tree.c b/diff-tree.c
index efa2b94..c06ccd3 100644
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -25,8 +25,9 @@ static int call_diff_flush(void)
 		return 0;
 	}
 	if (header) {
-		if (!no_commit_id)
-			printf("%s%c", header, diff_options.line_termination);
+		if (!no_commit_id && printf("%s%c", header,
+				diff_options.line_termination) < 0)
+			die("broken output pipe");
 		header = NULL;
 	}
 	diff_flush(&diff_options);
-- 
1.0.GIT

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

end of thread, other threads:[~2006-01-07  0:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-02  0:17 [PATCH] diff-tree: stop on broken output pipe Johannes Schindelin
2006-01-02  1:21 ` Andreas Ericsson
2006-01-02 11:01   ` Johannes Schindelin
2006-01-06 22:36 ` Junio C Hamano
2006-01-07  0:41   ` Johannes Schindelin

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).