diff rust/rhg/src/error.rs @ 49532:8076298b795a stable

rhg: fallback to slow path on invalid patterns in hgignore
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Mon, 31 Oct 2022 16:15:54 +0000
parents 7c93e38a0bbd
children 58074252db3c
line wrap: on
line diff
--- a/rust/rhg/src/error.rs	Mon Oct 31 16:15:30 2022 +0000
+++ b/rust/rhg/src/error.rs	Mon Oct 31 16:15:54 2022 +0000
@@ -221,7 +221,12 @@
 
 impl From<StatusError> for CommandError {
     fn from(error: StatusError) -> Self {
-        CommandError::abort(format!("{}", error))
+        match error {
+            StatusError::Pattern(_) => {
+                CommandError::unsupported(format!("{}", error))
+            }
+            _ => CommandError::abort(format!("{}", error)),
+        }
     }
 }