]> Sergey Matveev's repositories - public-inbox.git/commitdiff
viewdiff: diff_header: shorten function, slightly
authorEric Wong <e@80x24.org>
Sat, 10 Sep 2022 08:17:21 +0000 (08:17 +0000)
committerEric Wong <e@80x24.org>
Sat, 10 Sep 2022 19:50:50 +0000 (19:50 +0000)
It makes for easier reading with gigantic fonts.

lib/PublicInbox/ViewDiff.pm

index b91156692976849ac26474c4c35c2acde79c4bd6..fba3d76c7b0cc10473261380c081301f93b5b119 100644 (file)
@@ -124,12 +124,8 @@ sub diff_header ($$$) {
                $dctx->{Q} = '?b='.uri_escape_path($pb);
        } else {
                my @q;
-               if ($pb ne '/dev/null') {
-                       push @q, 'b='.uri_escape_path($pb);
-               }
-               if ($pa ne '/dev/null') {
-                       push @q, 'a='.uri_escape_path($pa);
-               }
+               push @q, 'b='.uri_escape_path($pb) if $pb ne '/dev/null';
+               push @q, 'a='.uri_escape_path($pa) if $pa ne '/dev/null';
                $dctx->{Q} = '?'.join('&amp;', @q);
        }