git-fastclone 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git-fastclone.rb +2 -1
- data/lib/git-fastclone/version.rb +1 -1
- data/spec/git_fastclone_runner_spec.rb +30 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22f5537cbc1297198ea1aa106a305ef5ad9526dc24fc9a39048c6889e6d441b4
|
4
|
+
data.tar.gz: 0f1f38ba2756185c3c02b7a5ec3cf40c01e4498e743388f41991ca1d817793de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22634dabfc0c4d91682dc7db8d9e18e6cdc4a6d6db079a66c5e498ccc6ed70c8bcb7ccd24657b91e5142d0fe8be0f34169223d1d70cb1262ed3c6d88e3ec0e83
|
7
|
+
data.tar.gz: 8dd73fac0eb7eec9b8e8ead616a48549860722982b756b950ad020cd295da4dffeaf4b89b7dad3c88f2dc4b82119a40172a499441924bbcf2885e280313850eb
|
data/lib/git-fastclone.rb
CHANGED
@@ -358,7 +358,8 @@ module GitFastClone
|
|
358
358
|
/fatal: packed object [a-z0-9]+ \(stored in .*?\) is corrupt/,
|
359
359
|
/fatal: pack has \d+ unresolved delta/,
|
360
360
|
'error: unable to read sha1 file of ',
|
361
|
-
'fatal: did not receive expected object'
|
361
|
+
'fatal: did not receive expected object',
|
362
|
+
/^fatal: unable to read tree [a-z0-9]+\n^warning: Clone succeeded, but checkout failed/
|
362
363
|
]
|
363
364
|
if e.to_s =~ /^STDERR:\n.+^#{Regexp.union(error_strings)}/m
|
364
365
|
# To avoid corruption of the cache, if we failed to update or check out we remove
|
@@ -306,7 +306,7 @@ describe GitFastClone::Runner do
|
|
306
306
|
expect(yielded).to eq([test_url_valid])
|
307
307
|
end
|
308
308
|
|
309
|
-
it 'should retry when the clone succeeds but checkout fails' do
|
309
|
+
it 'should retry when the clone succeeds but checkout fails with corrupt packed object' do
|
310
310
|
allow(subject).to receive(:update_reference_repo) {}
|
311
311
|
expect(subject).to receive(:reference_repo_dir)
|
312
312
|
expect(subject).to receive(:reference_repo_lock_file).and_return(lockfile)
|
@@ -333,6 +333,35 @@ describe GitFastClone::Runner do
|
|
333
333
|
expect(yielded).to eq([test_url_valid])
|
334
334
|
end
|
335
335
|
|
336
|
+
it 'should retry when the clone succeeds but checkout fails with unable to read tree' do
|
337
|
+
allow(subject).to receive(:update_reference_repo) {}
|
338
|
+
expect(subject).to receive(:reference_repo_dir)
|
339
|
+
expect(subject).to receive(:reference_repo_lock_file).and_return(lockfile)
|
340
|
+
|
341
|
+
responses = [
|
342
|
+
lambda { |_url|
|
343
|
+
raise Terrapin::ExitStatusError, <<-ERROR.gsub(/^ {12}/, '')
|
344
|
+
STDOUT:
|
345
|
+
|
346
|
+
STDERR:
|
347
|
+
|
348
|
+
error: Could not read 92cf57b8f07df010ab5f607b109c325e30e46235
|
349
|
+
fatal: unable to read tree 0c32c0521d3b0bfb4e74e4a39b97a84d1a3bb9a1
|
350
|
+
warning: Clone succeeded, but checkout failed.
|
351
|
+
You can inspect what was checked out with 'git status'
|
352
|
+
and retry with 'git restore --source=HEAD :/'
|
353
|
+
ERROR
|
354
|
+
},
|
355
|
+
->(url) { url }
|
356
|
+
]
|
357
|
+
subject.with_git_mirror(test_url_valid) do
|
358
|
+
yielded << responses.shift.call(test_url_valid)
|
359
|
+
end
|
360
|
+
|
361
|
+
expect(responses).to be_empty
|
362
|
+
expect(yielded).to eq([test_url_valid])
|
363
|
+
end
|
364
|
+
|
336
365
|
it 'should retry when one delta is missing' do
|
337
366
|
allow(subject).to receive(:update_reference_repo) {}
|
338
367
|
expect(subject).to receive(:reference_repo_dir)
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-fastclone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Tauraso
|
8
8
|
- James Chang
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
@@ -62,7 +62,7 @@ homepage: http://square.github.io/git-fastclone/
|
|
62
62
|
licenses:
|
63
63
|
- Apache
|
64
64
|
metadata: {}
|
65
|
-
post_install_message:
|
65
|
+
post_install_message:
|
66
66
|
rdoc_options: []
|
67
67
|
require_paths:
|
68
68
|
- lib
|
@@ -77,8 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
|
-
rubygems_version: 3.0.
|
81
|
-
signing_key:
|
80
|
+
rubygems_version: 3.0.1
|
81
|
+
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: git-clone --recursive on steroids!
|
84
84
|
test_files:
|