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>
Giuseppe Bilotta committed
Dec 18, 2008 at 08:13 UTC
2020985464ba0135f717cd14309ac63a8dfda341
1 file changed
+4
-3
gitweb/gitweb.perl
+4
-3
@@ -5411,7 +5411,8 @@ sub git_blobdiff_plain {
5411
}
5412
5413
sub git_commitdiff {
5414
- my $format = shift || 'html';
5414
+ my %params = @_;
5415
+ my $format = $params{-format} || 'html';
5416
5417
my $patch_max;
5418
if ($format eq 'patch') {
@@ -5619,12 +5620,12 @@ sub git_commitdiff {
5620
}
5621
5622
sub git_commitdiff_plain {
5622
- git_commitdiff('plain');
5623
+ git_commitdiff(-format => 'plain');
5624
}
5625
5626
# format-patch-style patches
5627
sub git_patch {
5627
- git_commitdiff('patch');
5628
+ git_commitdiff(-format => 'patch');
5629
}
5630
5631
sub git_history {