Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-04 00:08:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-04 00:08:23 +0300
commitfc92738a0245f1be88250448bebd9c20e9849444 (patch)
tree5e66f8a08c2b5dfa9cd76d28b0fe0a6a409ca616 /bin
parent7484304eaa266f22f048a76d490494b6337c9555 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'bin')
-rwxr-xr-xbin/secpick12
1 files changed, 4 insertions, 8 deletions
diff --git a/bin/secpick b/bin/secpick
index 4d056ceecaf..517465d3f5d 100755
--- a/bin/secpick
+++ b/bin/secpick
@@ -25,12 +25,8 @@ module Secpick
@options[:try] == true
end
- def original_branch
- @options[:branch].strip
- end
-
def source_branch
- branch = "#{original_branch}-#{@options[:version]}"
+ branch = "#{@options[:branch]}-#{@options[:version]}"
branch.prepend("#{BRANCH_PREFIX}-") unless branch.start_with?("#{BRANCH_PREFIX}-")
branch.freeze
end
@@ -44,7 +40,7 @@ module Secpick
"git checkout -B #{source_branch} #{@options[:remote]}/#{stable_branch} --no-track",
"git cherry-pick #{@options[:sha]}",
"git push #{@options[:remote]} #{source_branch}",
- "git checkout #{original_branch}"]
+ "git checkout #{@options[:branch]}"]
end
def gitlab_params
@@ -121,8 +117,8 @@ module Secpick
parser.parse!
- options[:sha] ||= `git rev-parse HEAD`
- options[:branch] ||= `git rev-parse --abbrev-ref HEAD`
+ options[:sha] ||= `git rev-parse HEAD`.strip
+ options[:branch] ||= `git rev-parse --abbrev-ref HEAD`.strip
options[:remote] ||= DEFAULT_REMOTE
nil_options = options.select {|_, v| v.nil? }