summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Walton <bwalton@artsci.utoronto.ca>2012-01-09 21:47:33 -0500
committerJunio C Hamano <gitster@pobox.com>2012-01-09 20:43:48 -0800
commit8b9624c3741f3449510285fec21106bfee5d4942 (patch)
treed1c54e078caa75b02813999b996b948655979505
parentf3f778df6900881a7bac409c927931c32b82bcb5 (diff)
downloadgit-bw/maint-t8006-sed-incomplete-line.tar.gz
Use perl instead of sed for t8006-blame-textconv testbw/maint-t8006-sed-incomplete-line
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 <bwalton@artsci.utoronto.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t8006-blame-textconv.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh
index 4ee42f12f0..c3c22f7764 100755
--- a/t/t8006-blame-textconv.sh
+++ b/t/t8006-blame-textconv.sh
@@ -10,7 +10,7 @@ find_blame() {
cat >helper <<'EOF'
#!/bin/sh
grep -q '^bin: ' "$1" || { echo "E: $1 is not \"binary\" file" 1>&2; exit 1; }
-sed 's/^bin: /converted: /' "$1"
+perl -p -e 's/^bin: /converted: /' "$1"
EOF
chmod +x helper