chore: refactor / docstrings

This commit is contained in:
2024-12-21 19:22:26 +01:00
parent 0bb25a00ec
commit 3f29084664
2 changed files with 5 additions and 6 deletions

View File

@ -48,7 +48,7 @@ func Init(repoPath string, commit bool, gitName, gitEmail string) error {
return nil
}
// Set the default branch for the passed repo as "main"
// SwitchToMain sets the default branch to "main".
func SwitchToMain(repo *git.Repository) error {
ref := plumbing.NewSymbolicReference(plumbing.HEAD, plumbing.ReferenceName("refs/heads/main"))
if err := repo.Storer.SetReference(ref); err != nil {