3 # Copyright (c) Jim Meyering
5 test_description
='diff honors config option, diff.suppressBlankEmpty'
9 cat <<\EOF
>expected ||
11 index
5f6a263.
.8cb8bae
100644
21 test_expect_success
"$test_description" '
23 before=$(git hash-object f) &&
24 before=$(git rev-parse --short $before) &&
26 git commit -q -m. f &&
28 after=$(git hash-object f) &&
29 after=$(git rev-parse --short $after) &&
30 sed -e "s/^index .*/index $before..$after 100644/" expected >exp &&
31 git config --bool diff.suppressBlankEmpty true &&
32 git diff f > actual &&
33 test_cmp exp actual &&
34 perl -i.bak -p -e "s/^\$/ /" exp &&
35 git config --bool diff.suppressBlankEmpty false &&
36 git diff f > actual &&
37 test_cmp exp actual &&
38 git config --bool --unset diff.suppressBlankEmpty &&
39 git diff f > actual &&