From 1f321bc8c3b7bb19f443d73334c6cdcc45a9c75a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 8 Oct 2025 01:23:12 -0500 Subject: usability cleanups --- doGit.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doGit.go') diff --git a/doGit.go b/doGit.go index f8335e5..333ed57 100644 --- a/doGit.go +++ b/doGit.go @@ -63,6 +63,26 @@ func doGit() error { me.sh.GoodExit("") } + if argv.Git.DeleteUntracked { + initForge() + for repo := range me.forge.Repos.IterAll() { + if !strings.HasPrefix(repo.Namespace, "go.wit.com") { + continue + } + files, _ := repo.GitDeleteOthers() + log.Info(len(files), repo.Namespace) + log.Info(strings.Join(files, "\n")) + if argv.Force { + if len(files) > 0 { + cmd := []string{"rm"} + cmd = append(cmd, files...) + _, err := fhelp.RunRealtimeError(cmd) + return err + } + } + } + } + return nil } -- cgit v1.2.3