diff options
Diffstat (limited to 'doCommon.go')
| -rw-r--r-- | doCommon.go | 26 |
1 files changed, 26 insertions, 0 deletions
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() { |
