Git fork

t: introduce WITH_BREAKING_CHANGES prerequisite

Earlier c5bc9a7f (Makefile: wire up build option for deprecated
features, 2025-01-22) made an unfortunate decision to introduce the
WITHOUT_BREAKING_CHANGES prerequisite to perform tests that ensure
the historical behaviour that may be different from what we will
have in the future. It would inevitably invite double-negation when
we need to add tests to ensure the behaviour we want to have in the
future.

Introduce WITH_BREAKING_CHANGES prerequisite and replace the
existing uses of WITHOUT_BREAKING_CHANGES prerequisite. To catch
any future topics that add more uses of WITHOUT_BREAKING_CHANGES,
mark it as a removed prerequisite.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

+15 -10
+1 -1
t/t5323-pack-redundant.sh
··· 36 36 37 37 . ./test-lib.sh 38 38 39 - if ! test_have_prereq WITHOUT_BREAKING_CHANGES 39 + if test_have_prereq WITH_BREAKING_CHANGES 40 40 then 41 41 skip_all='skipping git-pack-redundant tests; built with breaking changes' 42 42 test_done
+3 -3
t/t5505-remote.sh
··· 1123 1123 Pull: refs/heads/next:refs/heads/origin2 1124 1124 EOF 1125 1125 1126 - test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/remotes' ' 1126 + test_expect_success !WITH_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/remotes' ' 1127 1127 git clone one five && 1128 1128 origin_url=$(pwd)/one && 1129 1129 ( ··· 1149 1149 ) 1150 1150 ' 1151 1151 1152 - test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches' ' 1152 + test_expect_success !WITH_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches' ' 1153 1153 git clone --template= one six && 1154 1154 origin_url=$(pwd)/one && 1155 1155 ( ··· 1165 1165 ) 1166 1166 ' 1167 1167 1168 - test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches (2)' ' 1168 + test_expect_success !WITH_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches (2)' ' 1169 1169 git clone --template= one seven && 1170 1170 ( 1171 1171 cd seven &&
+1 -1
t/t5515-fetch-merge-logic.sh
··· 104 104 git config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* && 105 105 remotes="$remotes config-glob" && 106 106 107 - if test_have_prereq WITHOUT_BREAKING_CHANGES 107 + if ! test_have_prereq WITH_BREAKING_CHANGES 108 108 then 109 109 mkdir -p .git/remotes && 110 110 cat >.git/remotes/remote-explicit <<-\EOF &&
+4 -4
t/t5516-fetch-push.sh
··· 975 975 ! grep "warning: updating the current branch" stderr 976 976 ' 977 977 978 - test_expect_success WITHOUT_BREAKING_CHANGES 'fetch with branches' ' 978 + test_expect_success !WITH_BREAKING_CHANGES 'fetch with branches' ' 979 979 mk_empty testrepo && 980 980 git branch second $the_first_commit && 981 981 git checkout second && ··· 991 991 git checkout main 992 992 ' 993 993 994 - test_expect_success WITHOUT_BREAKING_CHANGES 'fetch with branches containing #' ' 994 + test_expect_success !WITH_BREAKING_CHANGES 'fetch with branches containing #' ' 995 995 mk_empty testrepo && 996 996 mkdir testrepo/.git/branches && 997 997 echo "..#second" > testrepo/.git/branches/branch2 && ··· 1005 1005 git checkout main 1006 1006 ' 1007 1007 1008 - test_expect_success WITHOUT_BREAKING_CHANGES 'push with branches' ' 1008 + test_expect_success !WITH_BREAKING_CHANGES 'push with branches' ' 1009 1009 mk_empty testrepo && 1010 1010 git checkout second && 1011 1011 ··· 1022 1022 ) 1023 1023 ' 1024 1024 1025 - test_expect_success WITHOUT_BREAKING_CHANGES 'push with branches containing #' ' 1025 + test_expect_success !WITH_BREAKING_CHANGES 'push with branches containing #' ' 1026 1026 mk_empty testrepo && 1027 1027 1028 1028 test_when_finished "rm -rf .git/branches" &&
+6 -1
t/test-lib.sh
··· 1862 1862 curl --version 1863 1863 ' 1864 1864 1865 + test_lazy_prereq WITH_BREAKING_CHANGES ' 1866 + test -n "$WITH_BREAKING_CHANGES" 1867 + ' 1868 + 1865 1869 test_lazy_prereq WITHOUT_BREAKING_CHANGES ' 1866 - test -z "$WITH_BREAKING_CHANGES" 1870 + # Signal that this prereq should not be used. 1871 + exit 125 1867 1872 ' 1868 1873 1869 1874 # SHA1 is a test if the hash algorithm in use is SHA-1. This is both for tests