Skip to content

Commit

Permalink
gitweb: change call pattern for git_commitdiff
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Giuseppe Bilotta authored and Junio C Hamano committed Dec 21, 2008
1 parent 9872cd6 commit 2020985
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 2020985

Please sign in to comment.