aboutsummaryrefslogtreecommitdiffstats
path: root/git.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-03-30 15:30:47 -0400
committerJunio C Hamano <gitster@pobox.com>2023-03-30 13:07:29 -0700
commit750b2604118b4b7d9983f77adeb36d839107861f (patch)
treea56553f1084d9c7465467ea1e5a0bcde49d9d406 /git.c
parenttests: diagnose unclosed here-doc in chainlint.pl (diff)
downloadgit-750b2604118b4b7d9983f77adeb36d839107861f.tar.gz
git-750b2604118b4b7d9983f77adeb36d839107861f.zip
tests: drop here-doc check from internal chain-linter
Commit 99a64e4b73c (tests: lint for run-away here-doc, 2017-03-22) tweaked the chain-lint test to catch unclosed here-docs. It works by adding an extra "echo" command after the test snippet, and checking that it is run (if it gets swallowed by a here-doc, naturally it is not run). The downside here is that we introduced an extra $() substitution, which happens in a subshell. This has a measurable performance impact when run for many tests. The tradeoff in safety was undoubtedly worth it when 99a64e4b73c was written. But since the external chainlint.pl learned to find these recently, we can just rely on it. By switching back to a simpler chain-lint, hyperfine reports a measurable speedup on t3070 (which has 1800 tests): 'HEAD' ran 1.12 ± 0.01 times faster than 'HEAD~1' Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions