summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-03-07 19:31:52 -0600
committerJeff Carr <[email protected]>2024-03-07 19:31:52 -0600
commit2cdf2c3cdaffd62d28cc3e797aeba9159709dc03 (patch)
tree64303abe665f75172b40c9165e54b4dffdb2ab8b /git.go
parentf99dc30b683e55fe87f1273febb2be42c844bd54 (diff)
working on go-clonev0.22.1
Diffstat (limited to 'git.go')
-rw-r--r--git.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/git.go b/git.go
index abf58c0..a8ba548 100644
--- a/git.go
+++ b/git.go
@@ -209,6 +209,10 @@ func (rs *RepoStatus) CheckDirty() bool {
if last == "nothing to commit, working tree clean" {
log.Log(REPO, "CheckDirty() no", rs.realPath.String())
rs.dirtyLabel.SetValue("no")
+ if start == "" {
+ // don't record a change as this is the initial run
+ return false
+ }
if start != "no" {
log.Log(REPOWARN, "is no longer dirty")
rs.NoteChange("is no longer dirty")
@@ -217,6 +221,10 @@ func (rs *RepoStatus) CheckDirty() bool {
}
rs.dirtyLabel.SetValue("dirty")
+ if start == "" {
+ // don't record a change as this is the initial run
+ return false
+ }
if start != "dirty" {
log.Log(REPOWARN, "is now dirty")
rs.NoteChange("is now dirty")