diff options
Diffstat (limited to 'doClean.go')
| -rw-r--r-- | doClean.go | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/doClean.go b/doClean.go new file mode 100644 index 0000000..11e4b7e --- /dev/null +++ b/doClean.go @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + + "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/log" +) + +func doClean() error { + all := me.forge.Repos.SortByFullPath() + for all.Scan() { + repo := all.Next() + if err := doCleanRepo(repo); err != nil { + badExit(err) + } + } + return nil +} + +func doCleanRepo(repo *gitpb.Repo) error { + log.Info("Cleaning:", repo.GetGoPath()) + if repo.GitConfig == nil { + return fmt.Errorf("GitConfig == nil") + } + + for _, l := range repo.GitConfig.Local { + log.Info("\tlocal branch name:", l.Name) + } + + for name, b := range repo.GitConfig.Branches { + log.Info("\tlocal branch name:", name, b.Merge, b.Remote) + } + return nil +} |
