From: Eric Wong Date: Wed, 18 Jan 2017 08:17:50 +0000 (+0000) Subject: repobrowse: expath is always defined X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=488211c1f3066cebfe5d74332527dcc790ddd740;p=thirdparty%2Fpublic-inbox.git repobrowse: expath is always defined Remove an outdated comment while we're at it, too. --- diff --git a/lib/PublicInbox/RepobrowseGitPatch.pm b/lib/PublicInbox/RepobrowseGitPatch.pm index e8820f720..dc6cd7930 100644 --- a/lib/PublicInbox/RepobrowseGitPatch.pm +++ b/lib/PublicInbox/RepobrowseGitPatch.pm @@ -26,11 +26,9 @@ sub call_git_patch { my $range = "$id~1..$id^0"; my @cmd = ('git', "--git-dir=$git->{git_dir}", @CMD, $sig." $range", $range, '--'); - if (defined(my $expath = $req->{expath})) { - push @cmd, $expath if $expath ne ''; - } + my $expath = $req->{expath}; + push @cmd, $expath if $expath ne ''; - # FIXME: generalize this with other qspawn users my $qsp = PublicInbox::Qspawn->new(\@cmd); $qsp->psgi_return($env, undef, sub { my ($r) = @_;