Making git repos uri non greedy so it works with uris with /

This commit is contained in:
Jorge
2010-10-30 21:31:59 +02:00
committed by thilko
parent 54b2b9b339
commit 2667053fde

View File

@@ -33,7 +33,7 @@ class Homesick < Thor
elsif uri =~ GITHUB_NAME_REPO_PATTERN elsif uri =~ GITHUB_NAME_REPO_PATTERN
destination = Pathname.new($1) destination = Pathname.new($1)
git_clone "git://github.com/#{$1}.git", :destination => destination git_clone "git://github.com/#{$1}.git", :destination => destination
elsif uri =~ /\/([^\/]*)(\.git)?\Z/ elsif uri =~ /\/([^\/]*?)(\.git)?\Z/
destination = Pathname.new($1) destination = Pathname.new($1)
git_clone uri git_clone uri
elsif uri =~ /[^:]+:([^:]+)(\.git)?\Z/ elsif uri =~ /[^:]+:([^:]+)(\.git)?\Z/