minor code reorder
This commit is contained in:
parent
e62d74f0e6
commit
297355f27e
2
argv.go
2
argv.go
|
@ -238,7 +238,7 @@ func (args) doBashAuto() {
|
||||||
case "normal":
|
case "normal":
|
||||||
fmt.Println("on off")
|
fmt.Println("on off")
|
||||||
case "pull":
|
case "pull":
|
||||||
fmt.Println("-force check")
|
fmt.Println("--force check")
|
||||||
case "patch":
|
case "patch":
|
||||||
fmt.Println("check get list repos submit show")
|
fmt.Println("check get list repos submit show")
|
||||||
case "user":
|
case "user":
|
||||||
|
|
26
main.go
26
main.go
|
@ -140,6 +140,16 @@ func main() {
|
||||||
okExit("")
|
okExit("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if argv.Help != nil {
|
||||||
|
doHelp()
|
||||||
|
okExit("")
|
||||||
|
}
|
||||||
|
|
||||||
|
if argv.Dirty != nil {
|
||||||
|
doDirty()
|
||||||
|
okExit("")
|
||||||
|
}
|
||||||
|
|
||||||
if argv.Normal != nil {
|
if argv.Normal != nil {
|
||||||
if argv.Normal.On != nil {
|
if argv.Normal.On != nil {
|
||||||
if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL {
|
if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL {
|
||||||
|
@ -151,6 +161,7 @@ func main() {
|
||||||
log.Info("normal mode on")
|
log.Info("normal mode on")
|
||||||
okExit("")
|
okExit("")
|
||||||
}
|
}
|
||||||
|
|
||||||
if argv.Normal.Off != nil {
|
if argv.Normal.Off != nil {
|
||||||
if me.forge.Config.Mode != forgepb.ForgeMode_NORMAL {
|
if me.forge.Config.Mode != forgepb.ForgeMode_NORMAL {
|
||||||
log.Info("you were aleady not in the normal state")
|
log.Info("you were aleady not in the normal state")
|
||||||
|
@ -174,6 +185,7 @@ func main() {
|
||||||
okExit("")
|
okExit("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if you are in "normal" mode, always run normal every time to catch accidental errors
|
// if you are in "normal" mode, always run normal every time to catch accidental errors
|
||||||
// for example, if you accidentally changed branches from your user branch
|
// for example, if you accidentally changed branches from your user branch
|
||||||
if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL {
|
if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL {
|
||||||
|
@ -182,10 +194,6 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if argv.Dirty != nil {
|
|
||||||
doDirty()
|
|
||||||
okExit("")
|
|
||||||
}
|
|
||||||
|
|
||||||
if argv.Merge != nil {
|
if argv.Merge != nil {
|
||||||
if argv.Merge.Devel != nil {
|
if argv.Merge.Devel != nil {
|
||||||
|
@ -235,16 +243,6 @@ func main() {
|
||||||
okExit("")
|
okExit("")
|
||||||
}
|
}
|
||||||
|
|
||||||
if argv.Help != nil {
|
|
||||||
doHelp()
|
|
||||||
okExit("")
|
|
||||||
}
|
|
||||||
|
|
||||||
// todo: redo this logic using forgepb
|
|
||||||
if configSave {
|
|
||||||
me.forge.ConfigSave()
|
|
||||||
configSave = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// if the user doesn't want to open the GUI and
|
// if the user doesn't want to open the GUI and
|
||||||
// nothing else was specified to be done,
|
// nothing else was specified to be done,
|
||||||
|
|
Loading…
Reference in New Issue