summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-15 23:41:04 -0600
committerJeff Carr <[email protected]>2024-01-15 23:41:04 -0600
commitc65dd45ba5356e5f2f6628cc14ee4baf9eeea109 (patch)
treede2f8de73906ce67153b924b2a59147a9455a82a /git.go
parentb2c21e8c16f01d5b25736f7f4ec5a3419f94c999 (diff)
better debugging output
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'git.go')
-rw-r--r--git.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/git.go b/git.go
index 03b1e6e..a20dd28 100644
--- a/git.go
+++ b/git.go
@@ -90,15 +90,19 @@ func (rs *RepoStatus) getBranches() []string {
func (rs *RepoStatus) CheckDirty() bool {
cmd := []string{"git", "diff-index", "--quiet", "HEAD"}
- err, b, out := RunCmd("/home/jcarr/go/src/" + rs.repopath, cmd)
+ path := "/home/jcarr/go/src/" + rs.repopath
+ err, b, out := RunCmd(path, cmd)
if err != nil {
+ log.Warn("CheckDirty() b =", b)
+ log.Warn("CheckDirty() path =", path)
+ log.Warn("CheckDirty() out =", out)
log.Warn("CheckDirty() err =", err)
log.Error(err, "CheckDirty() error")
rs.dirtyLabel.Set("error")
return true
}
- log.Warn("CheckDirty() b =", b, "out =", out)
if b {
+ log.Warn("CheckDirty() b =", b, "path =", path, "out =", out)
log.Warn("CheckDirty() no", rs.repopath)
rs.dirtyLabel.Set("no")
return false