summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doDirty.go3
-rw-r--r--rill.go5
-rw-r--r--structs.go1
3 files changed, 6 insertions, 3 deletions
diff --git a/doDirty.go b/doDirty.go
index da11862..2dd4ba4 100644
--- a/doDirty.go
+++ b/doDirty.go
@@ -6,6 +6,7 @@ package forgepb
import (
"time"
+ "go.wit.com/lib/config"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
@@ -73,12 +74,14 @@ func doCheckDirty(repo *gitpb.Repo) error {
// nothing changed
} else {
log.Info("Repo changed to clean", repo.FullPath)
+ config.SetChanged("repos", true)
return log.Errorf("%s repo changed to clean", repo.FullPath)
// f.SetConfigSave(true)
}
} else {
if repo.CheckDirty() {
log.Info("Repo changed to dirty", repo.FullPath)
+ config.SetChanged("repos", true)
return log.Errorf("%s repo changed to dirty", repo.FullPath)
// f.SetConfigSave(true)
} else {
diff --git a/rill.go b/rill.go
index 882bc3a..024c1b2 100644
--- a/rill.go
+++ b/rill.go
@@ -5,6 +5,7 @@ import (
"time"
"github.com/destel/rill"
+ "go.wit.com/lib/config"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@@ -81,8 +82,8 @@ func (f *Forge) RillReload() int {
if !repo.IsValidDir() {
log.Printf("%s %-50s\n", "got an invalid repo in forgepb.RillReload()", repo.GetFullPath())
f.Repos.Delete(repo)
- f.reposSave = true
log.Info("reposSave = true")
+ config.SetChanged("repos", true)
continue
}
all = append(all, repo)
@@ -146,8 +147,8 @@ func (f *Forge) RillRepos(rillf func(*gitpb.Repo) error) map[string]*RillStats {
if !repo.IsValidDir() {
log.Printf("got an invalid repo in forgepb.RillRepos() %-50s\n", repo.GetFullPath())
f.Repos.Delete(repo)
- f.reposSave = true
log.Info("reposSave = true")
+ config.SetChanged("repos", true)
continue
}
all = append(all, repo)
diff --git a/structs.go b/structs.go
index 470a843..08aa464 100644
--- a/structs.go
+++ b/structs.go
@@ -14,7 +14,6 @@ type Forge struct {
Repos *gitpb.Repos // the repo protobufs
Patchsets *Patchsets // patches that are in progress
configSave bool // if you need to save the config because things changed
- reposSave bool // if you need to save the repos file
hostname string // your hostname
rillX int // used for Rill()
rillY int // used for Rill()