Permalink
Browse files

Fix clone to pass the new spec

  • Loading branch information...
kballard committed May 27, 2008
1 parent 93771bc commit c2f4e67032909828a45ddcbbf88364c9b6ca9d3d
Showing with 4 additions and 1 deletion.
  1. +4 −1 commands/commands.rb
View
@@ -72,7 +72,10 @@
flags :ssh => "Clone using the git@github.com style url."
command :clone do |user, repo, dir|
die "Specify a user to pull from" if user.nil?
- user, repo = user.split('/') unless repo
+ if user.include? ?/
+ die "Expected user/repo dir, given extra argument" if dir
+ (user, repo), dir = [user.split('/', 2), repo]
+ end
die "Specify a repo to pull from" if repo.nil?
if options[:ssh]

0 comments on commit c2f4e67

Please sign in to comment.