summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-12-18 08:13:17 +0100
committerJunio C Hamano <gitster@pobox.com>2008-12-21 01:11:28 -0800
commit2020985464ba0135f717cd14309ac63a8dfda341 (patch)
treeedeed61e171fd38346f338261b770710552a7e92 /gitweb
parent9872cd6f6c40803db9e784b6287db72e0cb6b5c3 (diff)
downloadgit-2020985464ba0135f717cd14309ac63a8dfda341.tar.gz
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 <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl7
1 files changed, 4 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 9a11be3d94..63e93a2736 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 {