Patch attached.
From 048a1e91cc9c4b14f4e17a6b52b6f4edb1843bf9 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbr...@cornell.edu>
Date: Thu, 23 Mar 2023 09:20:14 -0400
Subject: [PATCH] git.cygclass: Try 'main' if there's no master branch
---
cygclass/git.cygclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cygclass/git.cygclass b/cygclass/git.cygclass
index dd9aedbacdf2..e53a7985af99 100644
--- a/cygclass/git.cygclass
+++ b/cygclass/git.cygclass
@@ -93,7 +93,7 @@ git_fetch() {
#****v* git.cygclass/GIT_BRANCH
# DESCRIPTION
-# Branch from which to clone. If undefined, the 'master' branch is used.
+# Branch from which to clone. If undefined, the 'master' or 'main' branch is
used.
#****
#****v* git.cygclass/GIT_REV
# DESCRIPTION
@@ -116,7 +116,7 @@ git_fetch() {
then
verbose git checkout ${GIT_REV} || error "git checkout failed"
else
- verbose git checkout master || error "git checkout failed"
+ verbose git checkout master || verbose git checkout main ||
error "git checkout failed"
fi
if [ -f .gitmodules ]
--
2.39.0