From 2ba6a7c253710821bb3503347b4acbded1500790 Mon Sep 17 00:00:00 2001 From: sumi Date: Mon, 15 Dec 2025 01:47:25 -0600 Subject: [PATCH] automated snapshot --- storage.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage.go b/storage.go index 99b2aec..3d2a3c2 100644 --- a/storage.go +++ b/storage.go @@ -192,7 +192,11 @@ func CommitAllIfDirty(repoPath, message string, log *log.Logger) (commitHash str } if status.IsClean() { - return "", branch, false, nil + hash, err := HeadHash(repoPath) + if err != nil { + log.Printf("Repo was clean but there was an error checking the commit for HEAD: %v", err) + } + return hash, branch, false, nil } // Stage everything (git add -A)