summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'common.go')
-rw-r--r--common.go17
1 files changed, 14 insertions, 3 deletions
diff --git a/common.go b/common.go
index 9df2b74..94e3a4b 100644
--- a/common.go
+++ b/common.go
@@ -9,12 +9,23 @@ import (
// reports externally if something has changed
// since the last time it was asked about it
-func (rs *RepoStatus) Changed() bool {
+func (rs *RepoStatus) Changed() (string, bool) {
if !rs.Ready() {
- return false
+ return "", false
}
- return rs.changed
+ return rs.Changes(), rs.changed
+}
+
+// keeps a human readable list of things that have
+// changed
+func (rs *RepoStatus) Changes() string {
+ return rs.changes
+}
+
+func (rs *RepoStatus) NoteChange(s string) {
+ rs.changed = true
+ rs.changes += s + "\n"
}
// deprecate this. returns the gopath right now