git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] diff-highlight: highlight range-diff
@ 2019-12-29 15:49 Jack Bates via GitGitGadget
  2019-12-29 15:49 ` [PATCH 1/1] " Jack Bates via GitGitGadget
  0 siblings, 1 reply; 3+ messages in thread
From: Jack Bates via GitGitGadget @ 2019-12-29 15:49 UTC (permalink / raw)
  To: git; +Cc: Jack Bates, Junio C Hamano

Piping git range-diff through diff-highlight currently has no effect, for
two reasons:

 1. There are ANSI escapes before and after the @@ hunk headers (when color
    is enabled) which diff-highlight fails to match. One solution is to
    match both escapes (/^$COLOR*\@\@$COLOR* /). This patch drops the
    trailing space from the existing pattern instead.
    
    
 2. Unlike git log, git range-diff diffs are indented, which diff-highlight
    also fails to match. This patch allows hunk headers preceded by any
    amount of whitespace, and then skips past that indentation when parsing
    subsequent lines, by reusing the machinery that handles the --graph
    output.
    
    

Signed-off-by: Jack Bates jack@nottheoilrig.com [jack@nottheoilrig.com]

Jack Bates (1):
  diff-highlight: highlight range-diff

 contrib/diff-highlight/DiffHighlight.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


base-commit: 0a76bd7381ec0dbb7c43776eb6d1ac906bca29e6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-684%2Fjablko%2Fpatch-1-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-684/jablko/patch-1-v1
Pull-Request: https://github.com/git/git/pull/684
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-28  7:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-29 15:49 [PATCH 0/1] diff-highlight: highlight range-diff Jack Bates via GitGitGadget
2019-12-29 15:49 ` [PATCH 1/1] " Jack Bates via GitGitGadget
2020-01-28  7:52   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).