Sha256: b59ea049be89a2f894574333deed3a0c7fd49a4894688f8401b0582a1322b857

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 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.3 lib/ohloh_scm/adapters/git_svn/cat_file.rb