Class: Librarian::Source::Git::Repository
- Inherits:
-
Object
- Object
- Librarian::Source::Git::Repository
- Defined in:
- lib/librarian/puppet/source/git.rb
Instance Method Summary collapse
Instance Method Details
#hash_from(remote, reference) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/librarian/puppet/source/git.rb', line 8 def hash_from(remote, reference) branch_names = remote_branch_names[remote] if branch_names.include?(reference) reference = "#{remote}/#{reference}" end command = %W(rev-parse #{reference}^{commit} --quiet) run!(command, :chdir => true).strip end |