Permalink
Browse files

OK, this *seems* to be the right regexp for getting Github username/r…

…epo from various Git remote URLs
  • Loading branch information...
1 parent 3f6f2d9 commit cdb0ca888996a47ceb4bac63d68dfc3acc83af98 @karmi committed Apr 13, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 vendor/githubber.rb
View
@@ -10,7 +10,7 @@ def initialize(working_copy_path)
remotes = %x[cd #{working_copy_path}; git remote -v 2>&1] rescue nil
return nil unless $?.success?
origin = remotes.select { |l| l =~ /^origin.*/ }.first
- @user, @repo = origin.to_s.scan(/\:(\S*)\/(\S*)\.git/).first
+ @user, @repo = origin.to_s.scan(/\S+[:\/]+?(\S+)?\/(\S+)?\.git$/).first
end
# Returns revision info

0 comments on commit cdb0ca8

Please sign in to comment.