class ChefCLI::Policyfile::LocalCookbook

def cookbook_in_git_repo?

def cookbook_in_git_repo?
  return @cookbook_in_git_repo unless @cookbook_in_git_repo.nil?
  @cookbook_in_git_repo = false
  dot_git = Pathname.new(".git")
  Pathname.new(cookbook_path).ascend do |parent_dir|
    possible_git_dir = parent_dir + dot_git
    if possible_git_dir.exist?
      @cookbook_in_git_repo = true
      break
    end
  end
  @cookbook_in_git_repo
end