feat: POST /branches/{name}/reset — force-move branch head to any known commit
Adds BranchResetRequest/Response models and the reset_branch route so a branch can be pointed at any commit already in the store regardless of history. Used to undo corrupt merge commits (bug #36) without a direct DB operation.
Returns 404 if repo, branch, or target commit is not found. Requires repo:write scope.
Tests: tests/test_branch_reset.py (B1–B5, all GREEN).
sha256:1ffd2124d3da48b2ec5783fad10d65d61de72ce75ad9f488ba7aec458fdd0869
sha
+24
~32
symbols
sha256:04d1721300e182340c4a061de11843358ec3ad20d7cb0ac45212eb5063044168
snapshot
+24
symbols added
~32
symbols modified
0
dead code introduced
Semantic Changes
56 symbols
+
test_b1_reset_updates_branch_head
function
async_function test_b1_reset_updates_branch_head L87–119
+
test_b2_reset_unknown_commit_returns_404
function
async_function test_b2_reset_unknown_commit_returns_404 L128–142
+
test_b3_reset_unknown_branch_returns_404
function
async_function test_b3_reset_unknown_branch_returns_404 L151–165
+
test_b5_reset_unknown_repo_returns_404
function
async_function test_b5_reset_unknown_repo_returns_404 L189–199
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:1ffd2124d3da48b2ec5783fad10d65d61de72ce75ad9f488ba7aec458fdd0869 --body "your comment"
No comments yet. Be the first to start the discussion.