From: Giuseppe Bilotta Date: Thu, 18 Dec 2008 07:13:17 +0000 (+0100) Subject: gitweb: change call pattern for git_commitdiff X-Git-Tag: v1.6.2-rc0~136^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2020985464ba0135f717cd14309ac63a8dfda341;p=git.git gitweb: change call pattern for git_commitdiff Since we are going to introduce an additional parameter for git_commitdiff to tune patch view, we switch to named/hash-based parameter passing for clarity and robustness. Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 9a11be3d9..63e93a273 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -5411,7 +5411,8 @@ sub git_blobdiff_plain { } sub git_commitdiff { - my $format = shift || 'html'; + my %params = @_; + my $format = $params{-format} || 'html'; my $patch_max; if ($format eq 'patch') { @@ -5619,12 +5620,12 @@ sub git_commitdiff { } sub git_commitdiff_plain { - git_commitdiff('plain'); + git_commitdiff(-format => 'plain'); } # format-patch-style patches sub git_patch { - git_commitdiff('patch'); + git_commitdiff(-format => 'patch'); } sub git_history {