This is a restart of the 35-patch v3 of this topic at https://lore.kernel.org/git/20210224195129.4004-1-avarab@xxxxxxxxx/ I still plan on submitting the rest of it, but wanted to start with the early parts of that series that hasn't been controversial or has outstanding feedback I haven't addressed. The range-diff to v3 is just for those patches I'm re-rolling here. Ævar Arnfjörð Bjarmason (10): userdiff: refactor away the parse_bool() function userdiff style: re-order drivers in alphabetical order userdiff style: declare patterns with consistent style userdiff style: normalize pascal regex declaration userdiff: add and use for_each_userdiff_driver() userdiff tests: explicitly test "default" pattern userdiff tests: list builtin drivers via test-tool userdiff: remove support for "broken" tests blame tests: don't rely on t/t4018/ directory blame tests: simplify userdiff driver test Makefile | 1 + t/annotate-tests.sh | 34 ++++---- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/helper/test-userdiff.c | 31 +++++++ t/t4018-diff-funcname.sh | 39 ++------- t/t4018/README | 3 - userdiff.c | 178 ++++++++++++++++++++++++--------------- userdiff.h | 15 ++++ 9 files changed, 186 insertions(+), 117 deletions(-) create mode 100644 t/helper/test-userdiff.c Range-diff: 1: 0be132b05e2 = 1: fb7346cd296 userdiff: refactor away the parse_bool() function 2: d1e00a739ac = 2: 149387155bc userdiff style: re-order drivers in alphabetical order 3: b99bd158d45 = 3: faf1a824f05 userdiff style: declare patterns with consistent style 4: 9ce6d47021c = 4: 1e9ddcd1a9a userdiff style: normalize pascal regex declaration 5: 369fbdcee83 = 5: 64ea5e8443f userdiff: add and use for_each_userdiff_driver() 6: 70d62a97211 = 6: 862f6ab5d66 userdiff tests: explicitly test "default" pattern 7: 792421a2f8b = 7: 22a07591b76 userdiff tests: list builtin drivers via test-tool 8: 9081e2a152e ! 8: 7755db95014 userdiff: remove support for "broken" tests @@ Commit message There have been no "broken" tests since 75c3b6b2e8 (userdiff: improve Fortran xfuncname regex, 2020-08-12). Let's remove the test support - for them, this is in preparation for a more general refactoring of the - tests. + for them. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 9: d3652f95d5e ! 9: 4e0b4b42e16 blame tests: don't rely on t/t4018/ directory @@ Commit message with userdiff driver, 2020-11-01) so that the blame tests don't rely on stealing the contents of "t/t4018/fortran-external-function". - I'm about to change that file in a subsequent commit. Just moving the - relevant test file here inline is the easiest solution, and I think - also the most readable. + I have another patch series that'll possibly (or not) refactor that + file, but having this test inter-dependency makes things simple in any + case by making this test more readable. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 10: 35d12779ea1 ! 10: ce98c61bf40 blame tests: simplify userdiff driver test @@ Commit message test_commit, 2021-01-12). We also did not need the full fortran-external-function content. Let's - cut it down to just the important parts, and further modify it to - demonstrate that the fortran-specific userdiff function is in effect - by adding "DO NOT MATCH ..." and "AS THE ..." lines surrounding the - "RIGHT" one. This is to check that we're using the userdiff "fortran" - driver, as opposed to the default driver. + cut it down to just the important parts. - The test also left behind a .gitattributes files, let's clean it up - with "test_when_finished". + I'm modifying it to demonstrate that the fortran-specific userdiff + function is in effect by adding "DO NOT MATCH ..." and "AS THE ..." + lines surrounding the "RIGHT" one. + + This is to check that we're using the userdiff "fortran" driver, as + opposed to the default driver which would match on those lines as part + of the general heuristic of matching a line that doesn't begin with + whitespace. + + The test had also been leaving behind a .gitattributes file for later + tests to possibly trip over, let's clean it up with + "test_when_finished". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> -- 2.31.0.366.ga80606b22c1