Method: Git::Lib#cat_file_type

Defined in:
lib/git/lib.rb

#cat_file_type(object) ⇒ String Also known as: object_type

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.

Get the type for the given object

Parameters:

  • object (String)

    the object to get the type

Returns:

  • (String)

    the object type

Raises:

  • (ArgumentError)

    if object is a string starting with a hyphen

See Also:



456
457
458
459
460
# File 'lib/git/lib.rb', line 456

def cat_file_type(object)
  assert_args_are_not_options('object', object)

  command('cat-file', '-t', object)
end