git-fastclone 1.6.0.pre1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 691025585b07db11da08c4cba7a6a6f8adbc6fa869c4d05cb4fb4abe9f29231c
4
- data.tar.gz: 68d8a58de28932d66eb99f37630bb3bb7a9ee5e23738ed6c9c50550cc72f8a74
3
+ metadata.gz: d6f09d39d485e7f385255ca9c5c60610785536aeff46726e368810183b2e53a5
4
+ data.tar.gz: b0c83767bb00a625abdede0961c60f8144f691685bdfca1bb0c7f397e20cccb2
5
5
  SHA512:
6
- metadata.gz: 7594ba7271f38731ec3522e7af1f067d606ae3dc91860ffb9d0cff6a34dee62d1dee62a8c5a77d206f9fa9ef782ea44893a9542c1ef5ef5163176269a979c8cf
7
- data.tar.gz: 4b0b325e9ca5c756a9efce9e28f6edc7d8a9084616e60de8e33feca4a890a9319946914eece980b192aa4dcc54da362fb93954071820b4008410c6a0abfee62c
6
+ metadata.gz: a9a8f5364a360508d19b6a6ccc3d327eabf18810dc3c1b8276223839e82cc6a62f4767a85def8299fa3c335f852277b56c008fb390b3621226edeb346d22a0f7
7
+ data.tar.gz: a1b64634b2a1a4647f9fa622402d5d9f3221da277f58b52e5da826df93cc919d2b0df19d44d6e00e3d8ae93606f3eacb2522e630f4f94dc80b5f961bbd7e1c09
data/README.md CHANGED
@@ -14,13 +14,13 @@ Why fastclone?
14
14
  Doing lots of repeated checkouts on a specific machine?
15
15
 
16
16
  | Repository | 1st Fastclone | 2nd Fastclone | git clone | cp -R |
17
- | -----------|---------------|---------------|-----------|-------|
18
- | angular.js | 8s | 3s | 6s | 0.5s |
19
- | bootstrap | 26s | 3s | 11s | 0.2s |
20
- | gradle | 25s | 9s | 19s | 6.2s |
21
- | linux | 4m 53s | 1m 6s | 3m 51s | 29s |
22
- | react.js | 18s | 3s | 8s | 0.5s |
23
- | tensorflow | 19s | 4s | 8s | 1.5s |
17
+ | ---------- | ------------- | ------------- | --------- | ----- |
18
+ | angular.js | 8s | 3s | 6s | 0.5s |
19
+ | bootstrap | 26s | 3s | 11s | 0.2s |
20
+ | gradle | 25s | 9s | 19s | 6.2s |
21
+ | linux | 4m 53s | 1m 6s | 3m 51s | 29s |
22
+ | react.js | 18s | 3s | 8s | 0.5s |
23
+ | tensorflow | 19s | 4s | 8s | 1.5s |
24
24
 
25
25
  Above times captured using `time` without verbose mode.
26
26
 
@@ -51,6 +51,8 @@ Usage
51
51
  --lock-timeout N Timeout in seconds to acquire a lock on any reference repo.
52
52
  Default is 0 which waits indefinitely.
53
53
  --pre-clone-hook command An optional command that should be invoked before cloning mirror repo
54
+ --sparse-paths PATHS Comma-separated list of paths for sparse checkout.
55
+ Enables sparse checkout mode using git sparse-checkout.
54
56
 
55
57
  Change the default `REFERENCE_REPO_DIR` environment variable if necessary.
56
58
 
@@ -66,6 +68,11 @@ The hook is invoked with given arguments:
66
68
  1. path to the repo mirror location
67
69
  1. attempt number, 0-indexed
68
70
 
71
+ Sparse checkout support
72
+ -----------------------
73
+
74
+ In passing `--sparse-paths`, git-fastclone will instead perform a sparse checkout, where the passed list of paths will be set up as patterns. This can be useful if you're interested only in a subset of paths in the repository.
75
+
69
76
  How to test?
70
77
  ------------
71
78
  Manual testing:
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version string for git-fastclone
4
4
  module GitFastCloneVersion
5
- VERSION = '1.6.0.pre1'
5
+ VERSION = '1.6.0'
6
6
  end
data/lib/git-fastclone.rb CHANGED
@@ -252,10 +252,10 @@ module GitFastClone
252
252
  clear_clone_dest_if_needed(attempt_number, clone_dest)
253
253
 
254
254
  clone_commands = ['git', 'clone', verbose ? '--verbose' : '--quiet']
255
- clone_commands.push('--no-checkout', '--shared') if sparse_paths
256
- # For sparse checkouts with --shared, clone directly from the local mirror
255
+ # For sparse checkouts, clone directly from the local mirror and skip the actual checkout process
257
256
  # For normal clones, use --reference and clone from the remote URL
258
257
  if sparse_paths
258
+ clone_commands.push('--no-checkout')
259
259
  clone_commands << mirror.to_s << clone_dest
260
260
  else
261
261
  clone_commands << '--reference' << mirror.to_s << url.to_s << clone_dest
@@ -264,7 +264,7 @@ module GitFastClone
264
264
  fail_on_error(*clone_commands, quiet: !verbose, print_on_failure: print_git_errors)
265
265
 
266
266
  # Configure sparse checkout if enabled
267
- configure_sparse_checkout(clone_dest, rev) if sparse_paths
267
+ perform_sparse_checkout(clone_dest, rev) if sparse_paths
268
268
  end
269
269
 
270
270
  # Only checkout if we're changing branches to a non-default branch (for non-sparse clones)
@@ -286,7 +286,7 @@ module GitFastClone
286
286
  end
287
287
  end
288
288
 
289
- def configure_sparse_checkout(clone_dest, rev)
289
+ def perform_sparse_checkout(clone_dest, rev)
290
290
  puts 'Configuring sparse checkout...' if verbose
291
291
 
292
292
  # Initialize sparse checkout with cone mode
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.6.0.pre1
4
+ version: 1.6.0
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: 2025-11-10 00:00:00.000000000 Z
12
+ date: 2025-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize