From: Tom Hughes Date: Tue, 5 May 2020 17:40:36 +0000 (+0100) Subject: Monkey patch git provider to add --force when fetching tags X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/a74b0487fe7b9ca6d7220fa2d31bb188e10aa838?ds=sidebyside Monkey patch git provider to add --force when fetching tags --- diff --git a/cookbooks/chef/libraries/git.rb b/cookbooks/chef/libraries/git.rb new file mode 100644 index 000000000..ae797fc00 --- /dev/null +++ b/cookbooks/chef/libraries/git.rb @@ -0,0 +1,13 @@ +module OpenStreetMap + module Provider + module Git + def git(*args, **run_opts) + args.push("--force") if args.first == "fetch" && args.last == "--tags" + + super(args, run_opts) + end + end + end +end + +Chef::Provider::Git.prepend(OpenStreetMap::Provider::Git)