diff --git a/repoNew.go b/repoNew.go index c6cb8be..1e6c7d4 100644 --- a/repoNew.go +++ b/repoNew.go @@ -28,7 +28,13 @@ func (f *Forge) VerifyBranchNames(newr *gitpb.Repo) { } else if newr.IsBranch("main") { newr.SetMasterBranchName("main") } else { - newr.SetMasterBranchName("masterFIXME") + // todo, figure out the name from git + newr.SetMasterBranchName("master") + if newr.CheckoutMaster() { + } else { + cmd := []string{"git", "branch", "master"} + newr.Run(cmd) + } } } @@ -42,7 +48,13 @@ func (f *Forge) VerifyBranchNames(newr *gitpb.Repo) { } else if newr.IsBranch("devel") { newr.SetDevelBranchName("devel") } else { - newr.SetDevelBranchName("develFIXME") + // forcing for now. todo: warn users + newr.SetDevelBranchName("devel") + if newr.CheckoutDevel() { + } else { + cmd := []string{"git", "branch", "devel"} + newr.Run(cmd) + } } } @@ -52,7 +64,13 @@ func (f *Forge) VerifyBranchNames(newr *gitpb.Repo) { if newr.IsBranch(uname) { newr.SetUserBranchName(uname) } else { - newr.SetUserBranchName(uname + "FIXME") + // forcing for now. todo: warn users + newr.SetUserBranchName(uname) + if newr.CheckoutUser() { + } else { + cmd := []string{"git", "branch", uname} + newr.Run(cmd) + } } } }