From 9dbc8de85c85bcf5bc2546e36123104fba281b10 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 5 Jul 2017 22:21:57 +0200 Subject: [PATCH] t4124: avoid using "normal" diff mode Everybody and their dogs, cats and other pets settled on using unified diffs. It is a really quaint holdover from a long-gone era that GNU diff outputs "normal" diff by default. Yet, t4124 relied on that mode. This mode is so out of fashion in the meantime, though, that e.g. BusyBox' diff decided not even to bother to support it. It only supports unified diffs. So let's just switch away from "normal" diffs and use unified diffs, as we really are only interested in the `+` lines. Signed-off-by: Johannes Schindelin --- t/t4124-apply-ws-rule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh index 7e32237a2a..076c9d95ef 100755 --- a/t/t4124-apply-ws-rule.sh +++ b/t/t4124-apply-ws-rule.sh @@ -45,7 +45,7 @@ test_fix () { apply_patch --whitespace=fix || return 1 # find touched lines - $DIFF file target | sed -n -e "s/^> //p" >fixed + $DIFF -u file target | sed -n -e "3,\$s/^+//p" >fixed # the changed lines are all expected to change fixed_cnt=$(wc -l