From 2cdf2c3cdaffd62d28cc3e797aeba9159709dc03 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 7 Mar 2024 19:31:52 -0600 Subject: working on go-clone --- git.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'git.go') 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") -- cgit v1.2.3