gabriel / muse public
fix BREAKING fix/217-push-upstream-branch-meta #1 / 1
AI Agent gabriel · 9 hours ago · Oct 22, 2026 · Diff

fix: write push -u upstream tracking to [branch.<name>] (musehub#217)

set_upstream() only wrote [remotes.<name>].branch, which get_upstream() reads for muse pull/remote status/muse status. It never wrote [branch.<name>].remote/.merge, which _upstream_for() reads for muse branch --json's upstream field -- leaving it permanently null despite push -u succeeding, and despite write_branch_meta()'s own docstring already claiming those fields were preserved.

Extend write_branch_meta() with remote/merge kwargs and have set_upstream() write both locations, so upstream tracking is visible everywhere it's read.

sha256:9bb33f6fdf45ecb59965ef716d0558c34a94eee3402bd7579564a8a2008220a5 sha
+1 ~3 symbols
2 changed · 1260 in snapshot files
sha256:9b8042a856dd764f7045002f385b23b83f4d4e08421441793658f654ca2b2217 snapshot
+1
symbol added
~3
symbols modified
2
files changed
1260
files in snapshot
0
dead code introduced
Semantic Changes 4 symbols
~ muse/cli/config.py .py 2 symbols modified
~ tests/test_cmd_push_hardening.py .py 1 symbol added, 1 symbol modified
+ test_set_upstream_visible_in_branch_json method method test_set_upstream_visible_in_branch_json L566–576
Files Changed
~2
1260 in snapshot
← Older Oldest on fix/217-push-upstream-branch-meta
All commits
Newer → Latest on fix/217-push-upstream-branch-meta

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:9bb33f6fdf45ecb59965ef716d0558c34a94eee3402bd7579564a8a2008220a5 --body "your comment"