Commit Graph

2 Commits

Author SHA1 Message Date
ZhenYi
a4dc507b66 fix(git): multiple branch and upstream query bugs
1. branch_list: Fix is_head comparison
   - head_name now keeps full ref (e.g., "refs/heads/main")
   - Previously stripped to short name causing is_head to always be false

2. branch_get/branch_exists: Fix name resolution for branches with '/'
   - Previously, "feature/testing" was assumed to be a remote branch
   - Now tries both refs/heads/ and refs/remotes/ candidates
   - Correctly handles local branches like "feature/testing"

3. sync_refs: Fix upstream reference format
   - Was storing "refs/remotes/{}/branch" (broken pattern)
   - Now properly queries git2 for actual upstream branch name
2026-04-17 16:30:58 +08:00
ZhenYi
93cfff9738 init 2026-04-15 09:08:09 +08:00