git-fastclone 1.2.5 → 1.2.6
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 +1 -1
- data/lib/git-fastclone/version.rb +1 -1
- data/spec/git_fastclone_runner_spec.rb +27 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01c5d2b0002171f3ace397e442a8999737eebb0058fb5ad28fd731324ccac7e3
|
4
|
+
data.tar.gz: 4cd6568ac0f74b314e8bd861f5957e3bc7f1e76cdf663308aa8c85702919bbb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09963171d37af7b9c8eb01fbec2de51e9f35319e1367284a635dac32424651e7a719f7e42489843d7b11333a321e938ff94ca0413ef3aa72b907c53d2e37c75f'
|
7
|
+
data.tar.gz: 91aaeec03b1b9144b8859802646bd6caa466daa6d7e0763536ce0d7e10dfc8acbd5d7939b0b24455a2754c39b3f7999e5873a763ecc45fbed92446d45136c8ae
|
data/lib/git-fastclone.rb
CHANGED
@@ -356,7 +356,7 @@ module GitFastClone
|
|
356
356
|
'fatal: missing blob object',
|
357
357
|
'fatal: remote did not send all necessary objects',
|
358
358
|
/fatal: packed object [a-z0-9]+ \(stored in .*?\) is corrupt/,
|
359
|
-
/fatal: pack has \d+ unresolved
|
359
|
+
/fatal: pack has \d+ unresolved delta/,
|
360
360
|
'error: unable to read sha1 file of ',
|
361
361
|
'fatal: did not receive expected object'
|
362
362
|
]
|
@@ -333,6 +333,33 @@ describe GitFastClone::Runner do
|
|
333
333
|
expect(yielded).to eq([test_url_valid])
|
334
334
|
end
|
335
335
|
|
336
|
+
it 'should retry when one delta is missing' 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 f7fad86d06fee0678f9af7203b6031feabb40c3e
|
349
|
+
fatal: pack has 1 unresolved delta
|
350
|
+
fatal: index-pack failed
|
351
|
+
ERROR
|
352
|
+
},
|
353
|
+
->(url) { url }
|
354
|
+
]
|
355
|
+
subject.with_git_mirror(test_url_valid) do
|
356
|
+
yielded << responses.shift.call(test_url_valid)
|
357
|
+
end
|
358
|
+
|
359
|
+
expect(responses).to be_empty
|
360
|
+
expect(yielded).to eq([test_url_valid])
|
361
|
+
end
|
362
|
+
|
336
363
|
it 'should retry when deltas are missing' do
|
337
364
|
allow(subject).to receive(:update_reference_repo) {}
|
338
365
|
expect(subject).to receive(:reference_repo_dir)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Tauraso
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-09-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
@@ -77,8 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
|
-
|
81
|
-
rubygems_version: 2.7.7
|
80
|
+
rubygems_version: 3.0.4
|
82
81
|
signing_key:
|
83
82
|
specification_version: 4
|
84
83
|
summary: git-clone --recursive on steroids!
|