summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2008-02-26 12:22:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-27 21:21:32 (GMT)
commit311e552e7674be620bd930ddada307c15140c6ac (patch)
treecec288e9b79d04d723268cd8ddf17bb0ae93a8c8 /gitweb
parentdc1c0fffd3723ceebff51053938db5baf26a47f5 (diff)
downloadgit-311e552e7674be620bd930ddada307c15140c6ac.zip
git-311e552e7674be620bd930ddada307c15140c6ac.tar.gz
git-311e552e7674be620bd930ddada307c15140c6ac.tar.bz2
gitweb: Change parse_commits signature to allow for multiple options
Change order of parameters in parse_commits() to have $filename before @args (extra options), to allow for multiple extra options, for example both '--grep=<pattern>' and '--fixed-strings'. Change all callers to follow new calling convention. Originally by Petr Baudis, in http://repo.or.cz/git/gitweb.git: b98f0a7c gitweb: Clearly distinguish regexp / exact match searches Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl10
1 files changed, 5 insertions, 5 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index fc95e2c..3b4b15a 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2079,7 +2079,7 @@ sub parse_commit {
}
sub parse_commits {
- my ($commit_id, $maxcount, $skip, $arg, $filename) = @_;
+ my ($commit_id, $maxcount, $skip, $filename, @args) = @_;
my @cos;
$maxcount ||= 1;
@@ -2089,7 +2089,7 @@ sub parse_commits {
open my $fd, "-|", git_cmd(), "rev-list",
"--header",
- ($arg ? ($arg) : ()),
+ @args,
("--max-count=" . $maxcount),
("--skip=" . $skip),
@extra_options,
@@ -5172,7 +5172,7 @@ sub git_history {
$ftype = git_get_type($hash);
}
- my @commitlist = parse_commits($hash_base, 101, (100 * $page), "--full-history", $file_name);
+ my @commitlist = parse_commits($hash_base, 101, (100 * $page), $file_name, "--full-history");
my $paging_nav = '';
if ($page > 0) {
@@ -5255,7 +5255,7 @@ sub git_search {
$greptype = "--committer=";
}
$greptype .= $search_regexp;
- my @commitlist = parse_commits($hash, 101, (100 * $page), $greptype);
+ my @commitlist = parse_commits($hash, 101, (100 * $page), undef, $greptype);
my $paging_nav = '';
if ($page > 0) {
@@ -5507,7 +5507,7 @@ sub git_feed {
# log/feed of current (HEAD) branch, log of given branch, history of file/directory
my $head = $hash || 'HEAD';
- my @commitlist = parse_commits($head, 150, 0, undef, $file_name);
+ my @commitlist = parse_commits($head, 150, 0, $file_name);
my %latest_commit;
my %latest_date;