diff options
| author | Jeff Carr <[email protected]> | 2025-01-18 23:25:55 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-18 23:25:55 -0600 |
| commit | 39f72d20344c5bbe05b83a13eee9c0d7b54f7e78 (patch) | |
| tree | bba755911c142fb357804a006dc11183063c2b37 /find.go | |
| parent | cbbd43f7b59cee14ed3c83d1da33a04cf8e73bbc (diff) | |
better git checkout
Diffstat (limited to 'find.go')
| -rw-r--r-- | find.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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) + } + } +} |
