Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

adding logging for efs git issue

Dane Schneider3ff21baad6c3
diff --git a/app/server/db/git.go b/app/server/db/git.go
index 6c503cd2..f64d8673 100644
--- a/app/server/db/git.go
+++ b/app/server/db/git.go
@@ -133,10 +133,14 @@ func gitCheckoutBranch(repoDir, branch string) error {
currentBranch := strings.TrimSpace(out.String())
+ log.Println("currentBranch:", currentBranch)
+
if currentBranch == branch {
return nil
}
+ log.Println("checking out branch:", branch)
+
res, err := exec.Command("git", "-C", repoDir, "checkout", branch).CombinedOutput()
if err != nil {
return fmt.Errorf("error checking out git branch for dir: %s, err: %v, output: %s", repoDir, err, string(res))
@@ -425,6 +429,13 @@ func lockRepo(orgId, userId, planId, planBuildId, branch string, scope LockScope
return "", fmt.Errorf("error inserting new lock: %v", err)
}
+ branches, err := GitListBranches(orgId, planId)
+ if err != nil {
+ return "", fmt.Errorf("error getting branches: %v", err)
+ }
+
+ log.Println("branches:", branches)
+
if branch != "" {
// checkout the branch
err = gitCheckoutBranch(getPlanDir(orgId, planId), branch)