... | ... |
@@ -128,10 +128,10 @@ sub branches { |
128 | 128 |
} |
129 | 129 |
|
130 | 130 |
sub branches_count { |
131 |
- my ($self, $user, $project) = @_; |
|
131 |
+ my ($self, %opt) = @_; |
|
132 | 132 |
|
133 | 133 |
# Branches count |
134 |
- my @cmd = $self->cmd_rep($user, $project, 'branch'); |
|
134 |
+ my @cmd = $self->cmd(%opt, command => ['branch']); |
|
135 | 135 |
open my $fh, '-|', @cmd or return; |
136 | 136 |
my @branches = <$fh>; |
137 | 137 |
my $branches_count = @branches; |
... | ... |
@@ -821,17 +821,6 @@ sub last_activity { |
821 | 821 |
return; |
822 | 822 |
} |
823 | 823 |
|
824 |
-sub no_merged_branches_count { |
|
825 |
- my ($self, $user, $project) = @_; |
|
826 |
- |
|
827 |
- my @cmd = $self->cmd_rep($user, $project, 'branch', '--no-merged'); |
|
828 |
- open my $fh, '-|', @cmd or return; |
|
829 |
- my @branches = <$fh>; |
|
830 |
- my $branches_count = @branches; |
|
831 |
- |
|
832 |
- return $branches_count; |
|
833 |
-} |
|
834 |
- |
|
835 | 824 |
sub path_by_id { |
836 | 825 |
my ($self, $user, $project, $base, $hash) = @_; |
837 | 826 |
|
... | ... |
@@ -71,7 +71,7 @@ |
71 | 71 |
. ($ssh_port ? ":$ssh_port" : '') . "$ssh_rep_url_base/$user/$project.git"; |
72 | 72 |
|
73 | 73 |
my $branches = stash('branches'); |
74 |
- my $branches_count = app->git->branches_count($user, $project); |
|
74 |
+ my $branches_count = app->git->branches_count(%{$self->app->rep_info($user, $project)}); |
|
75 | 75 |
my $default_branch_name = app->manager->default_branch($user, $project); |
76 | 76 |
my $tags_count = app->git->tags_count($user, $project); |
77 | 77 |
|