Module: Helpers
- Included in:
- GitPublish, GitUnpublish
- Defined in:
- lib/git-publish/helpers.rb
Instance Method Summary collapse
Instance Method Details
#init(origin = nil, remote_branch_name = nil) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/git-publish/helpers.rb', line 4 def init(origin=nil, remote_branch_name=nil) git_dir = `git rev-parse --git-dir` repo = Grit::Repo.new(File.dirname(git_dir)) @local_branch_name = repo.head.name @remote_branch_name ||= @local_branch_name @origin ||= "origin" end |