gitlab_git 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gitlab_git/repository.rb +2 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bf57ee88393b04446091e0476d70169ae045025
|
4
|
+
data.tar.gz: cdf473dd287011601260907b3d5f228b4e0c62b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3633986240af6338ca0cda112aa9cb6e00c52465e3839a1eed3695577551d9bfafc9dec2826885cf3d0c76f25837a0c68484b340e824d20162ed8e6bce08c94b
|
7
|
+
data.tar.gz: 5592af8920f8de1ae2d806a6dd7d40c8cf170db81551d08d5205a815cbdb2d023449e318e22e7eb19e8830a507b98ef6836c3a45c82d6d9a0a0dc230a7920040
|
@@ -188,20 +188,9 @@ module Gitlab
|
|
188
188
|
end
|
189
189
|
|
190
190
|
# Return repo size in megabytes
|
191
|
-
# Cached in redis
|
192
191
|
def size
|
193
|
-
|
194
|
-
|
195
|
-
(size.to_f / 1024).round(2)
|
196
|
-
end
|
197
|
-
end
|
198
|
-
|
199
|
-
def expire_cache
|
200
|
-
Rails.cache.delete(cache_key(:size))
|
201
|
-
end
|
202
|
-
|
203
|
-
def cache_key(type)
|
204
|
-
"#{type}:#{path_with_namespace}"
|
192
|
+
size = popen('du -s', path_to_repo).first.strip.to_i
|
193
|
+
(size.to_f / 1024).round(2)
|
205
194
|
end
|
206
195
|
|
207
196
|
def diffs_between(source_branch, target_branch)
|