]> git.99rst.org Git - git.git/commit
t2400: rewrite regex to avoid unintentional PCRE
authorJacob Abel <redacted>
Wed, 26 Jul 2023 21:42:34 +0000 (21:42 +0000)
committerJunio C Hamano <redacted>
Wed, 26 Jul 2023 21:49:02 +0000 (14:49 -0700)
commitd1b72cb36487772fa70217f4234c886db7a5892f
treea1f2c8b5598a74c460fb136bab8940647ed04936
parent7e42d4bf15b5d8fee1f43cefdc49cf516e94bc27
t2400: rewrite regex to avoid unintentional PCRE

Replace all cases of `\s` with ` ` as it is not part of POSIX BRE or ERE
and therefore not all versions of grep handle it.

For the same reason all cases of `\S` are replaced with `[^ ]`. It is
not an exact replacement but it is close enough for this use case.

Also, do not write `\+` in BRE and expect it to mean 1 or more;
it is a GNU extension that may not work everywhere.

Remove `.*` from the end of a pattern that is not right-anchored.

Signed-off-by: Jacob Abel <redacted>
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t2400-worktree-add.sh
git clone https://git.99rst.org/PROJECT