class ChefCLI::Policyfile::ComparisonBase::Git

def lock

def lock
  git_cmd.run_command
  git_cmd.error!
  FFI_Yajl::Parser.parse(git_cmd.stdout)
rescue Mixlib::ShellOut::ShellCommandFailed
  raise GitError, "Git command `#{git_cmd_string}` failed with message: #{git_cmd.stderr.chomp}"
rescue FFI_Yajl::ParseError => e
  raise MalformedLockfile, "Invalid JSON in lockfile at git ref '#{ref}' at path '#{policyfile_lock_relpath}':\n  #{e.message}"
end