Merge branch 'js/diff-highlight-avoid-sigpipe'
* js/diff-highlight-avoid-sigpipe: diff-highlight: exit when a pipe is broken
This commit is contained in:
commit
bd51886f30
@ -14,6 +14,10 @@ my @removed;
|
|||||||
my @added;
|
my @added;
|
||||||
my $in_hunk;
|
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 (<>) {
|
while (<>) {
|
||||||
if (!$in_hunk) {
|
if (!$in_hunk) {
|
||||||
print;
|
print;
|
||||||
|
Loading…
Reference in New Issue
Block a user