@matheusbsbs / matheus-bagliano / commits / ec3e97b84e
Fork 0

gitweb: shortlog now also obeys $hash_parent

If $hash_parent is defined, shortlog now limits the list of commits at those between $hash_parent (exclusive) and $hash (inclusive). Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Giuseppe Bilotta committed Aug 8, 2008 at 16:12 UTC ec3e97b84e739946413194c563a12779efda2155
1 file changed +5 -1
gitweb/gitweb.perl
+5 -1
@@ -5498,7 +5498,11 @@ sub git_shortlog {
5498 }
5499 my $refs = git_get_references();
5500
5501 - my @commitlist = parse_commits($hash, 101, (100 * $page));
5501 + my $commit_hash = $hash;
5502 + if (defined $hash_parent) {
5503 + $commit_hash = "$hash_parent..$hash";
5504 + }
5505 + my @commitlist = parse_commits($commit_hash, 101, (100 * $page));
5506
5507 my $paging_nav = format_paging_nav('shortlog', $hash, $head, $page, $#commitlist >= 100);
5508 my $next_link = '';