diff options
| author | Jeff Carr <[email protected]> | 2024-02-16 17:55:13 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-16 17:55:13 -0600 |
| commit | 0b4f4d76866ccc500112cfe553240c47961258e2 (patch) | |
| tree | 5b68ef32ea6dab46b0aa3c7c522f4852b62bfcd3 /common.go | |
| parent | bd62a89a670eab24ff5fd7b1ed155b89dde08157 (diff) | |
ready to work on creating branches
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -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 |
