Sha256: 66d75dbf3a8e10accc19a1f62ff9b617aaf18ed0a39635d8f21592012b0a03bd
Contents?: true
Size: 477 Bytes
Versions: 37
Compression:
Stored size: 477 Bytes
Contents
module OhlohScm::Adapters class GitAdapter < AbstractAdapter def head_token run("git ls-remote --heads '#{url}' #{branch_name}") =~ /^(^[a-z0-9]{40})\s+\S+$/ $1 end def head verbose_commit(head_token) end def parent_tokens(commit) run("cd '#{url}' && git cat-file commit #{commit.token} | grep ^parent | cut -f 2 -d ' '").split("\n") || [] end def parents(commit) parent_tokens(commit).collect { |token| verbose_commit(token) } end end end
Version data entries
37 entries across 37 versions & 1 rubygems