summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
Diffstat (limited to 'find.go')
-rw-r--r--find.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/find.go b/find.go
index 905176b..2c21e85 100644
--- a/find.go
+++ b/find.go
@@ -42,6 +42,11 @@ func (f *FindCmd) findRepos() {
return
}
+ if f.User {
+ findUser()
+ return
+ }
+
findAll()
}
@@ -98,3 +103,13 @@ func findAll() {
me.found.AppendByGoPath(repo)
}
}
+
+func findUser() {
+ all := me.forge.Repos.SortByFullPath()
+ for all.Scan() {
+ repo := all.Next()
+ if repo.GetCurrentBranchName() == repo.GetUserBranchName() {
+ me.found.AppendByGoPath(repo)
+ }
+ }
+}