Skip to content

Add --filter to Git.clone for partial clones #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prefer separate args '--filter tree:0' instead of '--filter=tree:0'
  • Loading branch information
jcouball committed Apr 1, 2023
commit 0007559b9b76c47fdfb0002f53f75d173c94d67c
2 changes: 1 addition & 1 deletion lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def clone(repository_url, directory, opts = {})
arr_opts << '--bare' if opts[:bare]
arr_opts << '--branch' << opts[:branch] if opts[:branch]
arr_opts << '--depth' << opts[:depth].to_i if opts[:depth] && opts[:depth].to_i > 0
arr_opts << "--filter=#{opts[:filter]}" if opts[:filter]
arr_opts << '--filter' << opts[:filter] if opts[:filter]
Array(opts[:config]).each { |c| arr_opts << '--config' << c }
arr_opts << '--origin' << opts[:remote] || opts[:origin] if opts[:remote] || opts[:origin]
arr_opts << '--recursive' if opts[:recursive]
Expand Down