diff options
author | Eric Wong <e@80x24.org> | 2016-12-26 03:04:08 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-01-01 03:07:31 +0000 |
commit | b3df50ef7ed4bc7f48881192bc4f8c103331904d (patch) | |
tree | 103139feddd54be1d7a87115a9906f05f6ebbe53 | |
parent | ae7bb15b33e870c5823e4f31dda527474c57b42b (diff) | |
download | public-inbox-b3df50ef7ed4bc7f48881192bc4f8c103331904d.tar.gz |
At the moment, we always set expath, so it will always be defined.
-rw-r--r-- | lib/PublicInbox/RepobrowseGitDiff.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/RepobrowseGitDiff.pm b/lib/PublicInbox/RepobrowseGitDiff.pm index d65973c1..4ed4d02e 100644 --- a/lib/PublicInbox/RepobrowseGitDiff.pm +++ b/lib/PublicInbox/RepobrowseGitDiff.pm @@ -28,7 +28,7 @@ sub call_git_diff { --no-notes --no-color -M -B -D -r), $id2, $id, '--'); my $expath = $req->{expath}; - push @cmd, $expath if defined $expath; + push @cmd, $expath if $expath ne ''; $req->{rpipe} = $git->popen(\@cmd, undef, { 2 => $git->err_begin }); my $env = $req->{env}; my $err = $env->{'psgi.errors'}; @@ -72,7 +72,7 @@ sub call_git_diff { my $h = ['Content-Type', 'text/html; charset=UTF-8']; my $fh = $req->{fh} = $res->([200, $h]); my $o = { nofollow => 1, noindex => 1 }; - my $ex = defined $expath ? " $expath" : ''; + my $ex = $expath eq '' ? '' : " $expath"; $fh->write($self->html_start($req, 'diff', $o). "\n\n". utf8_html("git diff-tree -r -M -B -D ". |