Class: Moku::SCM::Git::LocalResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/moku/scm/git/local_resolver.rb

Overview

Git ref resolver for local repositories.

Instance Method Summary collapse

Constructor Details

#initialize(system_runner) ⇒ LocalResolver


9
10
11
# File 'lib/moku/scm/git/local_resolver.rb', line 9

def initialize(system_runner)
  @system_runner = system_runner
end

Instance Method Details

#sha(path, commitish) ⇒ Object


13
14
15
16
17
# File 'lib/moku/scm/git/local_resolver.rb', line 13

def sha(path, commitish)
  system_runner.run("git -C #{path} rev-parse #{commitish}")
    .output
    .strip
end