From 69f2ac5acf9432a19af42037e6a89e90d2cf1fe1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thibaut=20VAR=C3=88NE?= Date: Tue, 25 Oct 2022 21:58:53 +0200 Subject: [PATCH] phase1: gitcheckout workaround is no longer needed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit And it has adverse effects (slows/breaks Git step). Signed-off-by: Thibaut VARÈNE --- phase1/master.cfg | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/phase1/master.cfg b/phase1/master.cfg index 86d858d..61de307 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -605,19 +605,14 @@ for target in targets: hideStepIf = lambda r, s: r==results.FAILURE, )) - # Workaround bug when switching from a checked out tag back to a branch - # Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017809.html - factory.addStep(ShellCommand( - name = "gitcheckout", - description = "Ensure that Git HEAD is sane", - command = Interpolate("if [ -d .git ]; then git checkout -f %(prop:branch)s && git branch --set-upstream-to origin/%(prop:branch)s || rm -fr .git; else exit 0; fi"), - haltOnFailure = True)) - # check out the source # Git() runs: # if repo doesn't exist: 'git clone repourl' - # method 'clean' runs 'git clean -d -f', method fresh runs 'git clean -d -f x'. Only works with mode='full' - # 'git fetch -t repourl branch; git reset --hard revision' + # method 'clean' runs 'git clean -d -f', method fresh runs 'git clean -f -f -d -x'. Only works with mode='full' + # git cat-file -e + # git checkout -f + # git checkout -B + # git rev-parse HEAD factory.addStep(Git( name = "git", repourl = repo_url, @@ -645,7 +640,7 @@ for target in targets: )) # Verify that Git HEAD points to a tag or branch - # Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017809.html + # Ref: https://web.archive.org/web/20190729224316/http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017809.html factory.addStep(ShellCommand( name = "gitverify", description = "Ensure that Git HEAD is pointing to a branch or tag", -- 2.30.2