diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-13 22:37:27 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-13 22:37:27 +0900 |
commit | 39d23dfa409e51844ddda99599927092c8300f12 (patch) | |
tree | f4975a66a1fb9c33a875fe72042e9b7c75519597 /diffcore-pickaxe.c | |
parent | Merge branch 'jk/misc-unused-fixes' (diff) | |
parent | xdiff-interface: drop parse_hunk_header() (diff) | |
download | tgif-39d23dfa409e51844ddda99599927092c8300f12.tar.xz |
Merge branch 'jk/xdiff-interface'
The interface into "xdiff" library used to discover the offset and
size of a generated patch hunk by first formatting it into the
textual hunk header "@@ -n,m +k,l @@" and then parsing the numbers
out. A new interface has been introduced to allow callers a more
direct access to them.
* jk/xdiff-interface:
xdiff-interface: drop parse_hunk_header()
range-diff: use a hunk callback
diff: convert --check to use a hunk callback
combine-diff: use an xdiff hunk callback
diff: use hunk callback for word-diff
diff: discard hunk headers for patch-ids earlier
diff: avoid generating unused hunk header lines
xdiff-interface: provide a separate consume callback for hunks
xdiff: provide a separate emit callback for hunks
Diffstat (limited to 'diffcore-pickaxe.c')
-rw-r--r-- | diffcore-pickaxe.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index d2361e06a1..69fc55ea1e 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -62,7 +62,8 @@ static int diff_grep(mmfile_t *one, mmfile_t *two, ecbdata.hit = 0; xecfg.ctxlen = o->context; xecfg.interhunkctxlen = o->interhunkcontext; - if (xdi_diff_outf(one, two, diffgrep_consume, &ecbdata, &xpp, &xecfg)) + if (xdi_diff_outf(one, two, discard_hunk_line, diffgrep_consume, + &ecbdata, &xpp, &xecfg)) return 0; return ecbdata.hit; } |