Method: Git::Lib#current_command_version

Defined in:
lib/git/lib.rb

#current_command_version

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



1101
1102
1103
1104
1105
1106
# File 'lib/git/lib.rb', line 1101

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