mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 15:16:35 +00:00
revset: use exact match for mine()
This commit is contained in:
parent
7da7356ef7
commit
810d4eeef2
1 changed files with 2 additions and 3 deletions
|
@ -1095,8 +1095,7 @@ static BUILTIN_FUNCTION_MAP: Lazy<HashMap<&'static str, RevsetFunction>> = Lazy:
|
||||||
map.insert("mine", |name, arguments_pair, state| {
|
map.insert("mine", |name, arguments_pair, state| {
|
||||||
expect_no_arguments(name, arguments_pair)?;
|
expect_no_arguments(name, arguments_pair)?;
|
||||||
Ok(RevsetExpression::filter(RevsetFilterPredicate::Author(
|
Ok(RevsetExpression::filter(RevsetFilterPredicate::Author(
|
||||||
// TODO: use exact match
|
StringPattern::Literal(state.user_email.to_owned()),
|
||||||
StringPattern::Substring(state.user_email.to_owned()),
|
|
||||||
)))
|
)))
|
||||||
});
|
});
|
||||||
map.insert("committer", |name, arguments_pair, state| {
|
map.insert("committer", |name, arguments_pair, state| {
|
||||||
|
@ -2865,7 +2864,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse("mine()"),
|
parse("mine()"),
|
||||||
Ok(RevsetExpression::filter(RevsetFilterPredicate::Author(
|
Ok(RevsetExpression::filter(RevsetFilterPredicate::Author(
|
||||||
StringPattern::Substring("test.user@example.com".to_string())
|
StringPattern::Literal("test.user@example.com".to_string())
|
||||||
)))
|
)))
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|
Loading…
Reference in a new issue