Skip to content

Commit 0340550

Browse files
Add --all flag to fetch method
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>
1 parent 45b467c commit 0340550

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/git/lib.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ def tag(name, *opts)
877877

878878
def fetch(remote, opts)
879879
arr_opts = []
880+
arr_opts << '--all' if opts[:all]
880881
arr_opts << '--tags' if opts[:t] || opts[:tags]
881882
arr_opts << '--prune' if opts[:p] || opts[:prune]
882883
arr_opts << '--prune-tags' if opts[:P] || opts[:'prune-tags']

0 commit comments

Comments
 (0)