summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-28 13:58:41 -0600
committerJeff Carr <[email protected]>2025-01-28 13:58:41 -0600
commitdd7355571d80b4d6c970e417df85244dbfd253e0 (patch)
tree3df9cc7c853749d742fb5435a903b5c92c5652ec /find.go
parent91c28de514b1a41e2355714f5352f5438dbe34a2 (diff)
add 'forge find patches'
Diffstat (limited to 'find.go')
-rw-r--r--find.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/find.go b/find.go
index 2c21e85..c230330 100644
--- a/find.go
+++ b/find.go
@@ -17,6 +17,11 @@ func (f *FindCmd) findRepos() {
return
}
+ if argv.List.Patches != nil {
+ findReposWithPatches()
+ return
+ }
+
if f.All {
findAll()
return
@@ -113,3 +118,17 @@ func findUser() {
}
}
}
+
+func findReposWithPatches() {
+ all := me.forge.Repos.SortByFullPath()
+ for all.Scan() {
+ repo := all.Next()
+ if repo.IsDirty() {
+ me.found.AppendByGoPath(repo)
+ continue
+ }
+ if repo.GetUserVersion() != repo.GetDevelVersion() {
+ me.found.AppendByGoPath(repo)
+ }
+ }
+}