Auto-sync: Local changes
Change-Id: Ic4b01a50d66b3486db576f4aa3aa93e72b332359
diff --git a/server/git/git.go b/server/git/git.go
index bf95f7c..fdcd467 100644
--- a/server/git/git.go
+++ b/server/git/git.go
@@ -613,7 +613,16 @@
// Parse branch info
parts := strings.Fields(line[3:])
if len(parts) > 0 {
- status.Branch = parts[0]
+ // Extract local branch name from tracking information
+ // Format can be: "main" or "main...origin/master"
+ branchInfo := parts[0]
+ if strings.Contains(branchInfo, "...") {
+ // Split on "..." and take the local branch name
+ branchParts := strings.Split(branchInfo, "...")
+ status.Branch = branchParts[0]
+ } else {
+ status.Branch = branchInfo
+ }
}
continue
}