提交 20209854 编写于 作者: G Giuseppe Bilotta 提交者: Junio C Hamano

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: NJunio C Hamano <gitster@pobox.com>
上级 9872cd6f
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册