From 810d4eeef2f8158f0cb60753201886837907744c Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Thu, 17 Aug 2023 07:20:12 +0900 Subject: [PATCH] revset: use exact match for mine() --- lib/src/revset.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/revset.rs b/lib/src/revset.rs index ed634485f..82e2e95e2 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -1095,8 +1095,7 @@ static BUILTIN_FUNCTION_MAP: Lazy> = Lazy: map.insert("mine", |name, arguments_pair, state| { expect_no_arguments(name, arguments_pair)?; Ok(RevsetExpression::filter(RevsetFilterPredicate::Author( - // TODO: use exact match - StringPattern::Substring(state.user_email.to_owned()), + StringPattern::Literal(state.user_email.to_owned()), ))) }); map.insert("committer", |name, arguments_pair, state| { @@ -2865,7 +2864,7 @@ mod tests { assert_eq!( parse("mine()"), Ok(RevsetExpression::filter(RevsetFilterPredicate::Author( - StringPattern::Substring("test.user@example.com".to_string()) + StringPattern::Literal("test.user@example.com".to_string()) ))) ); assert_eq!(