summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applyPatch.go2
-rw-r--r--doCommit.go2
-rw-r--r--doDirty.go2
-rw-r--r--doFind.go16
-rw-r--r--doGui.go2
-rw-r--r--doPull.go2
-rw-r--r--windowFound.go2
-rw-r--r--windowReposFix.go2
-rw-r--r--windowReposNew.go2
9 files changed, 10 insertions, 22 deletions
diff --git a/applyPatch.go b/applyPatch.go
index f142733..223a2d9 100644
--- a/applyPatch.go
+++ b/applyPatch.go
@@ -48,7 +48,7 @@ func savePatchset(pset *forgepb.Patchset) error {
// re-run git CheckDirty() on everything
func IsAnythingDirty() bool {
doCheckDirtyAndConfigSave()
- found := findDirty()
+ found := me.forge.FindDirty()
if found.Len() == 0 {
return false
} else {
diff --git a/doCommit.go b/doCommit.go
index f6fb8d1..ef379a2 100644
--- a/doCommit.go
+++ b/doCommit.go
@@ -14,7 +14,7 @@ import (
func doCommit() {
if argv.All {
doCheckDirtyAndConfigSave()
- found := findDirty()
+ found := me.forge.FindDirty()
var newpatches bool
for repo := range found.IterAll() {
log.Info("do a commit on repo", repo.GetGoPath())
diff --git a/doDirty.go b/doDirty.go
index a2a38ec..ca25e8b 100644
--- a/doDirty.go
+++ b/doDirty.go
@@ -14,7 +14,7 @@ import (
func doDirty() {
doCheckDirtyAndConfigSave()
- found := findDirty()
+ found := me.forge.FindDirty()
if found.Len() == 0 {
return
}
diff --git a/doFind.go b/doFind.go
index 65edb43..b100ecd 100644
--- a/doFind.go
+++ b/doFind.go
@@ -24,7 +24,7 @@ func doFind() *gitpb.Repos {
}
if argv.List.Dirty {
- return findDirty()
+ return me.forge.FindDirty()
}
return findAll()
@@ -52,7 +52,7 @@ func (f *FindCmd) findRepos() *gitpb.Repos {
}
if f.Dirty {
- return findDirty()
+ return me.forge.FindDirty()
}
if f.User {
@@ -101,18 +101,6 @@ func findFavorites() *gitpb.Repos {
return found
}
-// finds repos that git is reporting as dirty
-func findDirty() *gitpb.Repos {
- found := gitpb.NewRepos()
-
- for repo := range me.forge.Repos.IterByFullPath() {
- if repo.IsDirty() {
- found.AppendByFullPath(repo)
- }
- }
- return found
-}
-
func findAll() *gitpb.Repos {
found := gitpb.NewRepos()
for repo := range me.forge.Repos.IterByFullPath() {
diff --git a/doGui.go b/doGui.go
index f67127f..cbe2c57 100644
--- a/doGui.go
+++ b/doGui.go
@@ -49,7 +49,7 @@ func debug() {
}
doCheckDirtyAndConfigSave()
- found := findDirty()
+ found := me.forge.FindDirty()
dirty := found.Len()
if me.repoDirtyB != nil {
diff --git a/doPull.go b/doPull.go
index c3c0870..098bd31 100644
--- a/doPull.go
+++ b/doPull.go
@@ -64,7 +64,7 @@ func doGitPullNew() error {
check := gitpb.NewRepos()
if argv.Pull.Dirty != nil {
- check = findDirty()
+ check = me.forge.FindDirty()
}
if argv.Pull.Patches != nil {
diff --git a/windowFound.go b/windowFound.go
index a5d838c..06c530f 100644
--- a/windowFound.go
+++ b/windowFound.go
@@ -62,7 +62,7 @@ func (r *foundWindow) initWindow() {
group1 := r.stack.NewGroup("Repo Summary")
group1.NewButton("dirty", func() {
log.Info("find dirty here")
- found := findDirty()
+ found := me.forge.FindDirty()
me.forge.PrintHumanTable(found)
})
group1.NewButton("all", func() {
diff --git a/windowReposFix.go b/windowReposFix.go
index 9fa38f1..64ea40f 100644
--- a/windowReposFix.go
+++ b/windowReposFix.go
@@ -255,7 +255,7 @@ func makeHackModeWindow(stdwin *stdReposTableWin) {
grid.NewButton("show dirty repos on win.Bottom", func() {
log.Info("try to show dirty repos on bottom")
- found := findDirty()
+ found := me.forge.FindDirty()
stdwin.doReposTable(found)
})
diff --git a/windowReposNew.go b/windowReposNew.go
index 3651d82..eea3a02 100644
--- a/windowReposNew.go
+++ b/windowReposNew.go
@@ -53,7 +53,7 @@ func makeReposWinNew() *gadgets.GenericWindow {
t.Delete()
t = nil
}
- found := findDirty()
+ found := me.forge.FindDirty()
// display the protobuf
t = addWindowPB(insertWin, found)