Method: Git::Lib#current_command_version

Defined in:
lib/git/lib.rb

#current_command_version

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.

returns the current version of git, as an Array of Fixnums.



1640
1641
1642
1643
1644
1645
# File 'lib/git/lib.rb', line 1640

def current_command_version
  output = command('version')
  version = output[/\d+(\.\d+)+/]
  version_parts = version.split('.').collect(&:to_i)
  version_parts.fill(0, version_parts.length...3)
end