]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/libraries/git.rb
Add render.openstreetmap.org as an alias on render servers
[chef.git] / cookbooks / chef / libraries / git.rb
1 class Chef
2   class Provider
3     class Git
4       def remote_resolve_reference
5         Chef::Log.debug("#{@new_resource} resolving remote reference")
6         command = git('ls-remote', @new_resource.repository, @new_resource.revision, "#{@new_resource.revision}^{}")
7         @resolved_reference = shell_out!(command, run_options).stdout.split("\n").last
8         if  @resolved_reference =~ /^([0-9a-f]{40})\s+(\S+)/
9           $1
10         else
11           nil
12         end
13       end
14     end
15   end
16 end