summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-16 17:55:13 -0600
committerJeff Carr <[email protected]>2024-02-16 17:55:13 -0600
commit0b4f4d76866ccc500112cfe553240c47961258e2 (patch)
tree5b68ef32ea6dab46b0aa3c7c522f4852b62bfcd3 /common.go
parentbd62a89a670eab24ff5fd7b1ed155b89dde08157 (diff)
ready to work on creating branches
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