public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH cygport] git.cygclass: Try 'main' if there's no master branch
@ 2023-03-23 14:07 Ken Brown
  2023-03-26 16:40 ` Jon Turney
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Brown @ 2023-03-23 14:07 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 15 bytes --]

Patch attached.

[-- Attachment #2: 0001-git.cygclass-Try-main-if-there-s-no-master-branch.patch --]
[-- Type: text/plain, Size: 1066 bytes --]

From 048a1e91cc9c4b14f4e17a6b52b6f4edb1843bf9 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH cygport] git.cygclass: Try 'main' if there's no master branch
  2023-03-23 14:07 [PATCH cygport] git.cygclass: Try 'main' if there's no master branch Ken Brown
@ 2023-03-26 16:40 ` Jon Turney
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Turney @ 2023-03-26 16:40 UTC (permalink / raw)
  To: cygwin-apps, Ken Brown

On 23/03/2023 14:07, Ken Brown via Cygwin-apps wrote:
> Patch attached.

Thanks, applied.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-26 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 14:07 [PATCH cygport] git.cygclass: Try 'main' if there's no master branch Ken Brown
2023-03-26 16:40 ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).