From ae8fd94a2c33f1bcfa56e009c4b88d82f0712c9d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 8 Jan 2025 10:10:14 -0600 Subject: [PATCH] output cleanups --- Makefile | 2 +- doCheckout.go | 2 +- exit.go | 4 +++- main.go | 10 ++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d84db3b..61d6d37 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%Y.%m.%d) info: install - forge + forge dirty vet: @GO111MODULE=off go vet diff --git a/doCheckout.go b/doCheckout.go index eb48c04..1ea4b67 100644 --- a/doCheckout.go +++ b/doCheckout.go @@ -53,7 +53,7 @@ func doCheckDirtyAndConfigSave() { } } } - log.Printf("dirty check %d took:%s\n", count, shell.FormatDuration(time.Since(now))) + log.Printf("dirty check (%d repos) took:%s\n", count, shell.FormatDuration(time.Since(now))) me.forge.SetConfigSave(configSave) } diff --git a/exit.go b/exit.go index 8cddc11..e80df8a 100644 --- a/exit.go +++ b/exit.go @@ -7,7 +7,9 @@ import ( ) func okExit(thing string) { - log.Info(thing, "ok") + if thing != "" { + log.Info("forge exit:", thing, "ok") + } if configSave { me.forge.SetConfigSave(configSave) } diff --git a/main.go b/main.go index 446e4b9..76e4a0a 100644 --- a/main.go +++ b/main.go @@ -94,8 +94,6 @@ func main() { okExit("") } - log.Info("found", me.found.Len(), "repos. found", len(me.foundPaths), "paths from .config/forge") - if argv.Dirty != nil { findAll() // select all the repos doCheckDirtyAndConfigSave() @@ -136,25 +134,25 @@ func main() { if argv.GitReset != nil { findAll() // select all the repos doGitReset() - okExit("patches") + okExit("reset") } if argv.List != nil { argv.List.findRepos() // print out the repos me.forge.PrintHumanTable(me.found) - okExit("patches") + okExit("") } if argv.Patch != nil { if argv.Patch.Show != nil { sendDevelDiff("fixme") // sendMasterDiff() - okExit("patches") + okExit("") } if argv.Patch.List != nil { listPatches() - okExit("patches") + okExit("patch list") } }