Fix --all-branches and --branch filtering from worktrees#534
Conversation
runFixOpen and runFixBatch both called filterReachableJobs with an empty branchOverride, causing it to fall back to the worktree's current branch. This filtered out jobs from other branches even when --all-branches or --branch <name> was specified. Pass the branch parameter through to filterReachableJobs, and skip filtering entirely when branch is empty (all-branches mode), matching the pattern already used in runFixList. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Open job discovery is now the default behavior when no positional job IDs are provided, making --open redundant. Both --open and --unaddressed are kept as hidden flags for backwards compatibility but silently ignored. Simplified validation: --branch, --all-branches, and --newest-first now directly check for conflicts with positional args instead of requiring --open as a gate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Distinguish three filtering modes in runFixOpen and runFixBatch: - Default (no flags): pass "" to filterReachableJobs so it uses commit-graph reachability for SHA/range refs, preserving the safety constraint that fixes match the current checkout. - --branch X (explicitBranch=true): pass the branch name as branchOverride for branch-field matching, enabling cross-branch fixing from worktrees. - --all-branches (allBranches=true): skip filterReachableJobs entirely. Update the filterReachableJobs doc comment to reflect the current design. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
|
Non-issues in practice. Merging |
Summary
roborev fix --all-branchesand--branch <name>not discovering jobs from other branches when run from a git worktree —filterReachableJobswas called with an empty branch override, causing it to filter by the worktree's branch instead of the requested branch--openand--unaddressedflags — open job discovery is now the default behavior when no positional job IDs are provided; both flags are hidden and silently ignored for backwards compatibilityallBranchesandexplicitBranchthroughrunFixOpen/runFixBatchto distinguish three filtering modes: default (commit-graph reachability),--branch X(branch-field matching for cross-branch fixing), and--all-branches(skip filtering)