Submitter | phabricator |
---|---|
Date | July 17, 2019, 4:16 p.m. |
Message ID | <differential-rev-PHID-DREV-ze5npx2uw3pdvtlalw3p-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/40945/ |
State | Superseded |
Headers | show |
Comments
> While this assertion had good intentions, it broke existing behavior with a > nasty panic. So the hgignore parser doesn't handle `\#` correctly? https://www.mercurial-scm.org/repo/hg-committed/file/5672bb73f61e/rust/hg-core/src/filepatterns.rs#l251
yuja added a comment. > While this assertion had good intentions, it broke existing behavior with a > nasty panic. So the hgignore parser doesn't handle `\#` correctly? https://www.mercurial-scm.org/repo/hg-committed/file/5672bb73f61e/rust/hg-core/src/filepatterns.rs#l251 REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6651/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6651 To: Alphare, #hg-reviewers Cc: yuja, durin42, kevincox, mercurial-devel
Patch
diff --git a/rust/hg-core/src/utils.rs b/rust/hg-core/src/utils.rs --- a/rust/hg-core/src/utils.rs +++ b/rust/hg-core/src/utils.rs @@ -18,8 +18,7 @@ where T: Clone + PartialEq, { - assert_eq!(from.len(), to.len()); - if buf.len() < from.len() { + if buf.len() < from.len() || from.len() != to.len() { return; } for i in 0..=buf.len() - from.len() {