Skip to content

Commit d4eb9da

Browse files
Remove the STDERR redirect to speed up execution
1 parent 2fe348f commit d4eb9da

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/DiffHighlight.pm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ sub highlight_stdin {
141141
# fallback, which means we will work even if git can't be run.
142142
sub color_config {
143143
my ($key, $default) = @_;
144-
my $s = `git config --get-color $key 2>$NULL`;
144+
145+
# Removing the redirect speeds up execution by about 12ms
146+
#my $s = `git config --get-color $key 2>$NULL`;
147+
my $s = `git config --get-color $key`;
148+
145149
return length($s) ? $s : $default;
146150
}
147151

0 commit comments

Comments
 (0)