Class: GitFame::Diff

Inherits:
Base
  • Object
show all
Includes:
Enumerable
Defined in:
lib/git_fame/diff.rb

Instance Method Summary collapse

Instance Method Details

#each {|Hash| ... } ⇒ void

This method returns an undefined value.

Yields:

  • (Hash)


14
15
16
17
18
19
20
21
22
23
# File 'lib/git_fame/diff.rb', line 14

def each(&)
  tree.walk(:preorder).each do |root, entry|
    case entry
    in { type: :blob, name: file, oid: }
      Rugged::Blame.new(repo, root + file, newest_commit: commit).each(&)
    in { type: type, name: file }
      say("Ignore type [%s] in for %s", type, root + file)
    end
  end
end