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

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

parent fc893a05
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -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 {