lib/atlassian/stash/git.rb in atlassian-stash-0.2.0 vs lib/atlassian/stash/git.rb in atlassian-stash-0.3.0
- old
+ new
@@ -13,11 +13,11 @@
def get_remotes
%x(git remote -v)
end
- def get_remote_url
- origin = get_remotes.split("\n").collect { |r| r.strip }.grep(/^origin.*\(push\)$/).first
+ def get_remote_url(remote = 'origin')
+ origin = get_remotes.split("\n").collect { |r| r.strip }.grep(/^#{remote}.*\(push\)$/).first
URI.extract(origin).first
end
def ensure_within_git!
if is_in_git_repository?