diff options
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 } |
