From 7fe314c3f43b319542679639d00e68256320a13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@jelmer.uk> Date: Fri, 2 Sep 2022 23:01:25 +0100 Subject: [PATCH] Add 'main' to the list of default branch names to try (#294) Support 'main' as a default branch name to try. --- klaus/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klaus/repo.py b/klaus/repo.py index 1879207..094fd27 100644 --- a/klaus/repo.py +++ b/klaus/repo.py @@ -130,7 +130,7 @@ class FancyRepo(dulwich.repo.Repo): def get_default_branch(self): """Tries to guess the default repo branch name.""" - for candidate in ["master", "trunk", "default", "gh-pages"]: + for candidate in ["master", "main", "trunk", "default", "gh-pages"]: try: self.get_commit(candidate) return candidate -- GitLab