Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix cherry-picking from an existing remote

Fixes #137
  • Loading branch information...
commit 990db02d8100cf8430312fbfbb6779cd8765e92b 1 parent ce36a32
@mislav mislav authored
Showing with 8 additions and 2 deletions.
  1. +1 −1  lib/hub/commands.rb
  2. +7 −1 test/helper.rb
View
2  lib/hub/commands.rb
@@ -358,7 +358,7 @@ def cherry_pick(args)
args[args.index(ref)] = sha
if remote = project.remote and remotes.include? remote
- args.before ['fetch', remote]
+ args.before ['fetch', remote.to_s]
else
args.before ['remote', 'add', '-f', project.owner, project.git_url(:https => https_protocol?)]
end
View
8 test/helper.rb
@@ -16,7 +16,13 @@ class Test::Unit::TestCase
# shell: hub clone rtomayko/tilt
# test: Hub("clone rtomayko/tilt")
def Hub(args)
- Hub::Runner.new(*args.split(' ').map {|a| a.freeze })
+ runner = Hub::Runner.new(*args.split(' ').map {|a| a.freeze })
+ runner.args.commands.each do |cmd|
+ if Array === cmd and invalid = cmd.find {|c| !c.respond_to? :to_str }
+ raise "#{invalid.inspect} is not a string (in #{cmd.join(' ').inspect})"
+ end
+ end
+ runner
end
# Shortcut for running the `hub` command in a subprocess. Returns
Please sign in to comment.
Something went wrong with that request. Please try again.