Re: [PATCH 7/7] diff-highlight: detect --graph by indent

2018-03-22 Thread Jeff King
On Thu, Mar 22, 2018 at 10:59:31AM +, Phillip Wood wrote: > > +sub handle_line { > > + my $orig = shift; > > + local $_ = $orig; > > + > > + # match a graph line that begins a commit > > + if (/^(?:$COLOR?\|$COLOR?[ ])* # zero or more leading "|" with space > > +$COLOR?\*$C

Re: [PATCH 7/7] diff-highlight: detect --graph by indent

2018-03-22 Thread Phillip Wood
On 21/03/18 05:59, Jeff King wrote: > This patch fixes a corner case where diff-highlight may > scramble some diffs when combined with --graph. > > Commit 7e4ffb4c17 (diff-highlight: add support for --graph > output, 2016-08-29) taught diff-highlight to skip past the > graph characters at the star

[PATCH 7/7] diff-highlight: detect --graph by indent

2018-03-20 Thread Jeff King
This patch fixes a corner case where diff-highlight may scramble some diffs when combined with --graph. Commit 7e4ffb4c17 (diff-highlight: add support for --graph output, 2016-08-29) taught diff-highlight to skip past the graph characters at the start of each line with this regex: ($COLOR?\|$CO