]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
repobrowse: expath is always defined
authorEric Wong <e@80x24.org>
Wed, 18 Jan 2017 08:17:50 +0000 (08:17 +0000)
committerEric Wong <e@80x24.org>
Wed, 18 Jan 2017 08:17:50 +0000 (08:17 +0000)
Remove an outdated comment while we're at it, too.

lib/PublicInbox/RepobrowseGitPatch.pm

index e8820f72043af75615db27e7d887609f67373597..dc6cd7930eac2959d3c706cb4dfe45389217abdc 100644 (file)
@@ -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) = @_;