aboutsummaryrefslogtreecommitdiffstats
path: root/diff.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-04-12 19:15:10 +0200
committerJunio C Hamano <gitster@pobox.com>2021-05-11 12:47:31 +0900
commitc9609398580518dffaadaace17188c901a4a4522 (patch)
tree25ae1ad072e1679c985263d657393bd05a5c1003 /diff.c
parentpickaxe tests: refactor to use test_commit --append --printf (diff)
downloadgit-c9609398580518dffaadaace17188c901a4a4522.tar.gz
git-c9609398580518dffaadaace17188c901a4a4522.zip
pickaxe tests: add test for diffgrep_consume() internals
In diffgrep_consume() we generate a diff, and then advance past the "+" or "-" at the start of the line for matching. This has been done ever since the code was added in f506b8e8b5f (git log/diff: add -G<regexp> that greps in the patch text, 2010-08-23). If we match "line" instead of "line + 1" no tests fail, i.e. we've got zero coverage for whether any of our searches match the beginning of the line or not. Let's add a test for this. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions