stats method

Future<ShortStatDto> stats(
  1. String localCheckoutDirectory,
  2. String oldTag,
  3. dynamic newTag
)

git --shortstat oldTag newTag to fetch statistics related to insertions, deletions and number of changed files between two tags. In case of success will return a ShortStatDto object with the available data, whereas an object with the default values.

Implementation

Future<ShortStatDto> stats(
    String localCheckoutDirectory, String oldTag, newTag) async {
  String rawResult = "";

  ProcessResult processResult = await git_service.runGit(
      ['diff', '--shortstat', oldTag, newTag],
      throwOnError: false,
      echoOutput: false,
      processWorkingDir: localCheckoutDirectory);

  rawResult = processResult.stdout;
  return RwGitParser.parseGitShortStatStdout(rawResult);
}