diff options
author | nicklegr <addr.for+github@gmail.com> | 2015-03-25 15:05:06 +0300 |
---|---|---|
committer | nicklegr <addr.for+github@gmail.com> | 2015-03-25 15:05:06 +0300 |
commit | a30011372f9608f688cb490c584e8f380b54c211 (patch) | |
tree | 55f119aafdeca7845cf3029bc913b0f8df1de120 /lib | |
parent | d554070a62b0bc34ab2289d4a071b950df4d5485 (diff) |
Reset parking branch to HEAD everytime
* Reduces overhead of git checkout
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/satellite/satellite.rb | 6 |
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) |