lib/gitlab_git/repository.rb in gitlab_git-5.7.1 vs lib/gitlab_git/repository.rb in gitlab_git-5.8.0

- old
+ new

@@ -139,23 +139,23 @@ pipe_cmd = nil case format when "tar.bz2", "tbz", "tbz2", "tb2", "bz2" extension = ".tar.bz2" - pipe_cmd = "bzip2" + pipe_cmd = %W(bzip2) when "tar" extension = ".tar" - pipe_cmd = "cat" + pipe_cmd = %W(cat) when "zip" extension = ".zip" git_archive_format = "zip" - pipe_cmd = "cat" + pipe_cmd = %W(cat) else # everything else should fall back to tar.gz extension = ".tar.gz" git_archive_format = nil - pipe_cmd = "gzip" + pipe_cmd = %W(gzip -n) end # Build file path file_name = self.name.gsub("\.git", "") + "-" + commit.id.to_s + extension file_path = File.join(storage_path, self.name, file_name) @@ -172,10 +172,10 @@ file_path end # Return repo size in megabytes def size - size = popen('du -s', path).first.strip.to_i + size = popen(%W(du -s), path).first.strip.to_i (size.to_f / 1024).round(2) end def search_files(query, ref = nil) if ref.nil? || ref == ""