diff --git a/lib/src/gitignore.rs b/lib/src/gitignore.rs index 29cbdaad2..f7da4aba5 100644 --- a/lib/src/gitignore.rs +++ b/lib/src/gitignore.rs @@ -53,6 +53,7 @@ impl GitIgnoreLine { } fn parse(prefix: &str, input: &str) -> Result, GitIgnoreParseError> { + assert!(prefix.is_empty() || prefix.ends_with('/')); if input.starts_with('#') { return Ok(None); }