mirror of
https://github.com/git/git.git
synced 2026-01-17 14:21:57 +00:00
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 <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -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 <fixed)
|
||||
|
||||
Reference in New Issue
Block a user