refs #2489 Set default branch to "main"

git-initial-branch
Vadim vtroshchinskiy 2025-07-17 16:38:57 +02:00
parent 820f77e246
commit 252c042095
1 changed files with 2 additions and 1 deletions

View File

@ -349,6 +349,7 @@ class OpengnsysGitLibrary:
self.repo_server = self.kernel_args["ogrepo"]
self.ip_address = self.kernel_args["ip"]
self.initial_branch = "main"
if not self.repo_server:
self.logger.warning("ogrepo kernel argument wasn't passed, or was empty. Defaulting to oglive.")
@ -1371,7 +1372,7 @@ class OpengnsysGitLibrary:
os.symlink(real_git_dir, git_dir)
with git.Repo.init(path) as repo:
with git.Repo.init(path, initial_branch = self.initial_branch) as repo:
# On NTFS, we have to unmount the filesystem to do secaudit.
# Gitpython objects existing at that time may mean a dangling git process that prevents
# the required unmounting.