forked from mirrors/jj
gitignore: add assertion that prefix is empty or ends with '/'
This commit is contained in:
parent
03ae1b747c
commit
257ea39e68
1 changed files with 1 additions and 0 deletions
|
@ -53,6 +53,7 @@ impl GitIgnoreLine {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse(prefix: &str, input: &str) -> Result<Option<GitIgnoreLine>, GitIgnoreParseError> {
|
fn parse(prefix: &str, input: &str) -> Result<Option<GitIgnoreLine>, GitIgnoreParseError> {
|
||||||
|
assert!(prefix.is_empty() || prefix.ends_with('/'));
|
||||||
if input.starts_with('#') {
|
if input.starts_with('#') {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue