diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-07-13 23:52:50 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-13 23:52:50 (GMT) |
commit | 4da281e84d87b099ba8d0a255534dc1251be968e (patch) | |
tree | 5919bdb367772fbbbe822f72f33ea2256b94d33a /builtin | |
parent | c9780bb2ca81828ec4f43c60b2107c335271a72f (diff) | |
parent | 5d93460024541909337d6b08a8bec10b71caaf73 (diff) | |
download | git-4da281e84d87b099ba8d0a255534dc1251be968e.zip git-4da281e84d87b099ba8d0a255534dc1251be968e.tar.gz git-4da281e84d87b099ba8d0a255534dc1251be968e.tar.bz2 |
Merge branch 'ab/pickaxe-pcre2'
Rewrite the backend for "diff -G/-S" to use pcre2 engine when
available.
* ab/pickaxe-pcre2: (22 commits)
xdiff-interface: replace discard_hunk_line() with a flag
xdiff users: use designated initializers for out_line
pickaxe -G: don't special-case create/delete
pickaxe -G: terminate early on matching lines
xdiff-interface: allow early return from xdiff_emit_line_fn
xdiff-interface: prepare for allowing early return
pickaxe -S: slightly optimize contains()
pickaxe: rename variables in has_changes() for brevity
pickaxe -S: support content with NULs under --pickaxe-regex
pickaxe: assert that we must have a needle under -G or -S
pickaxe: refactor function selection in diffcore-pickaxe()
perf: add performance test for pickaxe
pickaxe/style: consolidate declarations and assignments
diff.h: move pickaxe fields together again
pickaxe: die when --find-object and --pickaxe-all are combined
pickaxe: die when -G and --pickaxe-regex are combined
pickaxe tests: add missing test for --no-pickaxe-regex being an error
pickaxe tests: test for -G, -S and --find-object incompatibility
pickaxe tests: add test for "log -S" not being a regex
pickaxe tests: add test for diffgrep_consume() internals
...
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/merge-tree.c | 5 | ||||
-rw-r--r-- | builtin/rerere.c | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index de85207..5dc94d6 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -107,15 +107,12 @@ static void show_diff(struct merge_list *entry) mmfile_t src, dst; xpparam_t xpp; xdemitconf_t xecfg; - xdemitcb_t ecb; + xdemitcb_t ecb = { .out_line = show_outf }; memset(&xpp, 0, sizeof(xpp)); xpp.flags = 0; memset(&xecfg, 0, sizeof(xecfg)); xecfg.ctxlen = 3; - ecb.out_hunk = NULL; - ecb.out_line = show_outf; - ecb.priv = NULL; src.ptr = origin(entry, &size); if (!src.ptr) diff --git a/builtin/rerere.c b/builtin/rerere.c index fd3be17..83d7a77 100644 --- a/builtin/rerere.c +++ b/builtin/rerere.c @@ -28,7 +28,7 @@ static int diff_two(const char *file1, const char *label1, { xpparam_t xpp; xdemitconf_t xecfg; - xdemitcb_t ecb; + xdemitcb_t ecb = { .out_line = outf }; mmfile_t minus, plus; int ret; @@ -41,8 +41,6 @@ static int diff_two(const char *file1, const char *label1, xpp.flags = 0; memset(&xecfg, 0, sizeof(xecfg)); xecfg.ctxlen = 3; - ecb.out_hunk = NULL; - ecb.out_line = outf; ret = xdi_diff(&minus, &plus, &xpp, &xecfg, &ecb); free(minus.ptr); |