Re: [PATCH] xdiff: trim common tail with -U0 after diff

2017-06-23 Thread Daniel Hahler
On 23.06.2017 22:39, René Scharfe wrote: > The changed test script passes just fine for me even without your change > to xdiff-interface.c, which is odd. Sorry, I've apparently messed this up - it seems to be the case for me, too. I would assume that using the functions.c context/diff in this te

Re: [PATCH] xdiff: trim common tail with -U0 after diff

2017-06-23 Thread René Scharfe
Am 23.06.2017 um 12:36 schrieb Daniel Hahler: When -U0 is used, trim_common_tail should be called after `xdl_diff`, so that `--indent-heuristic` (and other diff processing) works as expected. It also removes the check for `!(xecfg->flags & XDL_EMIT_FUNCCONTEXT)` added in e0876bca4, which does no

Re: [PATCH] xdiff: trim common tail with -U0 after diff

2017-06-23 Thread Junio C Hamano
Stefan Beller writes: > So I tried finding out more about this hack, > and found the patch that introduced the common tail trimming at > https://public-inbox.org/git/7vmysez0oa@gitster.siamese.dyndns.org/ > 913b45f51b (xdi_diff: trim common trailing lines, 2007-12-13) A relevant one that

Re: [PATCH] xdiff: trim common tail with -U0 after diff

2017-06-23 Thread Stefan Beller
On Fri, Jun 23, 2017 at 12:13 PM, Junio C Hamano wrote: > Daniel Hahler writes: > >> When -U0 is used, trim_common_tail should be called after `xdl_diff`, so >> that `--indent-heuristic` (and other diff processing) works as expected. > > I thought common-tail trimming was a hack/optimization to a

Re: [PATCH] xdiff: trim common tail with -U0 after diff

2017-06-23 Thread Junio C Hamano
Daniel Hahler writes: > When -U0 is used, trim_common_tail should be called after `xdl_diff`, so > that `--indent-heuristic` (and other diff processing) works as expected. I thought common-tail trimming was a hack/optimization to avoid having to pass the whole thing to have xdl_diff() work on it

[PATCH] xdiff: trim common tail with -U0 after diff

2017-06-23 Thread Daniel Hahler
When -U0 is used, trim_common_tail should be called after `xdl_diff`, so that `--indent-heuristic` (and other diff processing) works as expected. It also removes the check for `!(xecfg->flags & XDL_EMIT_FUNCCONTEXT)` added in e0876bca4, which does not appear to be necessary anymore after moving th