diff options
| author | Jeff Carr <[email protected]> | 2025-10-08 01:23:12 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-08 01:23:12 -0500 |
| commit | 1f321bc8c3b7bb19f443d73334c6cdcc45a9c75a (patch) | |
| tree | 02e3b3d4209dc735d85ed04040a8af1cbf135aac /doGit.go | |
| parent | febcf44d5386f8fc20ab752f0416955f35375335 (diff) | |
usability cleanups
Diffstat (limited to 'doGit.go')
| -rw-r--r-- | doGit.go | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 } |
