Minor cleanup
This commit is contained in:
parent
aee9f0eccd
commit
a3142b59d8
@ -97,7 +97,7 @@ class Repository::GitRemote < Repository::Git
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Dir.exists? clone_path
|
if Dir.exists? clone_path
|
||||||
existing_repo_remote, err, status = Open3::capture3("git", "--git-dir", clone_path, "config", "--get", "remote.origin.url")
|
existing_repo_remote, status = Open3::capture2("git", "--git-dir", clone_path, "config", "--get", "remote.origin.url")
|
||||||
return "Unable to run: git --git-dir #{clone_path} config --get remote.origin.url" unless status.success?
|
return "Unable to run: git --git-dir #{clone_path} config --get remote.origin.url" unless status.success?
|
||||||
|
|
||||||
unless two_remotes_equal(existing_repo_remote, clone_url)
|
unless two_remotes_equal(existing_repo_remote, clone_url)
|
||||||
@ -119,7 +119,10 @@ class Repository::GitRemote < Repository::Git
|
|||||||
'GitRemote'
|
'GitRemote'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: first validate git URL and display error message
|
||||||
def parse(url)
|
def parse(url)
|
||||||
|
url.strip!
|
||||||
|
|
||||||
ret = {}
|
ret = {}
|
||||||
# start with http://github.com/evolvingweb/git_remote or git@git.ewdev.ca:some/repo.git
|
# start with http://github.com/evolvingweb/git_remote or git@git.ewdev.ca:some/repo.git
|
||||||
ret[:url] = url
|
ret[:url] = url
|
||||||
|
Loading…
Reference in New Issue
Block a user