From 3505a66d84b13d71d530ca74d1dbc85d1c6cfb2b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 24 Dec 2024 03:08:06 -0600 Subject: more argv cleanups --- doCommon.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'doCommon.go') diff --git a/doCommon.go b/doCommon.go index ef58738..76c591a 100644 --- a/doCommon.go +++ b/doCommon.go @@ -1,6 +1,9 @@ package main import ( + "time" + + "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) @@ -33,6 +36,29 @@ func doGitPull() { } } + +func doCheckDirty() { + now := time.Now() + all := me.forge.Repos.SortByFullPath() + for all.Scan() { + repo := all.Next() + dirty := repo.IsDirty() + if repo.CheckDirty() { + me.found.AppendUniqueGoPath(repo) + if !dirty { + configSave = true + } + } else { + if dirty { + configSave = true + } + } + } + doCobol() + log.Info("dirty check took:", shell.FormatDuration(time.Since(now))) + me.forge.SetConfigSave(configSave) +} + func doGitReset() { all := me.found.SortByFullPath() for all.Scan() { -- cgit v1.2.3