lib/gitlab_git/repository.rb in gitlab_git-1.0.3 vs lib/gitlab_git/repository.rb in gitlab_git-1.0.4

- old
+ new

@@ -186,23 +186,12 @@ file_path end # Return repo size in megabytes - # Cached in redis def size - Rails.cache.fetch(cache_key(:size)) do - size = popen('du -s', path_to_repo).first.strip.to_i - (size.to_f / 1024).round(2) - end - end - - def expire_cache - Rails.cache.delete(cache_key(:size)) - end - - def cache_key(type) - "#{type}:#{path_with_namespace}" + size = popen('du -s', path_to_repo).first.strip.to_i + (size.to_f / 1024).round(2) end def diffs_between(source_branch, target_branch) # Only show what is new in the source branch compared to the target branch, not the other way around. # The linex below with merge_base is equivalent to diff with three dots (git diff branch1...branch2)