File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2626fi
2727
2828CSI=$' \x1b \['
29+ NL="
30+ "
2931color_code_regex=" (${CSI} ([0-9]{1,3}(;[0-9]{1,3}){0,3})[m|K])?"
3032reset_color=" ${CSI} 0?m"
3133reset_escape=" ${CSI} m"
@@ -38,8 +40,8 @@ format_diff_header () {
3840 # simplify the unified patch diff header
3941 $SED -E " s/^($color_code_regex )diff --git .*$//g" \
4042 | $SED -E " /$git_index_line_pattern /{N;s/$git_index_line_pattern \n//;}" \
41- | $SED -E " s/^($color_code_regex )\-\-\-(.*)$/\1$( print_horizontal_rule) \\ n\1 \-\-\-\5/g" \
42- | $SED -E " s/^($color_code_regex )\+\+\+(.*)$/\1\+\+\+\5\\ n \1$( print_horizontal_rule) /g"
43+ | $SED -E " s/^($color_code_regex )\-\-\-(.*)$/\1$( print_horizontal_rule) \\ ${NL} \1\- \-\-\-\5/g" \
44+ | $SED -E " s/^($color_code_regex )\+\+\+(.*)$/\1\+\+\+\+\ 5\\ ${NL} \1$( print_horizontal_rule) /g"
4345}
4446
4547colorize_context_line () {
You can’t perform that action at this time.
0 commit comments