summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-03-09 22:03:18 -0600
committerJeff Carr <[email protected]>2024-03-09 22:03:18 -0600
commit804acc169a49320a5f9a0efb60847071f7fee7f2 (patch)
tree72b04fb16565f1cd42d0636452ec1b8f068bb259 /git.go
parent2622e90b1f48f49f007222a1d3b696fd06fb0ca5 (diff)
fix logic for go.work setups
Diffstat (limited to 'git.go')
-rw-r--r--git.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/git.go b/git.go
index a8ba548..f51d74d 100644
--- a/git.go
+++ b/git.go
@@ -298,6 +298,9 @@ func (rs *RepoStatus) CheckoutUser() bool {
log.Log(REPO, rs.realPath.String(), "is dirty")
return false
}
+ if ! rs.BranchExists(bName) {
+ return false
+ }
cmd := []string{"git", "checkout", bName}
err, b, output := RunCmd(rs.realPath.String(), cmd)
if err != nil {