Bug 1894160: hgignore: drop the negative lookahead assertion around vscode; r=sheehan

This lookahead prevents the use of more modern and efficient regexp engine
slowing down status.

In practice we only have two vscode directory tracked in Mercurial:
* the root one, that see active development,
* the one in "remote/test/puppeteer/" that was never touched since its addition.

It is easy to not match the root in the hgignore, but harder for the other one.

Please note that once a file is tracked by Mercurial, the fact it is ignored or
not no longer matters, so in practice this will only affect "future" addition.

However the history shows that this addition are extremely rare (one in over 15
years) and that the only occurrence is some venturing, where the vscode file
seems less important.

So dropping this exception seems fine, the small inconvenience of having to
manually add the file in an hypothetical future is negligible compared to
concrete performance improvement of common operation to everyone.

See the other changesets dropping the second lookahead patterns for performance
number.

Differential Revision: https://phabricator.services.mozilla.com/D208967
This commit is contained in:
Pierre-Yves David 2024-05-01 14:54:58 +00:00
parent d46f8f0571
commit debf431a77
2 changed files with 6 additions and 10 deletions

8
.gitignore vendored
View file

@ -293,13 +293,9 @@ toolchains.json
lextab.py lextab.py
# Ignore Visual Studio/Visual Studio Code workspace files. # Ignore Visual Studio/Visual Studio Code workspace files.
# (but the root .vscode directory)
.vs/ .vs/
# lint-ignore-next-line: syntax-difference */.vscode/
.vscode/
# lint-ignore-next-line: syntax-difference
!.vscode/extensions.json
# lint-ignore-next-line: syntax-difference
!.vscode/tasks.json
*.user *.user
# Thunderbird source tree # Thunderbird source tree

View file

@ -289,10 +289,10 @@ tps_result\.json$
^lextab\.py$ ^lextab\.py$
# Ignore Visual Studio/Visual Studio Code workspace files. # Ignore Visual Studio/Visual Studio Code workspace files.
^\.vs/ # (but the root .vscode directory)
# lint-ignore-next-line: syntax-difference \.vs/
^\.vscode/(?!extensions\.json$|tasks\.json$) .+/\.vscode/
.*\.user$ \.user$
# Thunderbird source tree # Thunderbird source tree
^comm/ ^comm/