comparison tests/test-narrow-commit.t @ 40816:3984409e144b

match: drop unnecessary wrapping of regex in group It seems the regexes have been wrapped in an unnamed group since b6c42714d900 (Add locate command., 2005-07-05). In that commit, the grouping was needed because there was a "head" ('^') added before the group and a "tail" (os.sep) added after it. It seems the head was moved inside the group in 1c0c413cccdd (Get add and locate to use new repo and dirstate walk code., 2005-07-18) and the tail was moved inside the group in 89985a1b3427 (Clean up walk and changes code to use normalised names properly., 2005-07-31), So it seems to me that we've carried around the unnecessary group for 13 years. This patch removes it. Differential Revision: https://phab.mercurial-scm.org/D5352
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 02 Dec 2018 13:09:46 -0800
parents 2cf18f46a1ce
children cc33deae66a1
comparison
equal deleted inserted replaced
40815:e115a6452b41 40816:3984409e144b
49 49
50 $ mkdir outside 50 $ mkdir outside
51 $ touch outside/f1 51 $ touch outside/f1
52 $ hg debugwalk -v -I 'relglob:f1' 52 $ hg debugwalk -v -I 'relglob:f1'
53 * matcher: 53 * matcher:
54 <includematcher includes='(?:(?:|.*/)f1(?:/|$))'> 54 <includematcher includes='(?:|.*/)f1(?:/|$)'>
55 f inside/f1 inside/f1 55 f inside/f1 inside/f1
56 $ hg add . 56 $ hg add .
57 $ hg add outside/f1 57 $ hg add outside/f1
58 abort: cannot track 'outside/f1' - it is outside the narrow clone 58 abort: cannot track 'outside/f1' - it is outside the narrow clone
59 [255] 59 [255]