Re: [PATCH 3/4] diff-highlight: match up lines before highlighting

2015-11-16 Thread Jonathan Lebon
On Tue, Nov 3, 2015 at 5:03 PM, Jeff King wrote: > Your is _much_ slower. I get: > > real0m25.538s > user0m25.420s > sys 0m0.120s > > for the old versus: > > real2m3.580s > user2m3.548s > sys 0m0.156s Thanks for investigating and trying it out.

Re: [PATCH 1/4] diff-highlight: add `less -r` to cmd in README

2015-11-02 Thread Jonathan Lebon
On Mon, Nov 2, 2015 at 9:41 PM, Junio C Hamano <gits...@pobox.com> wrote: > > Jonathan Lebon <jonathan.le...@gmail.com> writes: > > > As it is, the suggested command for trying out diff-highlight will just > > dump the whole git log output to the terminal. Let's pi

[PATCH 4/4] diff-highlight: add maxhunksize config option

2015-11-02 Thread Jonathan Lebon
highlighting is still performed. The default value is set to 20. Signed-off-by: Jonathan Lebon <jonathan.le...@gmail.com> --- contrib/diff-highlight/README | 20 contrib/diff-highlight/diff-highlight | 16 2 files changed, 36 insertions(+) diff

[PATCH 1/4] diff-highlight: add `less -r` to cmd in README

2015-11-02 Thread Jonathan Lebon
As it is, the suggested command for trying out diff-highlight will just dump the whole git log output to the terminal. Let's pipe it through `less` so users aren't surprised on the first try. Signed-off-by: Jonathan Lebon <jonathan.le...@gmail.com> --- contrib/diff-highlight/README | 6 +++

[PATCH 2/4] diff-highlight: factor out prefix/suffix functions

2015-11-02 Thread Jonathan Lebon
In preparation for the next patch, we factor out the functions for finding the common prefix and suffix between two lines. Signed-off-by: Jonathan Lebon <jonathan.le...@gmail.com> --- contrib/diff-highlight/diff-highlight | 98 --- 1 file changed, 56 inse

[PATCH 3/4] diff-highlight: match up lines before highlighting

2015-11-02 Thread Jonathan Lebon
nes before highlighting them. This is done using a recursive algorithm. Note that I did not bother with some common optimizations such as memoization since the usual number of removed/added lines in a single hunk are small. In practice, I have not felt any lag at all during paging. Signed-off-by

[PATCH 0/4] diff-highlight: make a few improvements

2015-11-02 Thread Jonathan Lebon
ways to do things. (Let me know if that is the case!) Jonathan Lebon (4): diff-highlight: add `less -r` to cmd in README diff-highlight: factor out prefix/suffix functions diff-highlight: match up lines before highlighting diff-highlight: add maxhunksize config option contrib/diff