ok/jj
1
0
Fork 0
forked from mirrors/jj

git-push: narrow search space of -rREVISIONS

This commit is contained in:
Yuya Nishihara 2024-03-17 14:19:11 +09:00
parent bc7a42a00e
commit 8de3932bda

View file

@ -1188,8 +1188,8 @@ fn find_branches_targeted_by_revisions<'a>(
workspace_command.evaluate_revset(current_branches_expression)?;
current_branches_revset.iter().collect()
} else {
// TODO: Narrow search space to local target commits.
let expression = workspace_command.parse_union_revsets(revisions)?;
let expression = workspace_command.parse_union_revsets(revisions)?
.intersection(&RevsetExpression::branches(StringPattern::everything()));
let revset = workspace_command.evaluate_revset(expression)?;
revset.iter().collect()
};