Skip to content

Commit b5329b2

Browse files
authored
github-actionify: update HEAD branch check
Let's just check for HEAD to be more tolerant towards localized versions of git. Dedicated to @lguerard.
1 parent 0342940 commit b5329b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github-actionify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ process() {
7979
currentBranch=$(git rev-parse --abbrev-ref HEAD)
8080
upstreamBranch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u})
8181
remote=${upstreamBranch%/*}
82-
defaultBranch=$(git remote show "$remote" | grep "HEAD branch" | sed 's/.*: //')
82+
defaultBranch=$(git remote show "$remote" | grep "HEAD" | sed 's/.*: //')
8383
test "$currentBranch" = "$defaultBranch" || die "Non-default branch: $currentBranch"
8484
git merge --ff --ff-only 'HEAD@{u}' >/dev/null ||
8585
die "Cannot fast forward (local diverging?)"

0 commit comments

Comments
 (0)