diff options
author | Robert Fitzsimons <robfitz@273k.net> | 2006-12-24 14:31:49 +0000 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-25 10:40:44 -0800 |
commit | f47efbb7ab735fc49d8d93f9ed1c087c5da09c23 (patch) | |
tree | 25c8bf8ba7a9d04f29546c8cd7ba7ef631751a0d /gitweb | |
parent | a8b983bfea9daa255fd32dfc6b39e809733e4c5a (diff) | |
download | git-f47efbb7ab735fc49d8d93f9ed1c087c5da09c23.tar.gz |
gitweb: Use rev-list --skip option.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index f9994d9417..65fcdb0f28 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1391,35 +1391,13 @@ sub parse_commits { $maxcount ||= 1; $skip ||= 0; - # Delete once rev-list supports the --skip option - if ($skip > 0) { - open my $fd, "-|", git_cmd(), "rev-list", - ($arg ? ($arg) : ()), - ("--max-count=" . ($maxcount + $skip)), - $commit_id, - "--", - ($filename ? ($filename) : ()) - or die_error(undef, "Open git-rev-list failed"); - while (my $line = <$fd>) { - if ($skip-- <= 0) { - chomp $line; - my %co = parse_commit($line); - push @cos, \%co; - } - } - close $fd; - - return wantarray ? @cos : \@cos; - } - local $/ = "\0"; open my $fd, "-|", git_cmd(), "rev-list", "--header", ($arg ? ($arg) : ()), ("--max-count=" . $maxcount), - # Add once rev-list supports the --skip option - # ("--skip=" . $skip), + ("--skip=" . $skip), $commit_id, "--", ($filename ? ($filename) : ()) |