Sha256: 8c9f8721c17063af20d79f86cc62a63d5fd92ef337ad3f9c955fc0736826fb91

Contents?: true

Size: 475 Bytes

Versions: 37

Compression:

Stored size: 475 Bytes

Contents

module Gitlab
  module Git
    class Blame
      attr_accessor :repository, :sha, :path

      def initialize(repository, sha, path)
        @repository, @sha, @path = repository, sha, path
      end

      def each
        raw_blame = Grit::Blob.blame(repository.raw, sha, path)

        raw_blame.each do |commit, lines|
          next unless commit

          commit = Gitlab::Git::Commit.new(commit)
          yield(commit, lines)
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
gitlab_git-6.2.2 lib/gitlab_git/blame.rb
gitlab_git-6.2.1 lib/gitlab_git/blame.rb
gitlab_git-6.2.0 lib/gitlab_git/blame.rb
gitlab_git-6.1.0 lib/gitlab_git/blame.rb
gitlab_git-6.0.1 lib/gitlab_git/blame.rb
gitlab_git-6.0.0 lib/gitlab_git/blame.rb
gitlab_git-5.9.0 lib/gitlab_git/blame.rb
gitlab_git-5.8.0 lib/gitlab_git/blame.rb
gitlab_git-5.7.1 lib/gitlab_git/blame.rb
gitlab_git-5.7.0 lib/gitlab_git/blame.rb
gitlab_git-5.6.0 lib/gitlab_git/blame.rb
gitlab_git-5.5.0 lib/gitlab_git/blame.rb
gitlab_git-5.4.0 lib/gitlab_git/blame.rb
gitlab_git-5.3.0 lib/gitlab_git/blame.rb
gitlab_git-5.2.0 lib/gitlab_git/blame.rb
gitlab_git-5.1.0 lib/gitlab_git/blame.rb
gitlab_git-5.0.0 lib/gitlab_git/blame.rb
gitlab_git-4.1.0 lib/gitlab_git/blame.rb
gitlab_git-4.0.0 lib/gitlab_git/blame.rb
gitlab_git-4.0.0.pre lib/gitlab_git/blame.rb