Permalink
Browse files

Fixing error on checkout_remote_branch when user chooses not to overw…

…rite branch
  • Loading branch information...
winton committed Jan 25, 2012
1 parent aa4dcd5 commit 98e41a95bae3c33430d4dccbcfefb84d1679a3f9
Showing with 13 additions and 3 deletions.
  1. +8 −1 README.md
  2. +5 −2 lib/gitcycle.rb
View
@@ -103,4 +103,11 @@ Todo
* Add conflict check when calling "qa pass [ticket]"
* Instead of detecting CONFLICT, use error status $? != 0
* Add comment on lighthouse with issue URL
-* Label issues with ticket milestone?
+* Label issues with ticket milestone?
+
+Details
+-------
+
+### gitc + ticket URL
+
+*
View
@@ -376,9 +376,12 @@ def checkout_remote_branch(options={})
target = options[:target] || branch
if branches(:match => target)
- unless yes?("You already have a branch called '#{target}'. Overwrite?")
+ if yes?("You already have a branch called '#{target}'. Overwrite?")
+ run("git push origin :#{target}")
+ run("branch -D #{target}")
+ else
run("git checkout #{target}")
- run("git pull #{owner} #{target}")
+ run("git pull origin #{target}")
return
end
end

0 comments on commit 98e41a9

Please sign in to comment.