force checkout. need to warn users
This commit is contained in:
parent
cbdcfa0589
commit
6342113c2a
24
repoNew.go
24
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue