bugs: force deletion of tmp branch regardless of its state

parent 3c020ec7
Pipeline #6297 failed with stages
in 2 minutes and 21 seconds
......@@ -180,13 +180,13 @@ class BugsHelper {
async checkoutFix(): Promise<void> {
const c = this.options.commit
if (c == undefined) return
if (/tmp/.test(git.run(c, "branch"))) git.run(c, "branch --delete tmp")
if (/tmp/.test(git.run(c, "branch"))) git.run(c, "branch -D tmp")
git.run(c, "checkout --quiet -b tmp master")
if (/Merge bugfixes/.test(git.run(c, "log --oneline -1")))
git.run(c, "revert -m 1 HEAD")
git.run(c, "merge --no-ff -m 'Merge upstream' upstream")
git.run(c, "merge --no-ff -m 'Merge upstream' upstream/master")
if (/bugfixes/.test(git.run(c, "branch")))
git.run(c, "branch --delete bugfixes")
git.run(c, "branch -D bugfixes")
git.run(c, "checkout --quiet -b bugfixes")
}
......@@ -195,7 +195,7 @@ class BugsHelper {
if (c == undefined) return
git.run(c, "checkout --quiet tmp")
git.run(c, "merge --no-ff -m 'Merge bugfixes' bugfixes")
git.run(c, "branch --delete bugfixes")
git.run(c, "branch -D bugfixes")
if (!git.test(c, "diff --quiet tmp master")) {
git.run(c, "checkout --quiet master")
git.run(c, "merge --ff-only tmp")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment