From b5329b2c2b6f01a4faa90e63468ec6b5ad2487d8 Mon Sep 17 00:00:00 2001 From: Jan Eglinger Date: Mon, 7 Feb 2022 16:27:49 +0100 Subject: [PATCH] github-actionify: update HEAD branch check Let's just check for HEAD to be more tolerant towards localized versions of git. Dedicated to @lguerard. --- github-actionify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actionify.sh b/github-actionify.sh index 104d662..b16115b 100755 --- a/github-actionify.sh +++ b/github-actionify.sh @@ -79,7 +79,7 @@ process() { currentBranch=$(git rev-parse --abbrev-ref HEAD) upstreamBranch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u}) remote=${upstreamBranch%/*} - defaultBranch=$(git remote show "$remote" | grep "HEAD branch" | sed 's/.*: //') + defaultBranch=$(git remote show "$remote" | grep "HEAD" | sed 's/.*: //') test "$currentBranch" = "$defaultBranch" || die "Non-default branch: $currentBranch" git merge --ff --ff-only 'HEAD@{u}' >/dev/null || die "Cannot fast forward (local diverging?)"