Skip to content

Commit 5e6d51f

Browse files
committed
test(submodule): expect the full branch path after a reread
`test_update_branch_dot_rejects_latest_revision_with_detached_superproject` asserted the raw `.` after `set_parent_commit()`. Rereads now pass `branch` through `Head.to_full_path()` like `iter_items()`, so the value is `refs/heads/.`, which is what `parent.submodules[0]` already returned before the reread. `_branch_for_update()` compares `Head.name`, which is `.` for both, so update behaviour is unchanged. The test failed on the ubuntu jobs at 31cb7c8 with `assert 'refs/heads/.' == '.'` and passes with this change under the `cli` and `gix` backends. Agent-Model: claude-opus-5-5
1 parent 31cb7c8 commit 5e6d51f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/test_submodule.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2052,7 +2052,7 @@ def test_update_branch_dot_rejects_latest_revision_with_detached_superproject(se
20522052
parent.head.set_reference(parent.head.commit)
20532053
submodule = parent.submodules[0]
20542054
submodule.set_parent_commit(parent.head.commit)
2055-
assert submodule.branch_path == "."
2055+
assert submodule.branch_path == "refs/heads/."
20562056
remote_tip = source.index.commit("Advance master again", skip_hooks=True)
20572057
assert remote_tip.binsha != submodule.binsha
20582058

0 commit comments

Comments
 (0)