summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicklegr <addr.for+github@gmail.com>2015-03-25 21:05:06 +0900
committernicklegr <addr.for+github@gmail.com>2015-03-25 21:05:06 +0900
commita30011372f9608f688cb490c584e8f380b54c211 (patch)
tree55f119aafdeca7845cf3029bc913b0f8df1de120
parentd554070a62b0bc34ab2289d4a071b950df4d5485 (diff)
downloadgitlab-ce-a30011372f9608f688cb490c584e8f380b54c211.tar.gz
Reset parking branch to HEAD everytime
* Reduces overhead of git checkout
-rw-r--r--lib/gitlab/satellite/satellite.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/gitlab/satellite/satellite.rb b/lib/gitlab/satellite/satellite.rb
index 70125d539da..f24c6199c44 100644
--- a/lib/gitlab/satellite/satellite.rb
+++ b/lib/gitlab/satellite/satellite.rb
@@ -99,11 +99,7 @@ module Gitlab
heads = repo.heads.map(&:name)
# update or create the parking branch
- if heads.include? PARKING_BRANCH
- repo.git.checkout({}, PARKING_BRANCH)
- else
- repo.git.checkout(default_options({ b: true }), PARKING_BRANCH)
- end
+ repo.git.checkout(default_options({ B: true }), PARKING_BRANCH)
# remove the parking branch from the list of heads ...
heads.delete(PARKING_BRANCH)