Skip to content

Commit 081b22d

Browse files
authored
Add support for "main" and "master" branches (#1359)
This PR fixes function responsible for synchronizing repositories so that both "main" and "master" branches are supported. Current behaviour assumes that there always exists a "master" branch what is no longer the case given repositories follow a patern of using "main" instead.
1 parent f22b594 commit 081b22d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ function sync_repo_and_patch {
267267
pushd $DEST
268268

269269
git am --abort || true
270-
git checkout master
270+
git checkout master || git checkout main
271271
git fetch origin
272-
git rebase origin/master
272+
git rebase origin/master || git rebase origin/main
273273
if test "$#" -gt "2" ; then
274274
git branch -D metalkube || true
275275
git checkout -b metalkube

0 commit comments

Comments
 (0)