Method: Git::Lib#diff_stats

Defined in:
lib/git/lib.rb

#diff_stats(obj1 = 'HEAD', obj2 = nil, opts = {})

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.



916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/git/lib.rb', line 916

def diff_stats(obj1 = 'HEAD', obj2 = nil, opts = {})
  assert_args_are_not_options('commit or commit range', obj1, obj2)
  ArgsBuilder.validate!(opts, DIFF_STATS_OPTION_MAP)

  args = build_args(opts, DIFF_STATS_OPTION_MAP)
  args.push(obj1, obj2).compact!

  if (pathspecs = normalize_pathspecs(opts[:path_limiter], 'path limiter'))
    args.push('--', *pathspecs)
  end

  output_lines = command_lines('diff', *args)
  parse_diff_stats_output(output_lines)
end