Skip to content

Add support for fetch options "--force/-f" and "--prune-tags/-P". #563

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 2 commits into from
Apr 13, 2022
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
Next Next commit
Add support for fetch options "--force/-f" and "--prune-tags/-P".
Signed-off-by: Dirk Heinrichs <dheinric@opentext.com>
  • Loading branch information
dhs-rec committed Jan 17, 2022
commit 03fbede918dffc1f9c2c6f30bb8d9a75d80832e7
2 changes: 2 additions & 0 deletions lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,8 @@ def fetch(remote, opts)
arr_opts << opts[:ref] if opts[:ref]
arr_opts << '--tags' if opts[:t] || opts[:tags]
arr_opts << '--prune' if opts[:p] || opts[:prune]
arr_opts << '--prune-tags' if opts[:P] || opts[:'prune-tags']
arr_opts << '--force' if opts[:f] || opts[:force]
arr_opts << '--unshallow' if opts[:unshallow]
arr_opts << '--depth' << opts[:depth] if opts[:depth]

Expand Down