diff options
Diffstat (limited to 'find.go')
| -rw-r--r-- | find.go | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -14,43 +14,43 @@ import ( // // by default, it adds every repo -func (f *FindCmd) findRepos() { +func (f *FindCmd) findRepos() *gitpb.Repos { if f == nil { findMine() - return + return me.found } if f.All { findAll() - return + return me.found } if f.Private { findPrivate() - return + return me.found } if f.Mine { findMine() - return + return me.found } if f.Favorites { findFavorites() - return + return me.found } if f.Dirty { - findDirty() - return + return findDirty() } if f.User { findUser() - return + return me.found } findAll() + return me.found } func findPrivate() { @@ -89,15 +89,17 @@ func findFavorites() { } // finds repos that git is reporting as dirty -func findDirty() { +func findDirty() *gitpb.Repos { + found := gitpb.NewRepos() all := me.forge.Repos.SortByFullPath() for all.Scan() { var repo *gitpb.Repo repo = all.Next() if repo.IsDirty() { - me.found.AppendByGoPath(repo) + found.AppendByGoPath(repo) } } + return found } func findAll() { |
