# File lib/rugged_adapter/git_layer_rugged.rb, line 198 def checkout(path, ref = 'HEAD', options = {}) path = path.nil? ? path : [path] options = options.merge({:paths => path, :strategy => :force}) if ref == 'HEAD' @repo.checkout_head(options) else ref = "refs/heads/#{ref}" unless ref =~ /^refs\/heads\// @repo.checkout_tree(sha_from_ref(ref), options) end end