From 08308b3907fa9cb5798b7f371ddac132454e69b6 Mon Sep 17 00:00:00 2001 From: "Simonis, Matthias" Date: Fri, 1 Mar 2024 12:13:08 +0000 Subject: [PATCH] add more logging --- golang/vaas/cmd/git-scan/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/golang/vaas/cmd/git-scan/main.go b/golang/vaas/cmd/git-scan/main.go index e6be7df0..b2f088d4 100644 --- a/golang/vaas/cmd/git-scan/main.go +++ b/golang/vaas/cmd/git-scan/main.go @@ -54,12 +54,15 @@ func main() { log.Fatal("git rev-parse: ", err, string(rootDirectoryBytes)) } rootDirectory := strings.Split(strings.ReplaceAll(string(rootDirectoryBytes), "\r\n", "\n"), "\n")[0] + log.Println("repository root directory: ", rootDirectory) fetchBytesCommand := exec.Command("git", "fetch", remote, targetBranch) fetchBytes, err := fetchBytesCommand.Output() if err != nil { log.Fatal("git fetch ", err, string(fetchBytes)) } + log.Println("fetch result: ", string(fetchBytes)) + gitDiffCommand := exec.Command("git", "diff", "--name-only", targetBranch) diffBytes, err := gitDiffCommand.Output() if err != nil { @@ -70,6 +73,7 @@ func main() { log.Println("no changed files found in diff") os.Exit(0) } + log.Println("found changed files: ", string(diffBytes)) authenticator := authenticator.New(clientID, clientSecret, tokenUrl)