Skip to content

Commit 8b9624c

Browse files
Ben Waltongitster
authored andcommitted
Use perl instead of sed for t8006-blame-textconv test
In test 'blame --textconv with local changes' of t8006-blame-textconv, using /usr/xpg4/bin/sed (as set by SANE_TOOL_PATH), an additional newline was added to the output from the 'helper' script. This was noted by sed with a message such as: sed: Missing newline at end of file zero.bin. Sed then exits with status 2 causing the helper script to also exit with status 2. In turn, this was triggering a fatal error from git blame: fatal: unable to read files to diff To work around this difference in sed behaviour, use perl -p instead of sed -e as it exits cleanly and does not insert the additional newline. Signed-off-by: Ben Walton <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f3f778d commit 8b9624c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t8006-blame-textconv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ find_blame() {
1010
cat >helper <<'EOF'
1111
#!/bin/sh
1212
grep -q '^bin: ' "$1" || { echo "E: $1 is not \"binary\" file" 1>&2; exit 1; }
13-
sed 's/^bin: /converted: /' "$1"
13+
perl -p -e 's/^bin: /converted: /' "$1"
1414
EOF
1515
chmod +x helper
1616

0 commit comments

Comments
 (0)