diff mbox series

[01/12] test-lib: remove check_var_migration

Message ID 20210209214159.22815-2-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series test-lib: misc improvements | expand

Commit Message

Ævar Arnfjörð Bjarmason Feb. 9, 2021, 9:41 p.m. UTC
Remove the check_var_migration() migration helper. This was added back
in [1], [2] and [3] to warn users to migrate from e.g. the
"GIT_FSMONITOR_TEST" name to "GIT_TEST_FSMONITOR".

I daresay that having been warning about this since late 2018 (or
v2.20.0) was sufficient time to give everyone interested a heads-up
about moving to the new names.

I don't see the need for going through the "do this later" codepath
anticipated in [1], let's just remove this instead.

1. 4cb54d0aa8e (fsmonitor: update GIT_TEST_FSMONITOR support,
   2018-09-18)
2. 1f357b045b5 (read-cache: update TEST_GIT_INDEX_VERSION support,
   2018-09-18)
3. 5765d97b71d (preload-index: update GIT_FORCE_PRELOAD_TEST support,
   2018-09-18)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/test-lib.sh | 30 ------------------------------
 1 file changed, 30 deletions(-)

Comments

Junio C Hamano Feb. 10, 2021, 10:06 p.m. UTC | #1
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Remove the check_var_migration() migration helper. This was added back
> in [1], [2] and [3] to warn users to migrate from e.g. the
> "GIT_FSMONITOR_TEST" name to "GIT_TEST_FSMONITOR".
>
> I daresay that having been warning about this since late 2018 (or
> v2.20.0) was sufficient time to give everyone interested a heads-up
> about moving to the new names.

As this is not end-user facing backward-compatibility issue, I am
perfectly fine with the abbreviated schedule.

Queued.
diff mbox series

Patch

diff --git a/t/test-lib.sh b/t/test-lib.sh
index 76062db2964..61bda88245c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -462,36 +462,6 @@  export GIT_DEFAULT_HASH
 GIT_TRACE_BARE=1
 export GIT_TRACE_BARE
 
-check_var_migration () {
-	# the warnings and hints given from this helper depends
-	# on end-user settings, which will disrupt the self-test
-	# done on the test framework itself.
-	case "$GIT_TEST_FRAMEWORK_SELFTEST" in
-	t)	return ;;
-	esac
-
-	old_name=$1 new_name=$2
-	eval "old_isset=\${${old_name}:+isset}"
-	eval "new_isset=\${${new_name}:+isset}"
-
-	case "$old_isset,$new_isset" in
-	isset,)
-		echo >&2 "warning: $old_name is now $new_name"
-		echo >&2 "hint: set $new_name too during the transition period"
-		eval "$new_name=\$$old_name"
-		;;
-	isset,isset)
-		# do this later
-		# echo >&2 "warning: $old_name is now $new_name"
-		# echo >&2 "hint: remove $old_name"
-		;;
-	esac
-}
-
-check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR
-check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION
-check_var_migration GIT_FORCE_PRELOAD_TEST GIT_TEST_PRELOAD_INDEX
-
 # Use specific version of the index file format
 if test -n "${GIT_TEST_INDEX_VERSION:+isset}"
 then