From dd7355571d80b4d6c970e417df85244dbfd253e0 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 28 Jan 2025 13:58:41 -0600 Subject: add 'forge find patches' --- find.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'find.go') 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) + } + } +} -- cgit v1.2.3