src/commands.js
function parseVersion(str) {
  var match = /git version ([0-9\.]+)/.exec(str);

  if (match) {
    return match[1];
  } else {
    throw new Error('Unable to parse version response', str);
  }
}
function parseVersion(str) {
  var match = /git version ([0-9\.]+)/.exec(str);

  if (match) {
    return match[1];
  } else {
    throw new Error('Unable to parse version response', str);
  }
}
function parseVersion ( str ) { var match = / git version ([0-9\.]+) / . exec ( str ) ; if ( match ) { return match [ 1 ] ; } else { throw new Error ( 'Unable to parse version response' , str ) ; } }
Parses the git version
@private
@param {Resolvable|String} str The 'git version' command output
@throws {Error} parsing error
@returns {String} the version number
Parses the git version