class Avm::Git::Commit

def diff_tree_execute

def diff_tree_execute
  args = []
  args << '--root' if root_child?
  args << sha1
  git.command(*::Avm::Git::Commit::DiffTreeLine::GIT_COMMAND_ARGS, *args).execute!
end

def files_size_uncached

def files_size_uncached
  files.inject(0) { |a, e| a + e.dst_size }
end

def files_uncached

def files_uncached
  diff_tree_execute.each_line.map { |line| ::Avm::Git::Commit::File.new(git, line) }
end

def format(format)

def format(format)
  git.command('--no-pager', 'log', '-1', "--pretty=format:#{format}", sha1).execute!.strip
end

def initialize(git, sha1)

Parameters:
  • git (EacGit::Local) --
def initialize(git, sha1)
  @git = git
  @sha1 = sha1
end

def root_child?

def root_child?
  format('%P').blank?
end