Skip to content

Commit 1beb927

Browse files
claudespoorcc
authored andcommitted
Revert _revision_only_mode: restore branch guard
The branch guard (not self.wanted_version.branch) is intentional. When a project specifies both revision and branch, _check_for_newer_version must follow the branch-aware path so the available version is reported as 'branch - revision'. Removing it caused the branch prefix to be stripped from the available output, breaking six BDD scenarios. https://claude.ai/code/session_01Doq8oQtBRH4afusvp9Dv4p
1 parent f04a219 commit 1beb927

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

dfetch/project/subproject.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,11 @@ def _on_disk_hash(self) -> str | None:
374374

375375
def _revision_only_mode(self) -> bool:
376376
"""Return True when the wanted version should be resolved by revision alone."""
377-
return bool(self.wanted_version.revision) and self.revision_is_enough()
377+
return (
378+
not self.wanted_version.branch
379+
and bool(self.wanted_version.revision)
380+
and self.revision_is_enough()
381+
)
378382

379383
def _check_for_newer_version(self) -> Version | None:
380384
"""Check if a newer version is available on the given branch.

0 commit comments

Comments
 (0)