File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,10 @@ git_index_line_pattern="^($color_code_regex)index .*"
3131
3232format_diff_header () {
3333 # simplify the unified patch diff header
34- $SED -E " s/^($color_code_regex )diff --git .*$//g" | \
35- $SED -E " /$git_index_line_pattern /{N;s/$git_index_line_pattern \n//}" | \
36- $SED -E " s/^($color_code_regex )\-\-\-(.*)$/\1$( print_horizontal_rule) \\
37- \1\-\-\-\5/g" | \
38- $SED -E " s/^($color_code_regex )\+\+\+(.*)$/\1\+\+\+\5\\
39- \1$( print_horizontal_rule) /g"
34+ $SED -E " s/^($color_code_regex )diff --git .*$//g" \
35+ | $SED -E " /$git_index_line_pattern /{N;s/$git_index_line_pattern \n//}" \
36+ | $SED -E " s/^($color_code_regex )\-\-\-(.*)$/\1$( print_horizontal_rule) \\ n\1\-\-\-\5/g" \
37+ | $SED -E " s/^($color_code_regex )\+\+\+(.*)$/\1\+\+\+\5\\ n\1$( print_horizontal_rule) /g"
4038}
4139
4240colorize_context_line () {
@@ -58,4 +56,9 @@ print_horizontal_rule () {
5856}
5957
6058# run it.
61- cat $input | $diff_highlight | format_diff_header | colorize_context_line | mark_empty_lines | strip_leading_symbols
59+ cat $input \
60+ | $diff_highlight \
61+ | format_diff_header \
62+ | colorize_context_line \
63+ | mark_empty_lines \
64+ | strip_leading_symbols
You can’t perform that action at this time.
0 commit comments