Class: EacGit::Local::Commit
- Inherits:
-
Object
- Object
- EacGit::Local::Commit
show all
- Defined in:
- lib/eac_git/local/commit.rb,
lib/eac_git/local/commit/archive.rb,
lib/eac_git/local/commit/changed_file.rb,
lib/eac_git/local/commit/diff_tree_line.rb
Defined Under Namespace
Modules: Archive
Classes: ChangedFile, DiffTreeLine
Constant Summary
collapse
- FIELDS =
{
author_name: '%an', author_email: '%ae', author_date: '%ai',
subject: '%s',
author_all: '%an <%ae>, %ai',
commiter_name: '%cn', commiter_email: '%ce', commiter_date: '%ci',
commiter_all: '%cn <%ce>, %ci'
}.freeze
Instance Method Summary
collapse
Instance Method Details
#changed_files_size_uncached ⇒ Object
35
36
37
|
# File 'lib/eac_git/local/commit.rb', line 35
def changed_files_size_uncached
changed_files.inject(0) { |a, e| a + e.dst_size }
end
|
#changed_files_uncached ⇒ Object
29
30
31
32
33
|
# File 'lib/eac_git/local/commit.rb', line 29
def changed_files_uncached
diff_tree_execute.each_line.map do |line|
::EacGit::Local::Commit::ChangedFile.new(self, line)
end
end
|
21
22
23
|
# File 'lib/eac_git/local/commit.rb', line 21
def format(format)
repo.command('--no-pager', 'log', '-1', "--pretty=format:#{format}", hash).execute!.strip
end
|
#root_child? ⇒ Boolean
39
40
41
|
# File 'lib/eac_git/local/commit.rb', line 39
def root_child?
format('%P').blank?
end
|