Skip to content

Commit e6e0891

Browse files
authored
Merge pull request #45 from scijava/head-branch-check
github-actionify: update HEAD branch check
2 parents 0342940 + b5329b2 commit e6e0891

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)