Permalink
Browse files

Push current branch to origin if no branch found remotely

  • Loading branch information...
1 parent 0a263b6 commit 245d4c555ee1512e0c456db8e0ec07d0296150ac @winton committed Oct 17, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/gitcycle.rb
View
8 lib/gitcycle.rb
@@ -316,9 +316,13 @@ def push(*args)
if branch['collab']
puts "\nPushing branch '#{branch['home']}/#{branch['name']}'.\n".green
run("git push #{branch['home']} #{branch['name']} -q")
- else
+ elsif branch
puts "\nPushing branch 'origin/#{branch['name']}'.\n".green
run("git push origin #{branch['name']} -q")
+ else
+ current_branch = branches(:current => true)
+ puts "\nPushing branch 'origin/#{current_branch}'.\n".green
+ run("git push origin #{current_branch} -q")
end
end
@@ -451,7 +455,7 @@ def ready(*issues)
# Recreate pull request if force == true
force = branch['labels'] && branch['labels'].include?('Pass')
force ||= branch['state'] && branch['state'] == 'closed'
-
+
branch = create_pull_request(branch, force)
end

0 comments on commit 245d4c5

Please sign in to comment.