Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jk/diff-highlight-blank-match-fix'
"diff-highlight" (in contrib/) had a logic to flush its output upon
seeing a blank line but the way it detected a blank line was broken.

* jk/diff-highlight-blank-match-fix:
  diff-highlight: correctly match blank lines for flush
  • Loading branch information
gitster committed Sep 25, 2020
2 parents b5847b9 + 579789d commit 0335915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/diff-highlight/DiffHighlight.pm
Expand Up @@ -112,7 +112,7 @@ sub handle_line {
# Since we can receive arbitrary input, there's no optimal
# place to flush. Flushing on a blank line is a heuristic that
# happens to match git-log output.
if (!length) {
if (/^$/) {
$flush_cb->();
}
}
Expand Down

0 comments on commit 0335915

Please sign in to comment.