Skip to content

Commit 90a9530

Browse files
bdwaltongitster
authored andcommitted
Change sed i\ usage to something Solaris' sed can handle
Solaris' sed was choking on the i\ commands used in t4015-diff-whitespace as it couldn't parse the program properly. Modify two uses of sed that worked in GNU sed but not Solaris' (/usr/bin or /usr/xpg4/bin) to an equivalent form that is handled properly by both. Signed-off-by: Ben Walton <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d092bf commit 90a9530

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/t4015-diff-whitespace.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ test_expect_success 'another test, with --ignore-space-at-eol' 'test_cmp expect
145145
test_expect_success 'ignore-blank-lines: only new lines' '
146146
test_seq 5 >x &&
147147
git update-index x &&
148-
test_seq 5 | sed "/3/i \\
148+
test_seq 5 | sed "/3/i\\
149+
\
149150
" >x &&
150151
git diff --ignore-blank-lines >out &&
151152
>expect &&
@@ -155,7 +156,8 @@ test_expect_success 'ignore-blank-lines: only new lines' '
155156
test_expect_success 'ignore-blank-lines: only new lines with space' '
156157
test_seq 5 >x &&
157158
git update-index x &&
158-
test_seq 5 | sed "/3/i \ " >x &&
159+
test_seq 5 | sed "/3/i\\
160+
" >x &&
159161
git diff -w --ignore-blank-lines >out &&
160162
>expect &&
161163
test_cmp out expect

0 commit comments

Comments
 (0)