Skip to content

Commit 1113a59

Browse files
author
Scott Baker
committed
Leave the first line in, we're cleaning it in Perl now
1 parent d293ed7 commit 1113a59

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

diff-so-fancy

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ git_index_line_pattern="^($color_code_regex)index .*"
3838

3939
format_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-
6055
strip_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

0 commit comments

Comments
 (0)