Restartable `secpick` when there are cherry-pick conflicts
Problem
The excellent secpick script is a real time-saver. However, if there are cherry-pick errors, it continues to the next step, which then fails, and it is not possible to restart the script AFAIK.
Proposal
Add a restart command, which will pick up processing after the cherry-pick is manually completed.
bin/secpick -c continue
Sample cherry-pick conflict (some filenames changed)
~/src/gitlab/local-gdk/gitlab security-example
❯ bin/secpick -v 13.4
Auto-merging db/structure.sql
Auto-merging config/sidekiq_queues.yml
Auto-merging config/initializers/1_settings.rb
CONFLICT (content): Merge conflict in config/initializers/1_settings.rb
Removing app/workers/create_example_worker.rb
Auto-merging app/workers/all_queues.yml
Auto-merging app/services/example/create_service.rb
CONFLICT (modify/delete): app/services/example/base_service.rb deleted in HEAD and modified in 84987c18acc... Prevent abuse of ExampleWorker. Version 84987c18acc... Prevent abuse of ExampleWorker of app/services/example/base_service.rb left in tree.
Auto-merging app/models/example.rb
From gitlab.com:gitlab-org/security/gitlab
* branch 13-4-stable-ee -> FETCH_HEAD
Switched to a new branch 'security-example-13-4'
error: could not apply 84987c18acc... Prevent abuse of ExampleWorker
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
~/src/gitlab/local-gdk/gitlab security-example-worker-13-4* cherry 10s
Edited by Sean Carroll