Skip to content

Commit

Permalink
OK, this *seems* to be the right regexp for getting Github username/r…
Browse files Browse the repository at this point in the history
…epo from various Git remote URLs
  • Loading branch information
karmi committed Apr 13, 2009
1 parent 1fdadb6 commit f854df6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/githubber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f854df6

Please sign in to comment.