]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/libraries/git.rb
Use backports for osm2pgsql on debian
[chef.git] / cookbooks / chef / libraries / git.rb
index a5aa58c96a5ecac93856818341e38759a1713d1e..176613d0a794979e30feea741d2fa21cb7c8dc82 100644 (file)
@@ -1,16 +1,13 @@
-class Chef
-  class Provider
-    class Git
-      def remote_resolve_reference
-        Chef::Log.debug("#{@new_resource} resolving remote reference")
-        command = git('ls-remote', @new_resource.repository, @new_resource.revision, "#{@new_resource.revision}^{}")
-        @resolved_reference = shell_out!(command, run_options).stdout.split("\n").last
-        if  @resolved_reference =~ /^([0-9a-f]{40})\s+(\S+)/
-          $1
-        else
-          nil
-        end
+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
       end
     end
   end
 end
+
+Chef::Provider::Git.prepend(OpenStreetMap::Provider::Git)