Unverified Commit 684bcb6a authored by boklm's avatar boklm
Browse files

BrowserGit: Use git-rev-list to get a list of commits

parent fc893a05
......@@ -62,13 +62,9 @@ sub parent_commits {
sub get_commits {
my ($commit, $commit_stop) = @_;
my @res = ($commit);
return @res if $commit eq $commit_stop;
my ($parents) = git_cmd_ch('git', 'show', '-s', '--format=%P', $commit);
foreach my $p (split(' ', $parents)) {
push @res, get_commits($p, $commit_stop);
}
return @res;
my ($out) = git_cmd_ch('git', 'rev-list', '--topo-order',
"$commit_stop^..$commit");
return split "\n", $out;
}
sub get_commits_by_branch {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment