[PATCH v2 00/22] pickaxe: test and refactoring for follow-up changes
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 16, 2021, 11:57 UTC
- Message-ID
- <20210216115801.4773-1-avarab@gmail.com>
- In-Reply-To
- <20210203032811.14979-1-avarab@gmail.com>
This is a smaller v2 of the series to remove the kwset backend and make pickaxe use PCRE v2[1].
That's not being done here yet. These are mostly small refactoring/test fixes. The most significant work is a new xdiff interface at the end of the series.
It's based on next where some preparatory work already landed[2].
The endless loop bug in v1 pointed out by René Scharfe[3] is gone. We should still have a test for that, I didn't have time to do more on that, and figured this was already getting large enough.
I'll do some more improvements of test coverage in a follow-up series. I'm aware of various blind spots in pickaxe test coverage, but none of it should hide a bug in this refactoring from us.
It's things like how we deal with REG_NEWLINE, "^" matches etc., but all the matching logic for that stays the same in this series.
1. https://lore.kernel.org/git/20210203032811.14979-1-avarab@gmail.com/ 2. https://lore.kernel.org/git/20210204210556.25242-1-avarab@gmail.com/ 3. https://lore.kernel.org/git/4ef09db7-34f2-2fb5-b9e9-be69c7102787@web.de/
Ævar Arnfjörð Bjarmason (22):
grep/pcre2 tests: reword comments referring to kwset
test-lib-functions: document and test test_commit --no-tag
test-lib-functions: reword "test_commit --append" docs
test-lib functions: add --printf option to test_commit
pickaxe tests: refactor to use test_commit --append --printf
pickaxe tests: add test for diffgrep_consume() internals
pickaxe tests: add test for "log -S" not being a regex
pickaxe tests: test for -G, -S and --find-object incompatibility
pickaxe: die when -G and --pickaxe-regex are combined
pickaxe: die when --find-object and --pickaxe-all are combined
diff.h: move pickaxe fields together again
pickaxe/style: consolidate declarations and assignments
perf: add performance test for pickaxe
pickaxe: refactor function selection in diffcore-pickaxe()
pickaxe: assert that we must have a needle under -G or -S
pickaxe -S: support content with NULs under --pickaxe-regex
pickaxe: rename variables in has_changes() for brevity
pickaxe -S: slightly optimize contains()
xdiff-interface: allow early return from xdiff_emit_{line,hunk}_fn
xdiff-interface: support early exit in xdiff_outf()
pickaxe -G: terminate early on matching lines
pickaxe -G: don't special-case create/deletecombine-diff.c | 9 ++- diff.c | 45 +++++++++------ diff.h | 7 ++- diffcore-pickaxe.c | 99 ++++++++++++++++++-------------- range-diff.c | 8 ++- t/perf/p4209-pickaxe.sh | 70 +++++++++++++++++++++++ t/t0000-basic.sh | 19 +++++++ t/t1307-config-blob.sh | 4 +- t/t2030-unresolve-info.sh | 3 +- t/t4006-diff-mode.sh | 6 +- t/t4030-diff-textconv.sh | 8 +-- t/t4209-log-pickaxe.sh | 100 +++++++++++++++++++++++++++------ t/t5520-pull.sh | 10 +--- t/t7816-grep-binary-pattern.sh | 4 +- t/test-lib-functions.sh | 23 ++++++-- xdiff-interface.c | 26 ++++++--- xdiff-interface.h | 36 +++++++++--- 17 files changed, 349 insertions(+), 128 deletions(-) create mode 100755 t/perf/p4209-pickaxe.sh
-- 2.30.0.284.gd98b1dd5eaa7