@@ -821,7 +821,7 @@ test_expect_success 'diff that introduces a line with only tabs' '
821
821
echo "test" >x &&
822
822
git commit -m "initial" x &&
823
823
echo "{NTN}" | tr "NT" "\n\t" >>x &&
824
- git -c color. diff=always diff | test_decode_color >current &&
824
+ git diff --color | test_decode_color >current &&
825
825
826
826
cat >expected <<-\EOF &&
827
827
<BOLD>diff --git a/x b/x<RESET>
@@ -851,7 +851,7 @@ test_expect_success 'diff that introduces and removes ws breakages' '
851
851
echo "2. and a new line "
852
852
} >x &&
853
853
854
- git -c color. diff=always diff |
854
+ git diff --color |
855
855
test_decode_color >current &&
856
856
857
857
cat >expected <<-\EOF &&
@@ -923,50 +923,50 @@ test_expect_success 'ws-error-highlight test setup' '
923
923
924
924
test_expect_success ' test --ws-error-highlight option' '
925
925
926
- git -c color. diff=always diff --ws-error-highlight=default,old |
926
+ git diff --color --ws-error-highlight=default,old |
927
927
test_decode_color >current &&
928
928
test_cmp expect.default-old current &&
929
929
930
- git -c color. diff=always diff --ws-error-highlight=all |
930
+ git diff --color --ws-error-highlight=all |
931
931
test_decode_color >current &&
932
932
test_cmp expect.all current &&
933
933
934
- git -c color. diff=always diff --ws-error-highlight=none |
934
+ git diff --color --ws-error-highlight=none |
935
935
test_decode_color >current &&
936
936
test_cmp expect.none current
937
937
938
938
'
939
939
940
940
test_expect_success ' test diff.wsErrorHighlight config' '
941
941
942
- git -c color. diff=always -c diff .wsErrorHighlight=default,old diff |
942
+ git -c diff.wsErrorHighlight=default,old diff --color |
943
943
test_decode_color >current &&
944
944
test_cmp expect.default-old current &&
945
945
946
- git -c color. diff=always -c diff .wsErrorHighlight=all diff |
946
+ git -c diff.wsErrorHighlight=all diff --color |
947
947
test_decode_color >current &&
948
948
test_cmp expect.all current &&
949
949
950
- git -c color. diff=always -c diff .wsErrorHighlight=none diff |
950
+ git -c diff.wsErrorHighlight=none diff --color |
951
951
test_decode_color >current &&
952
952
test_cmp expect.none current
953
953
954
954
'
955
955
956
956
test_expect_success ' option overrides diff.wsErrorHighlight' '
957
957
958
- git -c color.diff=always -c diff.wsErrorHighlight=none \
959
- diff --ws-error-highlight=default,old |
958
+ git -c diff.wsErrorHighlight=none \
959
+ diff --color -- ws-error-highlight=default,old |
960
960
test_decode_color >current &&
961
961
test_cmp expect.default-old current &&
962
962
963
- git -c color.diff=always -c diff.wsErrorHighlight=default \
964
- diff --ws-error-highlight=all |
963
+ git -c diff.wsErrorHighlight=default \
964
+ diff --color -- ws-error-highlight=all |
965
965
test_decode_color >current &&
966
966
test_cmp expect.all current &&
967
967
968
- git -c color.diff=always -c diff.wsErrorHighlight=all \
969
- diff --ws-error-highlight=none |
968
+ git -c diff.wsErrorHighlight=all \
969
+ diff --color -- ws-error-highlight=none |
970
970
test_decode_color >current &&
971
971
test_cmp expect.none current
972
972
0 commit comments