From 38b40c0f50f27ed3be89212803490264b63f8f86 Mon Sep 17 00:00:00 2001 From: Jorge Date: Sat, 30 Oct 2010 21:31:59 +0200 Subject: [PATCH] Making git repos uri non greedy so it works with uris with / --- lib/homesick.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/homesick.rb b/lib/homesick.rb index f439542..13976d5 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -27,7 +27,7 @@ class Homesick < Thor elsif uri =~ GITHUB_NAME_REPO_PATTERN destination = Pathname.new($1) git_clone "git://github.com/#{$1}.git", :destination => destination - elsif uri =~ /\/([^\/]*)(\.git)?\Z/ + elsif uri =~ /\/([^\/]*?)(\.git)?\Z/ destination = Pathname.new($1) git_clone uri elsif uri =~ /[^:]+:([^:]+)(\.git)?\Z/ @@ -93,7 +93,7 @@ class Homesick < Thor castle = Pathname.new(castle) file = Pathname.new(file) check_castle_existance(castle, 'track') - + absolute_path = file.expand_path castle_path = castle_dir(castle) mv absolute_path, castle_path