class ChefCLI::Command::Diff
def parse_git_comparison(git_ref)
def parse_git_comparison(git_ref) if git_ref.include?("...") old_ref, new_ref, *extra = git_ref.split("...") @old_base, @new_base = [old_ref, new_ref].map do |r| Policyfile::ComparisonBase::Git.new(r, policyfile_lock_relpath) end unless extra.empty? ui.err("Unable to parse git comparison `#{git_ref}`. Only 2 references can be specified.") return false end else @old_base = Policyfile::ComparisonBase::Git.new(git_ref, policyfile_lock_relpath) @new_base = Policyfile::ComparisonBase::Local.new(policyfile_lock_relpath) end true end