Sha256: 8f2c9951115c42ad6047d4660c64e6bc76184180cf32be8937e7e4f95ed4e9d8

Contents?: true

Size: 491 Bytes

Versions: 1

Compression:

Stored size: 491 Bytes

Contents

module OhlohScm::Adapters
  class GitSvnAdapter < AbstractAdapter
    def cat_file(commit, diff)
      cat(git_commit(commit), diff.path)
    end

    def cat_file_parent(commit, diff)
      cat("#{ git_commit(commit) }^", diff.path)
    end

    private

    def cat(revision, file_path)
      run("cd #{self.url} && git show #{ revision }:'#{ file_path }'").strip
    end

    def git_commit(commit)
      run("cd #{self.url} && git svn find-rev r#{commit.token}").strip
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ohloh_scm-2.4.0 lib/ohloh_scm/adapters/git_svn/cat_file.rb