summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-11-10 19:26:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-10 19:26:09 (GMT)
commitbd51886f304f8ce2e83aed8a52b20553acb09373 (patch)
tree4579d3381be19992e2f802ea72ecbb48baa924a2 /contrib
parentb226293b44750f4e2ebd121e6f85528170f8e2c5 (diff)
parent251e7dad517bd369387c4dedfe77b380f025e0f3 (diff)
downloadgit-bd51886f304f8ce2e83aed8a52b20553acb09373.zip
git-bd51886f304f8ce2e83aed8a52b20553acb09373.tar.gz
git-bd51886f304f8ce2e83aed8a52b20553acb09373.tar.bz2
Merge branch 'js/diff-highlight-avoid-sigpipe'
* js/diff-highlight-avoid-sigpipe: diff-highlight: exit when a pipe is broken
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/diff-highlight/diff-highlight4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight
index c4404d4..69a652e 100755
--- a/contrib/diff-highlight/diff-highlight
+++ b/contrib/diff-highlight/diff-highlight
@@ -14,6 +14,10 @@ my @removed;
my @added;
my $in_hunk;
+# Some scripts may not realize that SIGPIPE is being ignored when launching the
+# pager--for instance scripts written in Python.
+$SIG{PIPE} = 'DEFAULT';
+
while (<>) {
if (!$in_hunk) {
print;