Method: Git::Lib#cat_file_commit

Defined in:
lib/git/lib.rb

#cat_file_commit(object) ⇒ Hash Also known as: commit_data

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return a hash of commit data

The returned commit data has the following keys:

  • tree [String]
  • parent [Array]
  • author [String] the author name, email, and commit timestamp
  • committer [String] the committer name, email, and merge timestamp
  • message [String] the commit message
  • gpgsig [String] the public signing key of the commit (if signed)

Parameters:

  • object (String)

    the object to get the type

Returns:

  • (Hash)

    commit data

Raises:

  • (ArgumentError)

    if object is a string starting with a hyphen

See Also:



500
501
502
503
504
505
# File 'lib/git/lib.rb', line 500

def cat_file_commit(object)
  assert_args_are_not_options('object', object)

  cdata = command_lines('cat-file', 'commit', object)
  process_commit_data(cdata, object)
end