summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
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")