From 7f176d8e2fffcf9490fceef285ec73b27effecd9 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 2 Nov 2021 15:15:52 +0100 Subject: [PATCH] fix: ensure logging for status checks Closes https://git.coopcloud.tech/coop-cloud/organising/issues/226. --- pkg/git/read.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/git/read.go b/pkg/git/read.go index 9e33dcfc..038ea6f4 100644 --- a/pkg/git/read.go +++ b/pkg/git/read.go @@ -6,6 +6,7 @@ import ( "coopcloud.tech/abra/pkg/config" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" + "github.com/sirupsen/logrus" ) // GetRecipeHead retrieves latest HEAD metadata. @@ -44,5 +45,11 @@ func IsClean(recipeName string) (bool, error) { return false, err } + if status.String() != "" { + logrus.Debugf("discovered git status for %s repository: %s", recipeName, status.String()) + } else { + logrus.Debugf("discovered clean git status for %s repository", recipeName) + } + return status.IsClean(), nil }