File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,8 +38,7 @@ git_index_line_pattern="^($color_code_regex)index .*"
3838
3939format_diff_header () {
4040 # simplify the unified patch diff header
41- $SED -E " s/^($color_code_regex )diff --git .*$//g" \
42- | $SED -E " /$git_index_line_pattern /{N;s/$git_index_line_pattern \n//;}" \
41+ $SED -E " /$git_index_line_pattern /{N;s/$git_index_line_pattern \n//;}" \
4342 | $SED -E " s/^($color_code_regex )\-\-\-(.*)$/\1$( print_horizontal_rule) \\ ${NL} \1\-\-\-\-\5/g" \
4443 | $SED -E " s/^($color_code_regex )\+\+\+(.*)$/\1\+\+\+\+\5\\ ${NL} \1$( print_horizontal_rule) /g"
4544}
@@ -53,10 +52,6 @@ mark_empty_lines () {
5352 $SED -E " s/^$color_code_regex [\+\-]$reset_color \s*$/$invert_color \1 $reset_escape /g"
5453}
5554
56- remove_first_empty_line () {
57- $SED -E ' 1 D'
58- }
59-
6055strip_leading_symbols () {
6156 # strip the + and -
6257 $SED -E " s/^($color_code_regex )[\+\-]/\1 /g"
@@ -81,7 +76,6 @@ cat $input \
8176 | format_diff_header \
8277 | colorize_context_line \
8378 | mark_empty_lines \
84- | remove_first_empty_line \
8579 | strip_leading_symbols \
8680 | strip_first_column \
8781 | print_header_clean
You can’t perform that action at this time.
0 commit comments