summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-18 23:25:55 -0600
committerJeff Carr <[email protected]>2025-01-18 23:25:55 -0600
commit39f72d20344c5bbe05b83a13eee9c0d7b54f7e78 (patch)
treebba755911c142fb357804a006dc11183063c2b37 /find.go
parentcbbd43f7b59cee14ed3c83d1da33a04cf8e73bbc (diff)
better git checkout
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)
+ }
+ }
+}