summaryrefslogtreecommitdiff
path: root/doGit.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-08 01:23:12 -0500
committerJeff Carr <[email protected]>2025-10-08 01:23:12 -0500
commit1f321bc8c3b7bb19f443d73334c6cdcc45a9c75a (patch)
tree02e3b3d4209dc735d85ed04040a8af1cbf135aac /doGit.go
parentfebcf44d5386f8fc20ab752f0416955f35375335 (diff)
usability cleanups
Diffstat (limited to 'doGit.go')
-rw-r--r--doGit.go20
1 files changed, 20 insertions, 0 deletions
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
}