Skip to content

Commit

Permalink
Add --all flag to fetch method
Browse files Browse the repository at this point in the history
The fix for CVE-2022-25648 broke a workflow for us by removing the ability
to fetch all remotes.

This adds --all to the list of available flags for the #fetch method. It does
not add `:a` as an alternative flag, as `git fetch -a` and `git fetch --all` are
not the same thing.

Signed-off-by: Matthew Riedel <matthew.riedel@fluxfederation.com>
  • Loading branch information
matthewriedel-flux committed May 2, 2022
1 parent 45b467c commit 0340550
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/git/lib.rb
Expand Up @@ -877,6 +877,7 @@ def tag(name, *opts)

def fetch(remote, opts)
arr_opts = []
arr_opts << '--all' if opts[:all]
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']
Expand Down

0 comments on commit 0340550

Please sign in to comment.