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)