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
82e7eb75
Commit
82e7eb75
authored
Apr 07, 2017
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removes the duplicate sum of lfs objects
parent
6969cd97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
app/models/project.rb
app/models/project.rb
+1
-1
changelogs/unreleased-ee/2055-lfs-objects-being-counted-twice.yml
...gs/unreleased-ee/2055-lfs-objects-being-counted-twice.yml
+4
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+13
-0
No files found.
app/models/project.rb
View file @
82e7eb75
...
...
@@ -1512,7 +1512,7 @@ class Project < ActiveRecord::Base
end
def
repository_and_lfs_size
statistics
.
storage_size
+
statistics
.
lfs_objects
_size
statistics
.
total_repository
_size
end
def
above_size_limit?
...
...
changelogs/unreleased-ee/2055-lfs-objects-being-counted-twice.yml
0 → 100644
View file @
82e7eb75
---
title
:
Removes duplicate count of LFS objects from repository_and_lfs_size method
merge_request
:
1599
author
:
spec/models/project_spec.rb
View file @
82e7eb75
...
...
@@ -2094,6 +2094,19 @@ describe Project, models: true do
end
end
describe
'#repository_and_lfs_size'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:size
)
{
50
}
before
do
allow
(
project
.
statistics
).
to
receive
(
:total_repository_size
).
and_return
(
size
)
end
it
'returns the total repository and lfs size'
do
expect
(
project
.
repository_and_lfs_size
).
to
eq
(
size
)
end
end
describe
'#approver_group_ids='
do
let
(
:project
)
{
create
(
:empty_project
)
}
...
...
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