gitlab_git 7.0.0.rc6 → 7.0.0.rc7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/gitlab_git/repository.rb +22 -19
- 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: a017d97f4752bc24ff9fc7abe49b9fc0143301a9
|
4
|
+
data.tar.gz: c5bc10d54d6c635549c0d04a5cd71e29bf272247
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84a528cad4b97c3e8ec7e177e59830b51eab8963d44eb491c09069cfa130cd62b3fb19df8ee1fb2cce5add69d452f891906bd1f8fe732ebc999de01d92276ba3
|
7
|
+
data.tar.gz: db2d09da3da1c07af108da6ee783f39b298408351e9161d697864b01d66a799443acd6b106489bf772e1b192036778c358d090bd892e611ada5146305b4fb908
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.0.0.
|
1
|
+
7.0.0.rc7
|
@@ -825,29 +825,32 @@ module Gitlab
|
|
825
825
|
if extension == '.zip'
|
826
826
|
create_zip_archive(ref_name, file_path, prefix)
|
827
827
|
else
|
828
|
-
|
829
|
-
tar_pid = fork do
|
830
|
-
# Send the tar file to the write pipe
|
831
|
-
rd_pipe.close
|
832
|
-
Gem::Package::TarWriter.new(rw_pipe) do |tar|
|
833
|
-
tar.mkdir(prefix, 33261)
|
834
|
-
|
835
|
-
populated_index(ref_name).each do |entry|
|
836
|
-
add_archive_entry(tar, prefix, entry)
|
837
|
-
end
|
838
|
-
end
|
839
|
-
rw_pipe.close
|
840
|
-
end
|
841
|
-
|
842
|
-
# Use the other end of the pipe to compress with bzip2 or gzip
|
828
|
+
# Open the file with the final result
|
843
829
|
FileUtils.mkdir_p(Pathname.new(file_path).dirname)
|
844
830
|
archive_file = File.new(file_path, 'wb')
|
845
|
-
rw_pipe.close
|
846
|
-
system(*pipe_cmd, in: rd_pipe, out: archive_file)
|
847
831
|
|
848
|
-
|
849
|
-
|
832
|
+
# Create a pipe to communicate with the compressor process
|
833
|
+
pipe_rd, pipe_wr = IO.pipe
|
834
|
+
compress_pid = spawn(*pipe_cmd, in: pipe_rd, out: archive_file)
|
835
|
+
# pipe_rd and archive_file belong to the compressor process now; close
|
836
|
+
# them straightaway in our process.
|
837
|
+
pipe_rd.close
|
850
838
|
archive_file.close
|
839
|
+
|
840
|
+
# Change the external encoding of pipe_wr to prevent Ruby from trying
|
841
|
+
# to convert binary to UTF-8.
|
842
|
+
pipe_wr = IO.new(pipe_wr.fileno, 'w:ASCII-8BIT')
|
843
|
+
Gem::Package::TarWriter.new(pipe_wr) do |tar|
|
844
|
+
tar.mkdir(prefix, 33261)
|
845
|
+
|
846
|
+
populated_index(ref_name).each do |entry|
|
847
|
+
add_archive_entry(tar, prefix, entry)
|
848
|
+
end
|
849
|
+
end
|
850
|
+
# We are done with pipe_wr, close it straightaway.
|
851
|
+
pipe_wr.close
|
852
|
+
|
853
|
+
Process.waitpid(compress_pid)
|
851
854
|
end
|
852
855
|
end
|
853
856
|
|