Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6e25935f
Commit
6e25935f
authored
Jun 14, 2018
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move count commit to mandatory
Closes
https://gitlab.com/gitlab-org/gitaly/issues/330
parent
0716e192
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
18 deletions
+2
-18
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+2
-18
No files found.
lib/gitlab/git/repository.rb
View file @
6e25935f
...
...
@@ -676,15 +676,9 @@ module Gitlab
end
# Return total commits count accessible from passed ref
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/330
def
commit_count
(
ref
)
gitaly_migrate
(
:commit_count
,
status:
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
do
|
is_enabled
|
if
is_enabled
wrapped_gitaly_errors
do
gitaly_commit_client
.
commit_count
(
ref
)
else
rugged_commit_count
(
ref
)
end
end
end
...
...
@@ -2393,16 +2387,6 @@ module Gitlab
nil
end
def
rugged_commit_count
(
ref
)
walker
=
Rugged
::
Walker
.
new
(
rugged
)
walker
.
sorting
(
Rugged
::
SORT_TOPO
|
Rugged
::
SORT_REVERSE
)
oid
=
rugged
.
rev_parse_oid
(
ref
)
walker
.
push
(
oid
)
walker
.
count
rescue
Rugged
::
ReferenceError
0
end
def
rev_list_param
(
spec
)
spec
==
:all
?
[
'--all'
]
:
spec
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment