Permalink
Browse files

No longer removing and re-adding remotes that already exist

  • Loading branch information...
1 parent eb4e515 commit 0e64f9369f1d8b271608ff81cab58c5a9c084794 @winton committed Oct 4, 2012
Showing with 4 additions and 10 deletions.
  1. +0 −1 features/push.feature
  2. +0 −2 features/qa.feature
  3. +0 −4 features/ready.feature
  4. +4 −3 lib/gitcycle.rb
View
@@ -15,7 +15,6 @@ Scenario: Collaborator
Then output includes
"""
Retrieving branch information from gitcycle.
- Adding remote repo 'config.owner/config.repo'.
Fetching remote 'config.owner'.
Merging remote branch 'master-ticket.id' from 'config.owner/config.repo'.
Pushing branch 'config.owner/master-ticket.id'.
View
@@ -62,7 +62,6 @@ Scenario: QA issue pass w/ issue number
Pushing branch 'qa_master_config.user'.
Retrieving branch information from gitcycle.
Checking out branch 'master'.
- Adding remote repo 'config.owner/config.repo'.
Fetching remote 'config.owner'.
Merging remote branch 'qa_master_config.user' from 'config.owner/config.repo'.
Pushing branch 'master'.
@@ -78,7 +77,6 @@ Scenario: QA issue pass
"""
Retrieving branch information from gitcycle.
Checking out branch 'master'.
- Adding remote repo 'config.owner/config.repo'.
Fetching remote 'config.owner'.
Merging remote branch 'qa_master_config.user' from 'config.owner/config.repo'.
Pushing branch 'master'.
View
@@ -12,7 +12,6 @@ Scenario: Ready issue
Then output includes
"""
Retrieving branch information from gitcycle.
- Adding remote repo 'config.owner/config.repo'.
Fetching remote 'config.owner'.
Merging remote branch 'master' from 'config.owner/config.repo'.
Adding remote repo 'config.user/config.repo'.
@@ -48,10 +47,8 @@ Scenario: Reopen pull request
Then output includes
"""
Retrieving branch information from gitcycle.
- Adding remote repo 'config.owner/config.repo'.
Fetching remote 'config.owner'.
Merging remote branch 'master' from 'config.owner/config.repo'.
- Adding remote repo 'config.user/config.repo'.
Fetching remote 'config.user'.
Merging remote branch 'master-ticket.id' from 'config.user/config.repo'.
Creating GitHub pull request.
@@ -79,7 +76,6 @@ Scenario: Collaborator
Then output includes
"""
Retrieving branch information from gitcycle.
- Adding remote repo 'config.owner/config.repo'.
Fetching remote 'config.owner'.
Merging remote branch 'some_branch' from 'config.owner/gitcycle_test'.
Pushing branch 'config.owner/some_branch'.
View
@@ -536,9 +536,10 @@ def add_remote_and_fetch(options={})
unless $remotes[owner]
$remotes[owner] = true
- puts "Adding remote repo '#{owner}/#{repo}'.\n".green
- run("git remote rm #{owner}") if remotes(:match => owner)
- run("git remote add #{owner} git@github.com:#{owner}/#{repo}.git")
+ unless remotes(:match => owner)
+ puts "Adding remote repo '#{owner}/#{repo}'.\n".green
+ run("git remote add #{owner} git@github.com:#{owner}/#{repo}.git")
+ end
puts "Fetching remote '#{owner}'.\n".green
run("git fetch -q #{owner}")

0 comments on commit 0e64f93

Please sign in to comment.