From 0340550cef83baa6a3a45a163a6acf3589cee666 Mon Sep 17 00:00:00 2001 From: Matthew Riedel Date: Tue, 3 May 2022 08:40:50 +1200 Subject: [PATCH] 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 --- lib/git/lib.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 5bf2e455..da08267e 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -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']