Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-22 01:15:26 +0300
committerJunio C Hamano <gitster@pobox.com>2016-09-22 01:15:26 +0300
commit4ed38637ec6fa08b4bef42a35d87f95c0582b97b (patch)
treeebabad888f3f9af6cf34cbb45faa4dfc402bddcd /xdiff/xemit.c
parente9c6d3dcc2112f0d6190681211ea76b714fcd704 (diff)
parent45d2f75f913c0545be473db1dc2595a1600413f5 (diff)
Merge branch 'rs/xdiff-merge-overlapping-hunks-for-W-context'
"git diff -W" output needs to extend the context backward to include the header line of the current function and also forward to include the body of the entire current function up to the header line of the next one. This process may have to merge to adjacent hunks, but the code forgot to do so in some cases. * rs/xdiff-merge-overlapping-hunks-for-W-context: xdiff: fix merging of hunks with -W context and -u context
Diffstat (limited to 'xdiff/xemit.c')
-rw-r--r--xdiff/xemit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xdiff/xemit.c b/xdiff/xemit.c
index b52b4b9c1e..7389ce4102 100644
--- a/xdiff/xemit.c
+++ b/xdiff/xemit.c
@@ -239,7 +239,7 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
if (xche->next) {
long l = XDL_MIN(xche->next->i1,
xe->xdf1.nrec - 1);
- if (l <= e1 ||
+ if (l - xecfg->ctxlen <= e1 ||
get_func_line(xe, xecfg, NULL, l, e1) < 0) {
xche = xche->next;
goto post_context_calculation;