Compare commits
No commits in common. "6bfd8c78abf12a6a7a8e7d0932f5160b9abc95e1" and "6890e68af38c0fa84d5a36dfc393ddb6850edca5" have entirely different histories.
6bfd8c78ab
...
6890e68af3
|
@ -72,6 +72,12 @@ func (cfg *ForgeConfigs) DumpENV() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
if f.Config.Username == "" {
|
||||||
|
usr, _ := user.Current()
|
||||||
|
f.Config.Username = usr.Username
|
||||||
|
f.SetConfigSave(true)
|
||||||
|
}
|
||||||
|
|
||||||
if f.Config.Xterm == "" {
|
if f.Config.Xterm == "" {
|
||||||
f.Config.Xterm = "xterm"
|
f.Config.Xterm = "xterm"
|
||||||
f.Config.XtermArgv = append(f.Config.XtermArgv, "-bg")
|
f.Config.XtermArgv = append(f.Config.XtermArgv, "-bg")
|
||||||
|
|
6
init.go
6
init.go
|
@ -4,7 +4,6 @@ package forgepb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"go.wit.com/lib/config"
|
"go.wit.com/lib/config"
|
||||||
|
@ -41,11 +40,6 @@ func Init() *Forge {
|
||||||
f.Config.DumpENV()
|
f.Config.DumpENV()
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
if f.Config.Username == "" {
|
|
||||||
usr, _ := user.Current()
|
|
||||||
f.Config.Username = usr.Username
|
|
||||||
f.Config.ConfigSave()
|
|
||||||
}
|
|
||||||
f.initFromConfig()
|
f.initFromConfig()
|
||||||
if f.Config.Mode == ForgeMode_MASTER {
|
if f.Config.Mode == ForgeMode_MASTER {
|
||||||
log.Printf("forge.Init() %s len()=%d\n", f.Config.Filename, f.Repos.Len())
|
log.Printf("forge.Init() %s len()=%d\n", f.Config.Filename, f.Repos.Len())
|
||||||
|
|
|
@ -164,9 +164,6 @@ func (f *Forge) VerifyBranchNames(repo *gitpb.Repo) {
|
||||||
|
|
||||||
if repo.GetUserBranchName() == "" {
|
if repo.GetUserBranchName() == "" {
|
||||||
uname := f.configUserBranchName(repo)
|
uname := f.configUserBranchName(repo)
|
||||||
if uname == "" {
|
|
||||||
log.Info("configUserBranchName() ERROR: failed with blank")
|
|
||||||
}
|
|
||||||
if repo.IsBranch(uname) {
|
if repo.IsBranch(uname) {
|
||||||
repo.SetUserBranchName(uname)
|
repo.SetUserBranchName(uname)
|
||||||
} else {
|
} else {
|
||||||
|
@ -192,9 +189,6 @@ func (f *Forge) configUserBranchName(repo *gitpb.Repo) string {
|
||||||
if uname != "" {
|
if uname != "" {
|
||||||
return uname
|
return uname
|
||||||
}
|
}
|
||||||
if f.Config.Username == "" {
|
|
||||||
// something is wrong!
|
|
||||||
}
|
|
||||||
|
|
||||||
// use the os.Username
|
// use the os.Username
|
||||||
uname = f.Config.Username
|
uname = f.Config.Username
|
||||||
|
|
Loading…
Reference in New Issue