diff --git a/ogclient/lib/python3/GitLib/__init__.py b/ogclient/lib/python3/GitLib/__init__.py index 8791b0f..1ddc079 100755 --- a/ogclient/lib/python3/GitLib/__init__.py +++ b/ogclient/lib/python3/GitLib/__init__.py @@ -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.