{"thread":{"id":"49342","subject":"[PATCH v1 0/4] Cleanup pass on special test setups","startedAt":"2018-09-14T14:37:29Z","lastAt":"2018-09-28T18:43:12Z","messageCount":33,"participants":["Ben Peart","Junio C Hamano","Jonathan Nieder","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"358121","messageId":"20180914143708.63024-1-benpeart@microsoft.com","threadId":"49342","inReplyTo":null,"subject":"[PATCH v1 0/4] Cleanup pass on special test setups","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T14:37:24Z","receivedAt":"2018-09-14T14:37:29Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"As documented in t/README, the whole test suite can be run to test some\nspecial features that cannot be easily covered by a few specific test cases.\n\nNot all of these that exist in the code have been named consistantly and\ndocumented in r/README which leads to a discoverability problem.  Update\nseveral of these variables to follow the same naming pattern and document\nthem properly.\n\nTo facilitate transitioning from the old names to the new names, add logic\nin t/test-lib.sh to give an error when the old variable is set to let people\nknow they need to update their environment to use the new variable. If the\nnew variable is also set, just give a warning so they can eventually remove\nthe old variable.\n\nBase Ref: v2.19.0\nWeb-Diff: https://github.com/benpeart/git/commit/eff73d737e\nCheckout: git fetch https://github.com/benpeart/git git-test-cleanup-v1 && git checkout eff73d737e\n\nBen Peart (4):\n  correct typo/spelling error in t/README\n  fsmonitor: update GIT_TEST_FSMONITOR support\n  read-cache: update TEST_GIT_INDEX_VERSION support\n  preload-index: update GIT_FORCE_PRELOAD_TEST support\n\n Makefile                    |  6 +++---\n config.c                    |  2 +-\n preload-index.c             |  3 ++-\n t/README                    | 13 ++++++++++++-\n t/t1700-split-index.sh      |  2 +-\n t/t7519-status-fsmonitor.sh |  6 +++---\n t/test-lib.sh               | 37 +++++++++++++++++++++++++++++++++++--\n 7 files changed, 57 insertions(+), 12 deletions(-)\n\n\nbase-commit: 1d4361b0f344188ab5eec6dcea01f61a3a3a1670\n-- \n2.18.0.windows.1\n\n\n"},{"id":"358122","messageId":"20180914143708.63024-2-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914143708.63024-1-benpeart@microsoft.com","subject":"[PATCH v1 1/4] correct typo/spelling error in t/README","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T14:37:26Z","receivedAt":"2018-09-14T14:37:42Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Correct a spelling error in the documentation for GIT_TEST_OE_DELTA_SIZE\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n t/README | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/README b/t/README\nindex 9028b47d92..56a417439c 100644\n--- a/t/README\n+++ b/t/README\n@@ -315,7 +315,7 @@ packs on demand. This normally only happens when the object size is\n over 2GB. This variable forces the code path on any object larger than\n <n> bytes.\n \n-GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncomon pack-objects code\n+GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncommon pack-objects code\n path where deltas larger than this limit require extra memory\n allocation for bookkeeping.\n \n-- \n2.18.0.windows.1\n\n"},{"id":"358123","messageId":"20180914143708.63024-3-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914143708.63024-1-benpeart@microsoft.com","subject":"[PATCH v1 2/4] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T14:37:27Z","receivedAt":"2018-09-14T14:37:44Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename GIT_FSMONITOR_TEST to GIT_TEST_FSMONITOR for consistency with the\nother GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give an error when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable. If the new variable is also set, just give a warning so they can\neventually remove the old variable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n config.c                    |  2 +-\n t/README                    |  4 ++++\n t/t1700-split-index.sh      |  2 +-\n t/t7519-status-fsmonitor.sh |  2 +-\n t/test-lib.sh               | 11 +++++++++++\n 5 files changed, 18 insertions(+), 3 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex 3461993f0a..3555c63f28 100644\n--- a/config.c\n+++ b/config.c\n@@ -2278,7 +2278,7 @@ int git_config_get_max_percent_split_change(void)\n int git_config_get_fsmonitor(void)\n {\n \tif (git_config_get_pathname(\"core.fsmonitor\", &core_fsmonitor))\n-\t\tcore_fsmonitor = getenv(\"GIT_FSMONITOR_TEST\");\n+\t\tcore_fsmonitor = getenv(\"GIT_TEST_FSMONITOR\");\n \n \tif (core_fsmonitor && !*core_fsmonitor)\n \t\tcore_fsmonitor = NULL;\ndiff --git a/t/README b/t/README\nindex 56a417439c..47165f7eab 100644\n--- a/t/README\n+++ b/t/README\n@@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncommon pack-objects code\n path where deltas larger than this limit require extra memory\n allocation for bookkeeping.\n \n+GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n+code path for utilizing a file system monitor to speed up detecting\n+new or changed files.\n+\n Naming Tests\n ------------\n \ndiff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\nindex b3b4d83eaf..f6a856f24c 100755\n--- a/t/t1700-split-index.sh\n+++ b/t/t1700-split-index.sh\n@@ -6,7 +6,7 @@ test_description='split index mode tests'\n \n # We need total control of index splitting here\n sane_unset GIT_TEST_SPLIT_INDEX\n-sane_unset GIT_FSMONITOR_TEST\n+sane_unset GIT_TEST_FSMONITOR\n \n test_expect_success 'enable split index' '\n \tgit config splitIndex.maxPercentChange 100 &&\ndiff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\nindex 756beb0d8e..d77012ea6d 100755\n--- a/t/t7519-status-fsmonitor.sh\n+++ b/t/t7519-status-fsmonitor.sh\n@@ -8,7 +8,7 @@ test_description='git status with file system watcher'\n # To run the entire git test suite using fsmonitor:\n #\n # copy t/t7519/fsmonitor-all to a location in your path and then set\n-# GIT_FSMONITOR_TEST=fsmonitor-all and run your tests.\n+# GIT_TEST_FSMONITOR=fsmonitor-all and run your tests.\n #\n \n # Note, after \"git reset --hard HEAD\" no extensions exist other than 'TREE'\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 44288cbb59..0ef111d808 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -140,6 +140,17 @@ then\n \texport GIT_INDEX_VERSION\n fi\n \n+if test -n \"$GIT_FSMONITOR_TEST\"\n+then\n+\tif test -n \"$GIT_TEST_FSMONITOR\"\n+\tthen\n+\t\techo \"warning: the GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n+\telse\n+\t\techo \"error: the GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n+\t\texit 1\n+\tfi\n+fi\n+\n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n if expr \" $GIT_TEST_OPTS \" : \".* --valgrind \" >/dev/null ||\n-- \n2.18.0.windows.1\n\n"},{"id":"358124","messageId":"20180914143708.63024-4-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914143708.63024-1-benpeart@microsoft.com","subject":"[PATCH v1 3/4] read-cache: update TEST_GIT_INDEX_VERSION support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T14:37:28Z","receivedAt":"2018-09-14T14:37:46Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename TEST_GIT_INDEX_VERSION to GIT_TEST_INDEX_VERSION for consistency with\nthe other GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give an error when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable. If the new variable is also set, just give a warning so they can\neventually remove the old variable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n Makefile      |  6 +++---\n t/README      |  4 ++++\n t/test-lib.sh | 15 +++++++++++++--\n 3 files changed, 20 insertions(+), 5 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 5a969f5830..9e84ef02f7 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -400,7 +400,7 @@ all::\n # (defaults to \"man\") if you want to have a different default when\n # \"git help\" is called without a parameter specifying the format.\n #\n-# Define TEST_GIT_INDEX_VERSION to 2, 3 or 4 to run the test suite\n+# Define GIT_TEST_INDEX_VERSION to 2, 3 or 4 to run the test suite\n # with a different indexfile format version.  If it isn't set the index\n # file format used is index-v[23].\n #\n@@ -2599,8 +2599,8 @@ endif\n ifdef GIT_INTEROP_MAKE_OPTS\n \t@echo GIT_INTEROP_MAKE_OPTS=\\''$(subst ','\\'',$(subst ','\\'',$(GIT_INTEROP_MAKE_OPTS)))'\\' >>$@+\n endif\n-ifdef TEST_GIT_INDEX_VERSION\n-\t@echo TEST_GIT_INDEX_VERSION=\\''$(subst ','\\'',$(subst ','\\'',$(TEST_GIT_INDEX_VERSION)))'\\' >>$@+\n+ifdef GIT_TEST_INDEX_VERSION\n+\t@echo GIT_TEST_INDEX_VERSION=\\''$(subst ','\\'',$(subst ','\\'',$(GIT_TEST_INDEX_VERSION)))'\\' >>$@+\n endif\n \t@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi\n \ndiff --git a/t/README b/t/README\nindex 47165f7eab..9b13f6d12e 100644\n--- a/t/README\n+++ b/t/README\n@@ -323,6 +323,10 @@ GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n code path for utilizing a file system monitor to speed up detecting\n new or changed files.\n \n+GIT_TEST_INDEX_VERSION=<n> exercises the index read/write code path\n+for the index version specified.  Can be set to any valid version\n+(currently 2, 3, or 4).\n+\n Naming Tests\n ------------\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 0ef111d808..5f5f0f4b55 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -134,12 +134,23 @@ export EDITOR\n GIT_TRACE_BARE=1\n export GIT_TRACE_BARE\n \n-if test -n \"${TEST_GIT_INDEX_VERSION:+isset}\"\n+if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n then\n-\tGIT_INDEX_VERSION=\"$TEST_GIT_INDEX_VERSION\"\n+\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n \texport GIT_INDEX_VERSION\n fi\n \n+if test -n \"$TEST_GIT_INDEX_VERSION\"\n+then\n+\tif test -n \"$GIT_TEST_INDEX_VERSION\"\n+\tthen\n+\t\techo \"warning: the TEST_GIT_INDEX_VERSION variable has been renamed to GIT_TEST_INDEX_VERSION\"\n+\telse\n+\t\techo \"error: the TEST_GIT_INDEX_VERSION variable has been renamed to GIT_TEST_INDEX_VERSION\"\n+\t\texit 1\n+\tfi\n+fi\n+\n if test -n \"$GIT_FSMONITOR_TEST\"\n then\n \tif test -n \"$GIT_TEST_FSMONITOR\"\n-- \n2.18.0.windows.1\n\n"},{"id":"358125","messageId":"20180914143708.63024-5-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914143708.63024-1-benpeart@microsoft.com","subject":"[PATCH v1 4/4] preload-index: update GIT_FORCE_PRELOAD_TEST support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T14:37:29Z","receivedAt":"2018-09-14T14:37:48Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename GIT_FORCE_PRELOAD_TEST to GIT_TEST_PRELOAD_INDEX for consistency with\nthe other GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give an error when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable. If the new variable is also set, just give a warning so they can\neventually remove the old variable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n preload-index.c             |  3 ++-\n t/README                    |  3 +++\n t/t7519-status-fsmonitor.sh |  4 ++--\n t/test-lib.sh               | 11 +++++++++++\n 4 files changed, 18 insertions(+), 3 deletions(-)\n\ndiff --git a/preload-index.c b/preload-index.c\nindex 71cd2437a3..a850e197c2 100644\n--- a/preload-index.c\n+++ b/preload-index.c\n@@ -5,6 +5,7 @@\n #include \"pathspec.h\"\n #include \"dir.h\"\n #include \"fsmonitor.h\"\n+#include \"config.h\"\n \n #ifdef NO_PTHREADS\n static void preload_index(struct index_state *index,\n@@ -84,7 +85,7 @@ static void preload_index(struct index_state *index,\n \t\treturn;\n \n \tthreads = index->cache_nr / THREAD_COST;\n-\tif ((index->cache_nr > 1) && (threads < 2) && getenv(\"GIT_FORCE_PRELOAD_TEST\"))\n+\tif ((index->cache_nr > 1) && (threads < 2) && git_env_bool(\"GIT_TEST_PRELOAD_INDEX\", 0))\n \t\tthreads = 2;\n \tif (threads < 2)\n \t\treturn;\ndiff --git a/t/README b/t/README\nindex 9b13f6d12e..5670c7aad0 100644\n--- a/t/README\n+++ b/t/README\n@@ -327,6 +327,9 @@ GIT_TEST_INDEX_VERSION=<n> exercises the index read/write code path\n for the index version specified.  Can be set to any valid version\n (currently 2, 3, or 4).\n \n+GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path\n+by overriding the minimum number of cache entries required per thread.\n+\n Naming Tests\n ------------\n \ndiff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\nindex d77012ea6d..8308d6d5b1 100755\n--- a/t/t7519-status-fsmonitor.sh\n+++ b/t/t7519-status-fsmonitor.sh\n@@ -245,9 +245,9 @@ do\n \t\tgit config core.preloadIndex $preload_val &&\n \t\tif test $preload_val = true\n \t\tthen\n-\t\t\tGIT_FORCE_PRELOAD_TEST=$preload_val; export GIT_FORCE_PRELOAD_TEST\n+\t\t\tGIT_TEST_PRELOAD_INDEX=$preload_val; export GIT_TEST_PRELOAD_INDEX\n \t\telse\n-\t\t\tunset GIT_FORCE_PRELOAD_TEST\n+\t\t\tsane_unset GIT_TEST_PRELOAD_INDEX\n \t\tfi\n \t'\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 5f5f0f4b55..3f447b8ddc 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -162,6 +162,17 @@ then\n \tfi\n fi\n \n+if test -n \"$GIT_FORCE_PRELOAD_TEST\"\n+then\n+\tif test -n \"$GIT_TEST_PRELOAD_INDEX\"\n+\tthen\n+\t\techo \"warning: the GIT_FORCE_PRELOAD_TEST variable has been renamed to GIT_TEST_PRELOAD_INDEX\"\n+\telse\n+\t\techo \"error: the GIT_FORCE_PRELOAD_TEST variable has been renamed to GIT_TEST_PRELOAD_INDEX\"\n+\t\texit 1\n+\tfi\n+fi\n+\n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n if expr \" $GIT_TEST_OPTS \" : \".* --valgrind \" >/dev/null ||\n-- \n2.18.0.windows.1\n\n"},{"id":"358134","messageId":"xmqqmuskc8wj.fsf@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"20180914143708.63024-3-benpeart@microsoft.com","subject":"Re: [PATCH v1 2/4] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-14T16:59:24Z","receivedAt":"2018-09-14T16:59:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Peart <benpeart@microsoft.com> writes:\n\n> +if test -n \"$GIT_FSMONITOR_TEST\"\n> +then\n> +\tif test -n \"$GIT_TEST_FSMONITOR\"\n> +\tthen\n> +\t\techo \"warning: the GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n> +\telse\n> +\t\techo \"error: the GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n> +\t\texit 1\n> +\tfi\n> +fi\n\nI would have expected that, because we are now doing multiple pairs\nof variables in a single series, we would add a helper function that\ncan be called like so:\n\n\tcheck_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n\nin the earliest step.  Perhaps something like this.\n\ncheck_var_migration () {\n\told_name=$1 new_name=$2\n\teval \"old_isset=\\${${old_name}:+isset}\"\n\teval \"new_isset=\\${${new_name}:+isset}\"\n\tcase \"$old_isset,$new_isset\" in\n\tisset,)\n\t\techo >&2 \"error: $old_name is now $new_name\"\n\t\texit 1 ;;\n\tisset,isset)\n\t\t# enable this, once $old_name no longer is valid anywhere\n\t\t# echo >&2 \"warning: $old_name is now $new_name\"\n\t\t# echo >&2 \"hint: remove $old_name\"\n\t\t;;\n\tesac\n}\n\n"},{"id":"358135","messageId":"xmqqd0tgc8pn.fsf@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"xmqqmuskc8wj.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v1 2/4] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-14T17:03:32Z","receivedAt":"2018-09-14T17:03:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Ben Peart <benpeart@microsoft.com> writes:\n>\n>> +if test -n \"$GIT_FSMONITOR_TEST\"\n>> +then\n>> +\tif test -n \"$GIT_TEST_FSMONITOR\"\n>> +\tthen\n>> +\t\techo \"warning: the GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n>> +\telse\n>> +\t\techo \"error: the GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n>> +\t\texit 1\n>> +\tfi\n>> +fi\n>\n> I would have expected that, because we are now doing multiple pairs\n> of variables in a single series, we would add a helper function that\n> can be called like so:\n>\n> \tcheck_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n>\n> in the earliest step.  Perhaps something like this.\n>\n> check_var_migration () {\n> \told_name=$1 new_name=$2\n> \teval \"old_isset=\\${${old_name}:+isset}\"\n> \teval \"new_isset=\\${${new_name}:+isset}\"\n> \tcase \"$old_isset,$new_isset\" in\n> \tisset,)\n> \t\techo >&2 \"error: $old_name is now $new_name\"\n> \t\texit 1 ;;\n> \tisset,isset)\n> \t\t# enable this, once $old_name no longer is valid anywhere\n> \t\t# echo >&2 \"warning: $old_name is now $new_name\"\n> \t\t# echo >&2 \"hint: remove $old_name\"\n> \t\t;;\n> \tesac\n> }\n\nAlternatively, we could do this, to warn and then migrate the value\ngiven to the old variable automatically to the new variable and let\nthe test proceed.\n\ncheck_var_migration () {\n\told_name=$1 new_name=$2\n\teval \"old_isset=\\${${old_name}:+isset}\"\n\teval \"new_isset=\\${${new_name}:+isset}\"\n\tcase \"$old_isset,$new_isset\" in\n\tisset,)\n\t\techo >&2 \"warning: $old_name is now $new_name\"\n\t\techo >&2 \"hint: set $new_name too during the transition period\"\n\t\teval \"$new_name=\\$$old_name\"\n\t\t;;\n\tisset,isset)\n\t\t# do this later\n\t\t# echo >&2 \"warning: $old_name is now $new_name\"\n\t\t# echo >&2 \"hint: remove $old_name\"\n\t\t;;\n\tesac\n}\n"},{"id":"358136","messageId":"xmqq5zz8c84y.fsf@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"20180914143708.63024-3-benpeart@microsoft.com","subject":"Re: [PATCH v1 2/4] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-14T17:15:57Z","receivedAt":"2018-09-14T17:16:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Peart <benpeart@microsoft.com> writes:\n\n> diff --git a/config.c b/config.c\n> index 3461993f0a..3555c63f28 100644\n> --- a/config.c\n> +++ b/config.c\n> @@ -2278,7 +2278,7 @@ int git_config_get_max_percent_split_change(void)\n>  int git_config_get_fsmonitor(void)\n>  {\n>  \tif (git_config_get_pathname(\"core.fsmonitor\", &core_fsmonitor))\n> -\t\tcore_fsmonitor = getenv(\"GIT_FSMONITOR_TEST\");\n> +\t\tcore_fsmonitor = getenv(\"GIT_TEST_FSMONITOR\");\n\nSorry for not noticing earlier, but unlike 4/4 that changed\ngetenv(VAR) to git_env_bool(VAR, 0) \"while at it\", this leaves it to\ngetenv(VAR), meaning \"if it is set to any non-empty string, it is\ntrue\".  Is there a reason for this discrepancy?\n\nI _think_ the renaming should be done without getting mixed with\nother changes like the git_env_bool() done in 4/4.  The idea to use\ngit_env_bool() in stead of getenv() may be a good one, but then we\nshould consistently do so when appropriate, and that would make a\nfine theme for another topic.\n\n"},{"id":"358140","messageId":"80988727-085f-cdd9-e5bb-a90a55e97024@gmail.com","threadId":"49342","inReplyTo":"xmqq5zz8c84y.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v1 2/4] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ben Peart","fromEmail":"peartben@gmail.com","sentAt":"2018-09-14T18:05:46Z","receivedAt":"2018-09-14T18:05:51Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"\n\nOn 9/14/2018 1:15 PM, Junio C Hamano wrote:\n> Ben Peart <benpeart@microsoft.com> writes:\n> \n>> diff --git a/config.c b/config.c\n>> index 3461993f0a..3555c63f28 100644\n>> --- a/config.c\n>> +++ b/config.c\n>> @@ -2278,7 +2278,7 @@ int git_config_get_max_percent_split_change(void)\n>>   int git_config_get_fsmonitor(void)\n>>   {\n>>   \tif (git_config_get_pathname(\"core.fsmonitor\", &core_fsmonitor))\n>> -\t\tcore_fsmonitor = getenv(\"GIT_FSMONITOR_TEST\");\n>> +\t\tcore_fsmonitor = getenv(\"GIT_TEST_FSMONITOR\");\n> \n> Sorry for not noticing earlier, but unlike 4/4 that changed\n> getenv(VAR) to git_env_bool(VAR, 0) \"while at it\", this leaves it to\n> getenv(VAR), meaning \"if it is set to any non-empty string, it is\n> true\".  Is there a reason for this discrepancy?\n> \n\nThe difference here is that core.fsmonitor isn't a boolean value.  It is \na string to a command that is executed so it can't be moved over to \nget_env_bool().\n\n> I _think_ the renaming should be done without getting mixed with\n> other changes like the git_env_bool() done in 4/4.  The idea to use\n> git_env_bool() in stead of getenv() may be a good one, but then we\n> should consistently do so when appropriate, and that would make a\n> fine theme for another topic.\n> \n"},{"id":"358142","messageId":"xmqqin38aqoq.fsf@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"80988727-085f-cdd9-e5bb-a90a55e97024@gmail.com","subject":"Re: [PATCH v1 2/4] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-14T18:18:13Z","receivedAt":"2018-09-14T18:18:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Peart <peartben@gmail.com> writes:\n\n> The difference here is that core.fsmonitor isn't a boolean value.  It\n> is a string to a command that is executed so it can't be moved over to\n> get_env_bool().\n\nAh, of course ;-)\n\nThen please take the following as a review comment for 4/4; checking\nif each getenv(VAR) should or should not become git_env_bool() and\nupdating them should be done as a separate change for variables\nwhether they are being renamed or not in this series.\n\n>> I _think_ the renaming should be done without getting mixed with\n>> other changes like the git_env_bool() done in 4/4.  The idea to use\n>> git_env_bool() in stead of getenv() may be a good one, but then we\n>> should consistently do so when appropriate, and that would make a\n>> fine theme for another topic.\n>>\n"},{"id":"358153","messageId":"20180914201340.37400-1-benpeart@microsoft.com","threadId":"49342","inReplyTo":"80988727-085f-cdd9-e5bb-a90a55e97024@gmail.com","subject":"[PATCH v2 0/5] Cleanup pass on special test setups","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T20:13:57Z","receivedAt":"2018-09-14T20:14:02Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Changes this round are to use Junio's more elegant script to test and warn\nabout using old variables and munging which changes are in which commit.\n\nBase Ref: v2.19.0\nWeb-Diff: https://github.com/benpeart/git/commit/79d62d39e4\nCheckout: git fetch https://github.com/benpeart/git git-test-cleanup-v2 && git checkout 79d62d39e4\n\n\n### Interdiff (v1..v2):\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 3f447b8ddc..17a56f44ad 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -140,38 +140,27 @@ then\n \texport GIT_INDEX_VERSION\n fi\n \n-if test -n \"$TEST_GIT_INDEX_VERSION\"\n-then\n-\tif test -n \"$GIT_TEST_INDEX_VERSION\"\n-\tthen\n-\t\techo \"warning: the TEST_GIT_INDEX_VERSION variable has been renamed to GIT_TEST_INDEX_VERSION\"\n-\telse\n-\t\techo \"error: the TEST_GIT_INDEX_VERSION variable has been renamed to GIT_TEST_INDEX_VERSION\"\n-\t\texit 1\n-\tfi\n-fi\n-\n-if test -n \"$GIT_FSMONITOR_TEST\"\n-then\n-\tif test -n \"$GIT_TEST_FSMONITOR\"\n-\tthen\n-\t\techo \"warning: the GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n-\telse\n-\t\techo \"error: the GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n-\t\texit 1\n-\tfi\n-fi\n+check_var_migration () {\n+\told_name=$1 new_name=$2\n+\teval \"old_isset=\\${${old_name}:+isset}\"\n+\teval \"new_isset=\\${${new_name}:+isset}\"\n+\tcase \"$old_isset,$new_isset\" in\n+\tisset,)\n+\t\techo >&2 \"warning: $old_name is now $new_name\"\n+\t\techo >&2 \"hint: set $new_name too during the transition period\"\n+\t\teval \"$new_name=\\$$old_name\"\n+\t\t;;\n+\tisset,isset)\n+\t\t# do this later\n+\t\t# echo >&2 \"warning: $old_name is now $new_name\"\n+\t\t# echo >&2 \"hint: remove $old_name\"\n+\t\t;;\n+\tesac\n+}\n \n-if test -n \"$GIT_FORCE_PRELOAD_TEST\"\n-then\n-\tif test -n \"$GIT_TEST_PRELOAD_INDEX\"\n-\tthen\n-\t\techo \"warning: the GIT_FORCE_PRELOAD_TEST variable has been renamed to GIT_TEST_PRELOAD_INDEX\"\n-\telse\n-\t\techo \"error: the GIT_FORCE_PRELOAD_TEST variable has been renamed to GIT_TEST_PRELOAD_INDEX\"\n-\t\texit 1\n-\tfi\n-fi\n+check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n+check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n+check_var_migration GIT_FORCE_PRELOAD_TEST GIT_TEST_PRELOAD_INDEX\n \n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n\n\n### Patches\n\nBen Peart (5):\n  correct typo/spelling error in t/README\n  preload-index: teach GIT_FORCE_PRELOAD_TEST to take a boolean\n  fsmonitor: update GIT_TEST_FSMONITOR support\n  read-cache: update TEST_GIT_INDEX_VERSION support\n  preload-index: update GIT_FORCE_PRELOAD_TEST support\n\n Makefile                    |  6 +++---\n config.c                    |  2 +-\n preload-index.c             |  3 ++-\n t/README                    | 13 ++++++++++++-\n t/t1700-split-index.sh      |  2 +-\n t/t7519-status-fsmonitor.sh |  6 +++---\n t/test-lib.sh               | 26 ++++++++++++++++++++++++--\n 7 files changed, 46 insertions(+), 12 deletions(-)\n\n\nbase-commit: 1d4361b0f344188ab5eec6dcea01f61a3a3a1670\n-- \n2.18.0.windows.1\n\n\n"},{"id":"358154","messageId":"20180914201340.37400-2-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914201340.37400-1-benpeart@microsoft.com","subject":"[PATCH v2 1/5] correct typo/spelling error in t/README","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T20:13:59Z","receivedAt":"2018-09-14T20:14:05Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Correct a spelling error in the documentation for GIT_TEST_OE_DELTA_SIZE\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n t/README | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/README b/t/README\nindex 9028b47d92..56a417439c 100644\n--- a/t/README\n+++ b/t/README\n@@ -315,7 +315,7 @@ packs on demand. This normally only happens when the object size is\n over 2GB. This variable forces the code path on any object larger than\n <n> bytes.\n \n-GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncomon pack-objects code\n+GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncommon pack-objects code\n path where deltas larger than this limit require extra memory\n allocation for bookkeeping.\n \n-- \n2.18.0.windows.1\n\n"},{"id":"358155","messageId":"20180914201340.37400-3-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914201340.37400-1-benpeart@microsoft.com","subject":"[PATCH v2 2/5] preload-index: teach GIT_FORCE_PRELOAD_TEST to take a boolean","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T20:14:01Z","receivedAt":"2018-09-14T20:14:06Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Teach GIT_FORCE_PRELOAD_TEST to take a boolean to turn on or off this test\nfeature instead of simply testing for existance.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n preload-index.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/preload-index.c b/preload-index.c\nindex 71cd2437a3..0a4e2933bb 100644\n--- a/preload-index.c\n+++ b/preload-index.c\n@@ -5,6 +5,7 @@\n #include \"pathspec.h\"\n #include \"dir.h\"\n #include \"fsmonitor.h\"\n+#include \"config.h\"\n \n #ifdef NO_PTHREADS\n static void preload_index(struct index_state *index,\n@@ -84,7 +85,7 @@ static void preload_index(struct index_state *index,\n \t\treturn;\n \n \tthreads = index->cache_nr / THREAD_COST;\n-\tif ((index->cache_nr > 1) && (threads < 2) && getenv(\"GIT_FORCE_PRELOAD_TEST\"))\n+\tif ((index->cache_nr > 1) && (threads < 2) && git_env_bool(\"GIT_FORCE_PRELOAD_TEST\", 0))\n \t\tthreads = 2;\n \tif (threads < 2)\n \t\treturn;\n-- \n2.18.0.windows.1\n\n"},{"id":"358156","messageId":"20180914201340.37400-4-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914201340.37400-1-benpeart@microsoft.com","subject":"[PATCH v2 3/5] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T20:14:02Z","receivedAt":"2018-09-14T20:14:10Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename GIT_FSMONITOR_TEST to GIT_TEST_FSMONITOR for consistency with the\nother GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give a warning when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n config.c                    |  2 +-\n t/README                    |  4 ++++\n t/t1700-split-index.sh      |  2 +-\n t/t7519-status-fsmonitor.sh |  2 +-\n t/test-lib.sh               | 20 ++++++++++++++++++++\n 5 files changed, 27 insertions(+), 3 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex 3461993f0a..3555c63f28 100644\n--- a/config.c\n+++ b/config.c\n@@ -2278,7 +2278,7 @@ int git_config_get_max_percent_split_change(void)\n int git_config_get_fsmonitor(void)\n {\n \tif (git_config_get_pathname(\"core.fsmonitor\", &core_fsmonitor))\n-\t\tcore_fsmonitor = getenv(\"GIT_FSMONITOR_TEST\");\n+\t\tcore_fsmonitor = getenv(\"GIT_TEST_FSMONITOR\");\n \n \tif (core_fsmonitor && !*core_fsmonitor)\n \t\tcore_fsmonitor = NULL;\ndiff --git a/t/README b/t/README\nindex 56a417439c..47165f7eab 100644\n--- a/t/README\n+++ b/t/README\n@@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncommon pack-objects code\n path where deltas larger than this limit require extra memory\n allocation for bookkeeping.\n \n+GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n+code path for utilizing a file system monitor to speed up detecting\n+new or changed files.\n+\n Naming Tests\n ------------\n \ndiff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\nindex b3b4d83eaf..f6a856f24c 100755\n--- a/t/t1700-split-index.sh\n+++ b/t/t1700-split-index.sh\n@@ -6,7 +6,7 @@ test_description='split index mode tests'\n \n # We need total control of index splitting here\n sane_unset GIT_TEST_SPLIT_INDEX\n-sane_unset GIT_FSMONITOR_TEST\n+sane_unset GIT_TEST_FSMONITOR\n \n test_expect_success 'enable split index' '\n \tgit config splitIndex.maxPercentChange 100 &&\ndiff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\nindex 756beb0d8e..d77012ea6d 100755\n--- a/t/t7519-status-fsmonitor.sh\n+++ b/t/t7519-status-fsmonitor.sh\n@@ -8,7 +8,7 @@ test_description='git status with file system watcher'\n # To run the entire git test suite using fsmonitor:\n #\n # copy t/t7519/fsmonitor-all to a location in your path and then set\n-# GIT_FSMONITOR_TEST=fsmonitor-all and run your tests.\n+# GIT_TEST_FSMONITOR=fsmonitor-all and run your tests.\n #\n \n # Note, after \"git reset --hard HEAD\" no extensions exist other than 'TREE'\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 44288cbb59..653688c067 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -140,6 +140,26 @@ then\n \texport GIT_INDEX_VERSION\n fi\n \n+check_var_migration () {\n+\told_name=$1 new_name=$2\n+\teval \"old_isset=\\${${old_name}:+isset}\"\n+\teval \"new_isset=\\${${new_name}:+isset}\"\n+\tcase \"$old_isset,$new_isset\" in\n+\tisset,)\n+\t\techo >&2 \"warning: $old_name is now $new_name\"\n+\t\techo >&2 \"hint: set $new_name too during the transition period\"\n+\t\teval \"$new_name=\\$$old_name\"\n+\t\t;;\n+\tisset,isset)\n+\t\t# do this later\n+\t\t# echo >&2 \"warning: $old_name is now $new_name\"\n+\t\t# echo >&2 \"hint: remove $old_name\"\n+\t\t;;\n+\tesac\n+}\n+\n+check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n+\n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n if expr \" $GIT_TEST_OPTS \" : \".* --valgrind \" >/dev/null ||\n-- \n2.18.0.windows.1\n\n"},{"id":"358157","messageId":"20180914201340.37400-5-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914201340.37400-1-benpeart@microsoft.com","subject":"[PATCH v2 4/5] read-cache: update TEST_GIT_INDEX_VERSION support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T20:14:03Z","receivedAt":"2018-09-14T20:14:12Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename TEST_GIT_INDEX_VERSION to GIT_TEST_INDEX_VERSION for consistency with\nthe other GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give a warning when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n Makefile      | 6 +++---\n t/README      | 4 ++++\n t/test-lib.sh | 5 +++--\n 3 files changed, 10 insertions(+), 5 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 5a969f5830..9e84ef02f7 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -400,7 +400,7 @@ all::\n # (defaults to \"man\") if you want to have a different default when\n # \"git help\" is called without a parameter specifying the format.\n #\n-# Define TEST_GIT_INDEX_VERSION to 2, 3 or 4 to run the test suite\n+# Define GIT_TEST_INDEX_VERSION to 2, 3 or 4 to run the test suite\n # with a different indexfile format version.  If it isn't set the index\n # file format used is index-v[23].\n #\n@@ -2599,8 +2599,8 @@ endif\n ifdef GIT_INTEROP_MAKE_OPTS\n \t@echo GIT_INTEROP_MAKE_OPTS=\\''$(subst ','\\'',$(subst ','\\'',$(GIT_INTEROP_MAKE_OPTS)))'\\' >>$@+\n endif\n-ifdef TEST_GIT_INDEX_VERSION\n-\t@echo TEST_GIT_INDEX_VERSION=\\''$(subst ','\\'',$(subst ','\\'',$(TEST_GIT_INDEX_VERSION)))'\\' >>$@+\n+ifdef GIT_TEST_INDEX_VERSION\n+\t@echo GIT_TEST_INDEX_VERSION=\\''$(subst ','\\'',$(subst ','\\'',$(GIT_TEST_INDEX_VERSION)))'\\' >>$@+\n endif\n \t@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi\n \ndiff --git a/t/README b/t/README\nindex 47165f7eab..9b13f6d12e 100644\n--- a/t/README\n+++ b/t/README\n@@ -323,6 +323,10 @@ GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n code path for utilizing a file system monitor to speed up detecting\n new or changed files.\n \n+GIT_TEST_INDEX_VERSION=<n> exercises the index read/write code path\n+for the index version specified.  Can be set to any valid version\n+(currently 2, 3, or 4).\n+\n Naming Tests\n ------------\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 653688c067..397eb71578 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -134,9 +134,9 @@ export EDITOR\n GIT_TRACE_BARE=1\n export GIT_TRACE_BARE\n \n-if test -n \"${TEST_GIT_INDEX_VERSION:+isset}\"\n+if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n then\n-\tGIT_INDEX_VERSION=\"$TEST_GIT_INDEX_VERSION\"\n+\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n \texport GIT_INDEX_VERSION\n fi\n \n@@ -159,6 +159,7 @@ check_var_migration () {\n }\n \n check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n+check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n \n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n-- \n2.18.0.windows.1\n\n"},{"id":"358158","messageId":"20180914201340.37400-6-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914201340.37400-1-benpeart@microsoft.com","subject":"[PATCH v2 5/5] preload-index: update GIT_FORCE_PRELOAD_TEST support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-14T20:14:05Z","receivedAt":"2018-09-14T20:14:14Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename GIT_FORCE_PRELOAD_TEST to GIT_TEST_PRELOAD_INDEX for consistency with\nthe other GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give a warning when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n preload-index.c             | 2 +-\n t/README                    | 3 +++\n t/t7519-status-fsmonitor.sh | 4 ++--\n t/test-lib.sh               | 1 +\n 4 files changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/preload-index.c b/preload-index.c\nindex 0a4e2933bb..a850e197c2 100644\n--- a/preload-index.c\n+++ b/preload-index.c\n@@ -85,7 +85,7 @@ static void preload_index(struct index_state *index,\n \t\treturn;\n \n \tthreads = index->cache_nr / THREAD_COST;\n-\tif ((index->cache_nr > 1) && (threads < 2) && git_env_bool(\"GIT_FORCE_PRELOAD_TEST\", 0))\n+\tif ((index->cache_nr > 1) && (threads < 2) && git_env_bool(\"GIT_TEST_PRELOAD_INDEX\", 0))\n \t\tthreads = 2;\n \tif (threads < 2)\n \t\treturn;\ndiff --git a/t/README b/t/README\nindex 9b13f6d12e..5670c7aad0 100644\n--- a/t/README\n+++ b/t/README\n@@ -327,6 +327,9 @@ GIT_TEST_INDEX_VERSION=<n> exercises the index read/write code path\n for the index version specified.  Can be set to any valid version\n (currently 2, 3, or 4).\n \n+GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path\n+by overriding the minimum number of cache entries required per thread.\n+\n Naming Tests\n ------------\n \ndiff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\nindex d77012ea6d..8308d6d5b1 100755\n--- a/t/t7519-status-fsmonitor.sh\n+++ b/t/t7519-status-fsmonitor.sh\n@@ -245,9 +245,9 @@ do\n \t\tgit config core.preloadIndex $preload_val &&\n \t\tif test $preload_val = true\n \t\tthen\n-\t\t\tGIT_FORCE_PRELOAD_TEST=$preload_val; export GIT_FORCE_PRELOAD_TEST\n+\t\t\tGIT_TEST_PRELOAD_INDEX=$preload_val; export GIT_TEST_PRELOAD_INDEX\n \t\telse\n-\t\t\tunset GIT_FORCE_PRELOAD_TEST\n+\t\t\tsane_unset GIT_TEST_PRELOAD_INDEX\n \t\tfi\n \t'\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 397eb71578..17a56f44ad 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -160,6 +160,7 @@ check_var_migration () {\n \n check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n+check_var_migration GIT_FORCE_PRELOAD_TEST GIT_TEST_PRELOAD_INDEX\n \n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n-- \n2.18.0.windows.1\n\n"},{"id":"358159","messageId":"20180914204348.GB133420@aiede.svl.corp.google.com","threadId":"49342","inReplyTo":"20180914201340.37400-2-benpeart@microsoft.com","subject":"Re: [PATCH v2 1/5] correct typo/spelling error in t/README","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2018-09-14T20:43:48Z","receivedAt":"2018-09-14T20:43:53Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nBen Peart wrote:\n\n> Subject: correct typo/spelling error in t/README\n\nnit: what is the difference between a typo/spelling error and another\nkind of spelling error?  Maybe this could be something like\n\n\tt/README: correct spelling of \"uncommon\"\n\nwhich makes it crystal clear what the patch will do.\n\n> Correct a spelling error in the documentation for GIT_TEST_OE_DELTA_SIZE\n\nThe commit message should consist of complete sentences, so this is\nmissing a period.  Alternatively, I think it would be fine to omit the\nsentence altogether.\n\n> Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>\n> ---\n>  t/README | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n\nThis appears to be the only usage of uncomon in the code base.  Thanks\nfor fixing it.\n\nWith or without the commit message tweaks mentioned above,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n"},{"id":"358160","messageId":"20180914205158.GC133420@aiede.svl.corp.google.com","threadId":"49342","inReplyTo":"20180914201340.37400-3-benpeart@microsoft.com","subject":"Re: [PATCH v2 2/5] preload-index: teach GIT_FORCE_PRELOAD_TEST to take a boolean","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2018-09-14T20:51:58Z","receivedAt":"2018-09-14T20:52:04Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ben Peart wrote:\n\n> Subject: preload-index: teach GIT_FORCE_PRELOAD_TEST to take a boolean\n\nReading this subject line alone (e.g. in \"git log --oneline\" output),\nit's not obvious to me what this patch will do.\n\nWhat behavior change does it make / what will it make newly possible?\n\nMaybe something like:\n\n\tpreload-index: use git_env_bool() not getenv() for customization\n\n\tGIT_FORCE_PRELOAD_TEST is only checked for presence by using getenv().\n\tUse git_env_bool() instead so that GIT_FORCE_PRELOAD_TEST=false can\n\twork as expected.\n\n> Teach GIT_FORCE_PRELOAD_TEST to take a boolean to turn on or off this test\n> feature instead of simply testing for existance.\n>\n> Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>\n> ---\n>  preload-index.c | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n\nCan you say a little about how this came up?  Was it just noticed\nwhile reading the code, or did it come up in practice?\n\nI wonder if a more useful knob would be a GIT_FORCE_PRELOAD_THREADS\nsetting, but that's orthogonal to this change.\n\nThanks and hope that helps,\nJonathan\n"},{"id":"358164","messageId":"xmqq36ubbv8m.fsf@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"20180914205158.GC133420@aiede.svl.corp.google.com","subject":"Re: [PATCH v2 2/5] preload-index: teach GIT_FORCE_PRELOAD_TEST to take a boolean","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-14T21:54:33Z","receivedAt":"2018-09-14T21:54:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Maybe something like:\n>\n> \tpreload-index: use git_env_bool() not getenv() for customization\n>\n> \tGIT_FORCE_PRELOAD_TEST is only checked for presence by using getenv().\n> \tUse git_env_bool() instead so that GIT_FORCE_PRELOAD_TEST=false can\n> \twork as expected.\n\nThat is much better description.  Also\n\n\t$ cd t && GIT_FORCE_PRELOAD_TEST=t ./t0000-basic.sh\n\nwould have allowed us to enable the feature in the older world, but\nI suspect it would instead fail the test, saying 't is not a bool\nnor int'.\n\nSo strictly speaking, it is a backward incompatible change.  I am\nnot sure if I like it.\n\n>> Teach GIT_FORCE_PRELOAD_TEST to take a boolean to turn on or off this test\n>> feature instead of simply testing for existance.\n\ns/existance/existence/?\n"},{"id":"358167","messageId":"xmqqtvmrafs5.fsf@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"20180914201340.37400-5-benpeart@microsoft.com","subject":"Re: [PATCH v2 4/5] read-cache: update TEST_GIT_INDEX_VERSION support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-14T22:13:46Z","receivedAt":"2018-09-14T22:13:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Peart <benpeart@microsoft.com> writes:\n\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index 653688c067..397eb71578 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -134,9 +134,9 @@ export EDITOR\n>  GIT_TRACE_BARE=1\n>  export GIT_TRACE_BARE\n>  \n> -if test -n \"${TEST_GIT_INDEX_VERSION:+isset}\"\n> +if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n>  then\n> -\tGIT_INDEX_VERSION=\"$TEST_GIT_INDEX_VERSION\"\n> +\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n>  \texport GIT_INDEX_VERSION\n>  fi\n\nIs this done a bit before ...\n\n> @@ -159,6 +159,7 @@ check_var_migration () {\n>  }\n>  \n>  check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n> +check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n\n... this has a chance to kick in to say things like \"Whoa you have\nTEST_GIT_INDEX_VERSION that is an old spelling of\nGIT_TEST_INDEX_VERSION\", isn't it?\n\n>  # Add libc MALLOC and MALLOC_PERTURB test\n>  # only if we are not executing the test with valgrind\n"},{"id":"358168","messageId":"xmqqpnxfaf6c.fsf@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"xmqqtvmrafs5.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v2 4/5] read-cache: update TEST_GIT_INDEX_VERSION support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-14T22:26:51Z","receivedAt":"2018-09-14T22:26:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Ben Peart <benpeart@microsoft.com> writes:\n>\n>> diff --git a/t/test-lib.sh b/t/test-lib.sh\n>> index 653688c067..397eb71578 100644\n>> --- a/t/test-lib.sh\n>> +++ b/t/test-lib.sh\n>> @@ -134,9 +134,9 @@ export EDITOR\n>>  GIT_TRACE_BARE=1\n>>  export GIT_TRACE_BARE\n>>  \n>> -if test -n \"${TEST_GIT_INDEX_VERSION:+isset}\"\n>> +if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n>>  then\n>> -\tGIT_INDEX_VERSION=\"$TEST_GIT_INDEX_VERSION\"\n>> +\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n>>  \texport GIT_INDEX_VERSION\n>>  fi\n>\n> Is this done a bit before ...\n>\n>> @@ -159,6 +159,7 @@ check_var_migration () {\n>>  }\n>>  \n>>  check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n>> +check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n>\n> ... this has a chance to kick in to say things like \"Whoa you have\n> TEST_GIT_INDEX_VERSION that is an old spelling of\n> GIT_TEST_INDEX_VERSION\", isn't it?\n\nSo, the obvious fix would look like the patch below.\n\nOne problem with warning is that\n\n\t$ TEST_GIT_INDEX_VERSION=4 sh ./t0000-basic.sh\n\n(or any other depreated variable set without its modern counterpart\nset) would fail due to extra output produced to the standard error\nstream.\n\n t/test-lib.sh | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 17a56f44ad..8ef86e05a3 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -134,12 +134,6 @@ export EDITOR\n GIT_TRACE_BARE=1\n export GIT_TRACE_BARE\n \n-if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n-then\n-\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n-\texport GIT_INDEX_VERSION\n-fi\n-\n check_var_migration () {\n \told_name=$1 new_name=$2\n \teval \"old_isset=\\${${old_name}:+isset}\"\n@@ -162,6 +156,13 @@ check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n check_var_migration GIT_FORCE_PRELOAD_TEST GIT_TEST_PRELOAD_INDEX\n \n+# Use specific version of the index file format\n+if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n+then\n+\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n+\texport GIT_INDEX_VERSION\n+fi\n+\n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n if expr \" $GIT_TEST_OPTS \" : \".* --valgrind \" >/dev/null ||\n"},{"id":"358418","messageId":"20180918232916.57736-1-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180914143708.63024-1-benpeart@microsoft.com","subject":"[PATCH v3 0/5] Cleanup pass on special test setups","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-18T23:29:33Z","receivedAt":"2018-09-18T23:29:37Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"This round has one code change based on feedback. Other changes are just\nrewording commit messages.\n\nBase Ref: v2.19.0\nWeb-Diff: https://github.com/benpeart/git/commit/043246d936\nCheckout: git fetch https://github.com/benpeart/git git-test-cleanup-v3 && git checkout 043246d936\n\n\n### Interdiff (v2..v3):\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 17a56f44ad..8ef86e05a3 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -134,12 +134,6 @@ export EDITOR\n GIT_TRACE_BARE=1\n export GIT_TRACE_BARE\n \n-if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n-then\n-\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n-\texport GIT_INDEX_VERSION\n-fi\n-\n check_var_migration () {\n \told_name=$1 new_name=$2\n \teval \"old_isset=\\${${old_name}:+isset}\"\n@@ -162,6 +156,13 @@ check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n check_var_migration GIT_FORCE_PRELOAD_TEST GIT_TEST_PRELOAD_INDEX\n \n+# Use specific version of the index file format\n+if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n+then\n+\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n+\texport GIT_INDEX_VERSION\n+fi\n+\n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n if expr \" $GIT_TEST_OPTS \" : \".* --valgrind \" >/dev/null ||\n\n\n### Patches\n\nBen Peart (5):\n  t/README: correct spelling of \"uncommon\"\n  preload-index: use git_env_bool() not getenv() for customization\n  fsmonitor: update GIT_TEST_FSMONITOR support\n  read-cache: update TEST_GIT_INDEX_VERSION support\n  preload-index: update GIT_FORCE_PRELOAD_TEST support\n\n Makefile                    |  6 +++---\n config.c                    |  2 +-\n preload-index.c             |  3 ++-\n t/README                    | 13 ++++++++++++-\n t/t1700-split-index.sh      |  2 +-\n t/t7519-status-fsmonitor.sh |  6 +++---\n t/test-lib.sh               | 27 +++++++++++++++++++++++++--\n 7 files changed, 47 insertions(+), 12 deletions(-)\n\n\nbase-commit: 1d4361b0f344188ab5eec6dcea01f61a3a3a1670\n-- \n2.18.0.windows.1\n\n\n"},{"id":"358419","messageId":"20180918232916.57736-2-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180918232916.57736-1-benpeart@microsoft.com","subject":"[PATCH v3 1/5] t/README: correct spelling of \"uncommon\"","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-18T23:29:34Z","receivedAt":"2018-09-18T23:29:38Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Correct a spelling error in the documentation for GIT_TEST_OE_DELTA_SIZE.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n t/README | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/README b/t/README\nindex 9028b47d92..56a417439c 100644\n--- a/t/README\n+++ b/t/README\n@@ -315,7 +315,7 @@ packs on demand. This normally only happens when the object size is\n over 2GB. This variable forces the code path on any object larger than\n <n> bytes.\n \n-GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncomon pack-objects code\n+GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncommon pack-objects code\n path where deltas larger than this limit require extra memory\n allocation for bookkeeping.\n \n-- \n2.18.0.windows.1\n\n"},{"id":"358420","messageId":"20180918232916.57736-3-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180918232916.57736-1-benpeart@microsoft.com","subject":"[PATCH v3 2/5] preload-index: use git_env_bool() not getenv() for customization","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-18T23:29:34Z","receivedAt":"2018-09-18T23:29:40Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"GIT_FORCE_PRELOAD_TEST is only checked for presence by using getenv().\nUse git_env_bool() instead so that GIT_FORCE_PRELOAD_TEST=false can\nwork as expected.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n preload-index.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/preload-index.c b/preload-index.c\nindex 71cd2437a3..0a4e2933bb 100644\n--- a/preload-index.c\n+++ b/preload-index.c\n@@ -5,6 +5,7 @@\n #include \"pathspec.h\"\n #include \"dir.h\"\n #include \"fsmonitor.h\"\n+#include \"config.h\"\n \n #ifdef NO_PTHREADS\n static void preload_index(struct index_state *index,\n@@ -84,7 +85,7 @@ static void preload_index(struct index_state *index,\n \t\treturn;\n \n \tthreads = index->cache_nr / THREAD_COST;\n-\tif ((index->cache_nr > 1) && (threads < 2) && getenv(\"GIT_FORCE_PRELOAD_TEST\"))\n+\tif ((index->cache_nr > 1) && (threads < 2) && git_env_bool(\"GIT_FORCE_PRELOAD_TEST\", 0))\n \t\tthreads = 2;\n \tif (threads < 2)\n \t\treturn;\n-- \n2.18.0.windows.1\n\n"},{"id":"358421","messageId":"20180918232916.57736-4-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180918232916.57736-1-benpeart@microsoft.com","subject":"[PATCH v3 3/5] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-18T23:29:35Z","receivedAt":"2018-09-18T23:29:45Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename GIT_FSMONITOR_TEST to GIT_TEST_FSMONITOR for consistency with the\nother GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give a warning when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n config.c                    |  2 +-\n t/README                    |  4 ++++\n t/t1700-split-index.sh      |  2 +-\n t/t7519-status-fsmonitor.sh |  2 +-\n t/test-lib.sh               | 20 ++++++++++++++++++++\n 5 files changed, 27 insertions(+), 3 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex 3461993f0a..3555c63f28 100644\n--- a/config.c\n+++ b/config.c\n@@ -2278,7 +2278,7 @@ int git_config_get_max_percent_split_change(void)\n int git_config_get_fsmonitor(void)\n {\n \tif (git_config_get_pathname(\"core.fsmonitor\", &core_fsmonitor))\n-\t\tcore_fsmonitor = getenv(\"GIT_FSMONITOR_TEST\");\n+\t\tcore_fsmonitor = getenv(\"GIT_TEST_FSMONITOR\");\n \n \tif (core_fsmonitor && !*core_fsmonitor)\n \t\tcore_fsmonitor = NULL;\ndiff --git a/t/README b/t/README\nindex 56a417439c..47165f7eab 100644\n--- a/t/README\n+++ b/t/README\n@@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncommon pack-objects code\n path where deltas larger than this limit require extra memory\n allocation for bookkeeping.\n \n+GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n+code path for utilizing a file system monitor to speed up detecting\n+new or changed files.\n+\n Naming Tests\n ------------\n \ndiff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\nindex b3b4d83eaf..f6a856f24c 100755\n--- a/t/t1700-split-index.sh\n+++ b/t/t1700-split-index.sh\n@@ -6,7 +6,7 @@ test_description='split index mode tests'\n \n # We need total control of index splitting here\n sane_unset GIT_TEST_SPLIT_INDEX\n-sane_unset GIT_FSMONITOR_TEST\n+sane_unset GIT_TEST_FSMONITOR\n \n test_expect_success 'enable split index' '\n \tgit config splitIndex.maxPercentChange 100 &&\ndiff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\nindex 756beb0d8e..d77012ea6d 100755\n--- a/t/t7519-status-fsmonitor.sh\n+++ b/t/t7519-status-fsmonitor.sh\n@@ -8,7 +8,7 @@ test_description='git status with file system watcher'\n # To run the entire git test suite using fsmonitor:\n #\n # copy t/t7519/fsmonitor-all to a location in your path and then set\n-# GIT_FSMONITOR_TEST=fsmonitor-all and run your tests.\n+# GIT_TEST_FSMONITOR=fsmonitor-all and run your tests.\n #\n \n # Note, after \"git reset --hard HEAD\" no extensions exist other than 'TREE'\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 44288cbb59..653688c067 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -140,6 +140,26 @@ then\n \texport GIT_INDEX_VERSION\n fi\n \n+check_var_migration () {\n+\told_name=$1 new_name=$2\n+\teval \"old_isset=\\${${old_name}:+isset}\"\n+\teval \"new_isset=\\${${new_name}:+isset}\"\n+\tcase \"$old_isset,$new_isset\" in\n+\tisset,)\n+\t\techo >&2 \"warning: $old_name is now $new_name\"\n+\t\techo >&2 \"hint: set $new_name too during the transition period\"\n+\t\teval \"$new_name=\\$$old_name\"\n+\t\t;;\n+\tisset,isset)\n+\t\t# do this later\n+\t\t# echo >&2 \"warning: $old_name is now $new_name\"\n+\t\t# echo >&2 \"hint: remove $old_name\"\n+\t\t;;\n+\tesac\n+}\n+\n+check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n+\n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n if expr \" $GIT_TEST_OPTS \" : \".* --valgrind \" >/dev/null ||\n-- \n2.18.0.windows.1\n\n"},{"id":"358422","messageId":"20180918232916.57736-5-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180918232916.57736-1-benpeart@microsoft.com","subject":"[PATCH v3 4/5] read-cache: update TEST_GIT_INDEX_VERSION support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-18T23:29:36Z","receivedAt":"2018-09-18T23:29:47Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename TEST_GIT_INDEX_VERSION to GIT_TEST_INDEX_VERSION for consistency with\nthe other GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give a warning when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n Makefile      |  6 +++---\n t/README      |  4 ++++\n t/test-lib.sh | 14 ++++++++------\n 3 files changed, 15 insertions(+), 9 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 5a969f5830..9e84ef02f7 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -400,7 +400,7 @@ all::\n # (defaults to \"man\") if you want to have a different default when\n # \"git help\" is called without a parameter specifying the format.\n #\n-# Define TEST_GIT_INDEX_VERSION to 2, 3 or 4 to run the test suite\n+# Define GIT_TEST_INDEX_VERSION to 2, 3 or 4 to run the test suite\n # with a different indexfile format version.  If it isn't set the index\n # file format used is index-v[23].\n #\n@@ -2599,8 +2599,8 @@ endif\n ifdef GIT_INTEROP_MAKE_OPTS\n \t@echo GIT_INTEROP_MAKE_OPTS=\\''$(subst ','\\'',$(subst ','\\'',$(GIT_INTEROP_MAKE_OPTS)))'\\' >>$@+\n endif\n-ifdef TEST_GIT_INDEX_VERSION\n-\t@echo TEST_GIT_INDEX_VERSION=\\''$(subst ','\\'',$(subst ','\\'',$(TEST_GIT_INDEX_VERSION)))'\\' >>$@+\n+ifdef GIT_TEST_INDEX_VERSION\n+\t@echo GIT_TEST_INDEX_VERSION=\\''$(subst ','\\'',$(subst ','\\'',$(GIT_TEST_INDEX_VERSION)))'\\' >>$@+\n endif\n \t@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi\n \ndiff --git a/t/README b/t/README\nindex 47165f7eab..9b13f6d12e 100644\n--- a/t/README\n+++ b/t/README\n@@ -323,6 +323,10 @@ GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n code path for utilizing a file system monitor to speed up detecting\n new or changed files.\n \n+GIT_TEST_INDEX_VERSION=<n> exercises the index read/write code path\n+for the index version specified.  Can be set to any valid version\n+(currently 2, 3, or 4).\n+\n Naming Tests\n ------------\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 653688c067..e80c84d13c 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -134,12 +134,6 @@ export EDITOR\n GIT_TRACE_BARE=1\n export GIT_TRACE_BARE\n \n-if test -n \"${TEST_GIT_INDEX_VERSION:+isset}\"\n-then\n-\tGIT_INDEX_VERSION=\"$TEST_GIT_INDEX_VERSION\"\n-\texport GIT_INDEX_VERSION\n-fi\n-\n check_var_migration () {\n \told_name=$1 new_name=$2\n \teval \"old_isset=\\${${old_name}:+isset}\"\n@@ -159,6 +153,14 @@ check_var_migration () {\n }\n \n check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n+check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n+\n+# Use specific version of the index file format\n+if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n+then\n+\tGIT_INDEX_VERSION=\"$GIT_TEST_INDEX_VERSION\"\n+\texport GIT_INDEX_VERSION\n+fi\n \n # Add libc MALLOC and MALLOC_PERTURB test\n # only if we are not executing the test with valgrind\n-- \n2.18.0.windows.1\n\n"},{"id":"358423","messageId":"20180918232916.57736-6-benpeart@microsoft.com","threadId":"49342","inReplyTo":"20180918232916.57736-1-benpeart@microsoft.com","subject":"[PATCH v3 5/5] preload-index: update GIT_FORCE_PRELOAD_TEST support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-18T23:29:37Z","receivedAt":"2018-09-18T23:30:21Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"Rename GIT_FORCE_PRELOAD_TEST to GIT_TEST_PRELOAD_INDEX for consistency with\nthe other GIT_TEST_ special setups and properly document its use.\n\nAdd logic in t/test-lib.sh to give a warning when the old variable is set to\nlet people know they need to update their environment to use the new\nvariable.\n\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n preload-index.c             | 2 +-\n t/README                    | 3 +++\n t/t7519-status-fsmonitor.sh | 4 ++--\n t/test-lib.sh               | 1 +\n 4 files changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/preload-index.c b/preload-index.c\nindex 0a4e2933bb..a850e197c2 100644\n--- a/preload-index.c\n+++ b/preload-index.c\n@@ -85,7 +85,7 @@ static void preload_index(struct index_state *index,\n \t\treturn;\n \n \tthreads = index->cache_nr / THREAD_COST;\n-\tif ((index->cache_nr > 1) && (threads < 2) && git_env_bool(\"GIT_FORCE_PRELOAD_TEST\", 0))\n+\tif ((index->cache_nr > 1) && (threads < 2) && git_env_bool(\"GIT_TEST_PRELOAD_INDEX\", 0))\n \t\tthreads = 2;\n \tif (threads < 2)\n \t\treturn;\ndiff --git a/t/README b/t/README\nindex 9b13f6d12e..5670c7aad0 100644\n--- a/t/README\n+++ b/t/README\n@@ -327,6 +327,9 @@ GIT_TEST_INDEX_VERSION=<n> exercises the index read/write code path\n for the index version specified.  Can be set to any valid version\n (currently 2, 3, or 4).\n \n+GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path\n+by overriding the minimum number of cache entries required per thread.\n+\n Naming Tests\n ------------\n \ndiff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\nindex d77012ea6d..8308d6d5b1 100755\n--- a/t/t7519-status-fsmonitor.sh\n+++ b/t/t7519-status-fsmonitor.sh\n@@ -245,9 +245,9 @@ do\n \t\tgit config core.preloadIndex $preload_val &&\n \t\tif test $preload_val = true\n \t\tthen\n-\t\t\tGIT_FORCE_PRELOAD_TEST=$preload_val; export GIT_FORCE_PRELOAD_TEST\n+\t\t\tGIT_TEST_PRELOAD_INDEX=$preload_val; export GIT_TEST_PRELOAD_INDEX\n \t\telse\n-\t\t\tunset GIT_FORCE_PRELOAD_TEST\n+\t\t\tsane_unset GIT_TEST_PRELOAD_INDEX\n \t\tfi\n \t'\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex e80c84d13c..8ef86e05a3 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -154,6 +154,7 @@ check_var_migration () {\n \n check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR\n check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION\n+check_var_migration GIT_FORCE_PRELOAD_TEST GIT_TEST_PRELOAD_INDEX\n \n # Use specific version of the index file format\n if test -n \"${GIT_TEST_INDEX_VERSION:+isset}\"\n-- \n2.18.0.windows.1\n\n"},{"id":"358528","messageId":"xmqqtvmkyppc.fsf_-_@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"20180918232916.57736-1-benpeart@microsoft.com","subject":"Re*: [PATCH v3 0/5] Cleanup pass on special test setups","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-20T18:43:43Z","receivedAt":"2018-09-20T18:43:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Peart <benpeart@microsoft.com> writes:\n\n> This round has one code change based on feedback. Other changes are just\n> rewording commit messages.\n\nThanks.  I think the only remaining issue is what to do with the\ninteraction between extra/additional error message that comes from\nthe updates in 3/5 and the test framework selftest in t0000.\n\n-- >8 --\nSubject: t0000: do not get self-test disrupted by environment warnings\n\nThe test framework test-lib.sh itself would want to give warnings\nand hints, e.g. when it sees a deprecated environment variable is in\nuse that we want to encourage users to migrate to another variable.\n\nThe self-test of test framework done in t0000 however do not expect\nto see these warnings and hints, so depending on the settings of\nenvironment variables, a running test may or may not produce these\nmessages to the standard error output, breaking the expectations of\nself-test test framework does on itself.  Here is what we see:\n\n    $ TEST_GIT_INDEX_VERSION=4 sh t0000-basic.sh -i -v\n    ...\n    'err' is not empty, it contains:\n    warning: TEST_GIT_INDEX_VERSION is now GIT_TEST_INDEX_VERSION\n    hint: set GIT_TEST_INDEX_VERSION too during the transition period\n    not ok 5 - pretend we have a fully passing test suite\n\nThe following quick attempt to work it around does not work, because\nsome tests in t0000 do want to see expected errors from the test\nframework itself.\n\n         t/t0000-basic.sh | 2 +-\n         1 file changed, 1 insertion(+), 1 deletion(-)\n\n        diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\n        index 850f651e4e..88c6ed4696 100755\n        --- a/t/t0000-basic.sh\n        +++ b/t/t0000-basic.sh\n        @@ -88,7 +88,7 @@ _run_sub_test_lib_test_common () {\n                        '\n\n                        # Point to the t/test-lib.sh, which isn't in ../ as usual\n        -\t\t. \"\\$TEST_DIRECTORY\"/test-lib.sh\n        +\t\t. \"\\$TEST_DIRECTORY\"/test-lib.sh >/dev/null 2>&1\n                        EOF\n                        cat >>\"$name.sh\" &&\n                        chmod +x \"$name.sh\" &&\n\nThere are a few possible ways to work this around:\n\n * We could strip the warning: and hint: unconditionally from the\n   error output before the error messages are checked in the\n   self-test (helper functions check_sub_test_lib_test_err and\n   check_sub_test_lib_test); the problem with this approach is that\n   it will make it impossible to write self-tests to ensure that\n   right warnings and hints are given.\n\n * We could force a sane environment settings before the test helper\n   _run_sub_test_lib_test_common dot-sources test-lib.sh; the\n   problem with this approach is that _run_sub_test_lib_test_common\n   now needs to be aware of what pairs of environment variables are\n   checked in test-lib.sh using check_var_migration helper.\n\nThe final patch I came up with is probably the solution that is\nleast bad.  Set a variable to tell test-lib.sh that we are running\na self-test, so that various pieces in test-lib.sh can react to keep\nthe output stable.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t0000-basic.sh | 4 ++++\n t/test-lib.sh    | 8 ++++++++\n 2 files changed, 12 insertions(+)\n\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex 850f651e4e..52c02b7c7e 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -87,6 +87,10 @@ _run_sub_test_lib_test_common () {\n \t\tpassing metrics\n \t\t'\n \n+\t\t# Tell the framework that we are self-testing to make sure\n+\t\t# it yields a stable result.\n+\t\tGIT_TEST_FRAMEWORK_SELFTEST=t &&\n+\n \t\t# Point to the t/test-lib.sh, which isn't in ../ as usual\n \t\t. \"\\$TEST_DIRECTORY\"/test-lib.sh\n \t\tEOF\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 8ef86e05a3..364a11ea25 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -135,9 +135,17 @@ GIT_TRACE_BARE=1\n export GIT_TRACE_BARE\n \n check_var_migration () {\n+\t# the warnings and hints given from this helper depends\n+\t# on end-user settings, which will disrupt the self-test\n+\t# done on the test framework itself.\n+\tcase \"$GIT_TEST_FRAMEWORK_SELFTEST\" in\n+\tt)\treturn ;;\n+\tesac\n+\n \told_name=$1 new_name=$2\n \teval \"old_isset=\\${${old_name}:+isset}\"\n \teval \"new_isset=\\${${new_name}:+isset}\"\n+\n \tcase \"$old_isset,$new_isset\" in\n \tisset,)\n \t\techo >&2 \"warning: $old_name is now $new_name\"\n"},{"id":"358854","messageId":"96f7e012-dbd2-ad4c-5fd0-40f859b457ed@gmail.com","threadId":"49342","inReplyTo":"xmqqtvmkyppc.fsf_-_@gitster-ct.c.googlers.com","subject":"Re: Re*: [PATCH v3 0/5] Cleanup pass on special test setups","fromName":"Ben Peart","fromEmail":"peartben@gmail.com","sentAt":"2018-09-25T18:44:08Z","receivedAt":"2018-09-25T18:44:14Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"\n\nOn 9/20/2018 2:43 PM, Junio C Hamano wrote:\n> Ben Peart <benpeart@microsoft.com> writes:\n> \n>> This round has one code change based on feedback. Other changes are just\n>> rewording commit messages.\n> \n> Thanks.  I think the only remaining issue is what to do with the\n> interaction between extra/additional error message that comes from\n> the updates in 3/5 and the test framework selftest in t0000.\n> \n> -- >8 --\n> Subject: t0000: do not get self-test disrupted by environment warnings\n> \n> The test framework test-lib.sh itself would want to give warnings\n> and hints, e.g. when it sees a deprecated environment variable is in\n> use that we want to encourage users to migrate to another variable.\n> \n> The self-test of test framework done in t0000 however do not expect\n> to see these warnings and hints, so depending on the settings of\n> environment variables, a running test may or may not produce these\n> messages to the standard error output, breaking the expectations of\n> self-test test framework does on itself.  Here is what we see:\n> \n>      $ TEST_GIT_INDEX_VERSION=4 sh t0000-basic.sh -i -v\n>      ...\n>      'err' is not empty, it contains:\n>      warning: TEST_GIT_INDEX_VERSION is now GIT_TEST_INDEX_VERSION\n>      hint: set GIT_TEST_INDEX_VERSION too during the transition period\n>      not ok 5 - pretend we have a fully passing test suite\n> \n> The following quick attempt to work it around does not work, because\n> some tests in t0000 do want to see expected errors from the test\n> framework itself.\n> \n>           t/t0000-basic.sh | 2 +-\n>           1 file changed, 1 insertion(+), 1 deletion(-)\n> \n>          diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\n>          index 850f651e4e..88c6ed4696 100755\n>          --- a/t/t0000-basic.sh\n>          +++ b/t/t0000-basic.sh\n>          @@ -88,7 +88,7 @@ _run_sub_test_lib_test_common () {\n>                          '\n> \n>                          # Point to the t/test-lib.sh, which isn't in ../ as usual\n>          -\t\t. \"\\$TEST_DIRECTORY\"/test-lib.sh\n>          +\t\t. \"\\$TEST_DIRECTORY\"/test-lib.sh >/dev/null 2>&1\n>                          EOF\n>                          cat >>\"$name.sh\" &&\n>                          chmod +x \"$name.sh\" &&\n> \n> There are a few possible ways to work this around:\n> \n>   * We could strip the warning: and hint: unconditionally from the\n>     error output before the error messages are checked in the\n>     self-test (helper functions check_sub_test_lib_test_err and\n>     check_sub_test_lib_test); the problem with this approach is that\n>     it will make it impossible to write self-tests to ensure that\n>     right warnings and hints are given.\n> \n>   * We could force a sane environment settings before the test helper\n>     _run_sub_test_lib_test_common dot-sources test-lib.sh; the\n>     problem with this approach is that _run_sub_test_lib_test_common\n>     now needs to be aware of what pairs of environment variables are\n>     checked in test-lib.sh using check_var_migration helper.\n> \n> The final patch I came up with is probably the solution that is\n> least bad.  Set a variable to tell test-lib.sh that we are running\n> a self-test, so that various pieces in test-lib.sh can react to keep\n> the output stable.\n> \n\nThis looks like a reasonable compromise to me.  It's nice to give the \nmigration hints to end users so they know they need to update their \nenvironments to reflect the required changes.  On the other hand, we \ndon't want or need them to be triggered when we are running the self-test.\n\nIt would be nice to enable that automatically without the need for \nanother environment variable but I couldn't think of a good way to \naccomplish that so I agree - this seems like the \"least bad\" solution. :-)\n\nThanks Junio\n\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>   t/t0000-basic.sh | 4 ++++\n>   t/test-lib.sh    | 8 ++++++++\n>   2 files changed, 12 insertions(+)\n> \n> diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\n> index 850f651e4e..52c02b7c7e 100755\n> --- a/t/t0000-basic.sh\n> +++ b/t/t0000-basic.sh\n> @@ -87,6 +87,10 @@ _run_sub_test_lib_test_common () {\n>   \t\tpassing metrics\n>   \t\t'\n>   \n> +\t\t# Tell the framework that we are self-testing to make sure\n> +\t\t# it yields a stable result.\n> +\t\tGIT_TEST_FRAMEWORK_SELFTEST=t &&\n> +\n>   \t\t# Point to the t/test-lib.sh, which isn't in ../ as usual\n>   \t\t. \"\\$TEST_DIRECTORY\"/test-lib.sh\n>   \t\tEOF\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index 8ef86e05a3..364a11ea25 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -135,9 +135,17 @@ GIT_TRACE_BARE=1\n>   export GIT_TRACE_BARE\n>   \n>   check_var_migration () {\n> +\t# the warnings and hints given from this helper depends\n> +\t# on end-user settings, which will disrupt the self-test\n> +\t# done on the test framework itself.\n> +\tcase \"$GIT_TEST_FRAMEWORK_SELFTEST\" in\n> +\tt)\treturn ;;\n> +\tesac\n> +\n>   \told_name=$1 new_name=$2\n>   \teval \"old_isset=\\${${old_name}:+isset}\"\n>   \teval \"new_isset=\\${${new_name}:+isset}\"\n> +\n>   \tcase \"$old_isset,$new_isset\" in\n>   \tisset,)\n>   \t\techo >&2 \"warning: $old_name is now $new_name\"\n> \n"},{"id":"359195","messageId":"20180928100143.GA23446@localhost","threadId":"49342","inReplyTo":"20180918232916.57736-4-benpeart@microsoft.com","subject":"Re: [PATCH v3 3/5] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-09-28T10:01:43Z","receivedAt":"2018-09-28T10:01:53Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Tue, Sep 18, 2018 at 11:29:35PM +0000, Ben Peart wrote:\n> diff --git a/t/README b/t/README\n> index 56a417439c..47165f7eab 100644\n> --- a/t/README\n> +++ b/t/README\n> @@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncommon pack-objects code\n>  path where deltas larger than this limit require extra memory\n>  allocation for bookkeeping.\n>  \n> +GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n> +code path for utilizing a file system monitor to speed up detecting\n> +new or changed files.\n\nHere you tell us to set GIT_TEST_FSMONITOR to an absolute path, and we\nare good to go.\n\n> diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\n> index 756beb0d8e..d77012ea6d 100755\n> --- a/t/t7519-status-fsmonitor.sh\n> +++ b/t/t7519-status-fsmonitor.sh\n> @@ -8,7 +8,7 @@ test_description='git status with file system watcher'\n>  # To run the entire git test suite using fsmonitor:\n>  #\n>  # copy t/t7519/fsmonitor-all to a location in your path and then set\n> -# GIT_FSMONITOR_TEST=fsmonitor-all and run your tests.\n> +# GIT_TEST_FSMONITOR=fsmonitor-all and run your tests.\n\nBut this old comment is different, suggesting copying that script to\nour $PATH.\n\nI prefer your instructions above, because it's only a single step,\nand, more importantly, it won't pollute my $PATH.  I think this\ncomment should be updated to make the advices in both places\nconsistent.  Or perhaps even removed, now that all GIT_TEST variables\nare documented in the same place?\n\n"},{"id":"359202","messageId":"653f4fbd-ed32-4cf8-b1bb-9cfef4f8deaa@gmail.com","threadId":"49342","inReplyTo":"20180928100143.GA23446@localhost","subject":"Re: [PATCH v3 3/5] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ben Peart","fromEmail":"peartben@gmail.com","sentAt":"2018-09-28T14:21:31Z","receivedAt":"2018-09-28T14:21:38Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"\n\nOn 9/28/2018 6:01 AM, SZEDER Gábor wrote:\n> On Tue, Sep 18, 2018 at 11:29:35PM +0000, Ben Peart wrote:\n>> diff --git a/t/README b/t/README\n>> index 56a417439c..47165f7eab 100644\n>> --- a/t/README\n>> +++ b/t/README\n>> @@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncommon pack-objects code\n>>   path where deltas larger than this limit require extra memory\n>>   allocation for bookkeeping.\n>>   \n>> +GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n>> +code path for utilizing a file system monitor to speed up detecting\n>> +new or changed files.\n> \n> Here you tell us to set GIT_TEST_FSMONITOR to an absolute path, and we\n> are good to go.\n> \n>> diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\n>> index 756beb0d8e..d77012ea6d 100755\n>> --- a/t/t7519-status-fsmonitor.sh\n>> +++ b/t/t7519-status-fsmonitor.sh\n>> @@ -8,7 +8,7 @@ test_description='git status with file system watcher'\n>>   # To run the entire git test suite using fsmonitor:\n>>   #\n>>   # copy t/t7519/fsmonitor-all to a location in your path and then set\n>> -# GIT_FSMONITOR_TEST=fsmonitor-all and run your tests.\n>> +# GIT_TEST_FSMONITOR=fsmonitor-all and run your tests.\n> \n> But this old comment is different, suggesting copying that script to\n> our $PATH.\n> \n> I prefer your instructions above, because it's only a single step,\n> and, more importantly, it won't pollute my $PATH.  I think this\n> comment should be updated to make the advices in both places\n> consistent.  Or perhaps even removed, now that all GIT_TEST variables\n> are documented in the same place?\n> \n\nI prefer the suggestion to simply remove this text from the test script \nnow that there is documentation for it in the t/README file.\n"},{"id":"359204","messageId":"efe7ae90-d0c2-9223-cdab-8b6c64f818bd@gmail.com","threadId":"49342","inReplyTo":"653f4fbd-ed32-4cf8-b1bb-9cfef4f8deaa@gmail.com","subject":"Re: [PATCH v3 3/5] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ben Peart","fromEmail":"peartben@gmail.com","sentAt":"2018-09-28T14:27:16Z","receivedAt":"2018-09-28T14:27:22Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"\n\nOn 9/28/2018 10:21 AM, Ben Peart wrote:\n> \n> \n> On 9/28/2018 6:01 AM, SZEDER Gábor wrote:\n>> On Tue, Sep 18, 2018 at 11:29:35PM +0000, Ben Peart wrote:\n>>> diff --git a/t/README b/t/README\n>>> index 56a417439c..47165f7eab 100644\n>>> --- a/t/README\n>>> +++ b/t/README\n>>> @@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the \n>>> uncommon pack-objects code\n>>>   path where deltas larger than this limit require extra memory\n>>>   allocation for bookkeeping.\n>>> +GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor\n>>> +code path for utilizing a file system monitor to speed up detecting\n>>> +new or changed files.\n>>\n>> Here you tell us to set GIT_TEST_FSMONITOR to an absolute path, and we\n>> are good to go.\n>>\n>>> diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\n>>> index 756beb0d8e..d77012ea6d 100755\n>>> --- a/t/t7519-status-fsmonitor.sh\n>>> +++ b/t/t7519-status-fsmonitor.sh\n>>> @@ -8,7 +8,7 @@ test_description='git status with file system watcher'\n>>>   # To run the entire git test suite using fsmonitor:\n>>>   #\n>>>   # copy t/t7519/fsmonitor-all to a location in your path and then set\n>>> -# GIT_FSMONITOR_TEST=fsmonitor-all and run your tests.\n>>> +# GIT_TEST_FSMONITOR=fsmonitor-all and run your tests.\n>>\n>> But this old comment is different, suggesting copying that script to\n>> our $PATH.\n>>\n>> I prefer your instructions above, because it's only a single step,\n>> and, more importantly, it won't pollute my $PATH.  I think this\n>> comment should be updated to make the advices in both places\n>> consistent.  Or perhaps even removed, now that all GIT_TEST variables\n>> are documented in the same place?\n>>\n> \n> I prefer the suggestion to simply remove this text from the test script \n> now that there is documentation for it in the t/README file.\n\nJunio, can you squash in the following patch or would you prefer I \nreroll the entire series?\n\nThanks,\n\nBen\n\n From 393007340dc1baf3539ab727e0a8128e7c408a27 Mon Sep 17 00:00:00 2001\nFrom: Ben Peart <peartben@gmail.com>\nDate: Fri, 28 Sep 2018 10:23:18 -0400\nSubject: fixup! fsmonitor: remove outdated instructions from test\n\nRemove the outdated instructions on how to run the test suite utilizing\nfsmonitor now that it is properly documented in t/README.\n\nSigned-off-by: Ben Peart <peartben@gmail.com>\n---\n\nNotes:\n     Base Ref: git-test-cleanup-v3\n     Web-Diff: https://github.com/benpeart/git/commit/393007340d\n     Checkout: git fetch https://github.com/benpeart/git \ngit-test-cleanup-v1 && git checkout 393007340d\n\n  t/t7519-status-fsmonitor.sh | 7 -------\n  1 file changed, 7 deletions(-)\n\ndiff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\nindex 8308d6d5b1..3f0dd98010 100755\n--- a/t/t7519-status-fsmonitor.sh\n+++ b/t/t7519-status-fsmonitor.sh\n@@ -4,13 +4,6 @@ test_description='git status with file system watcher'\n\n  . ./test-lib.sh\n\n-#\n-# To run the entire git test suite using fsmonitor:\n-#\n-# copy t/t7519/fsmonitor-all to a location in your path and then set\n-# GIT_TEST_FSMONITOR=fsmonitor-all and run your tests.\n-#\n-\n  # Note, after \"git reset --hard HEAD\" no extensions exist other than \n'TREE'\n  # \"git update-index --fsmonitor\" can be used to get the extension written\n  # before testing the results.\n\nbase-commit: 043246d9369fb851c5c2b922466f77fc7ef0327b\n-- \n2.18.0.windows.1\n\n"},{"id":"359236","messageId":"xmqqzhw1bgzo.fsf@gitster-ct.c.googlers.com","threadId":"49342","inReplyTo":"efe7ae90-d0c2-9223-cdab-8b6c64f818bd@gmail.com","subject":"Re: [PATCH v3 3/5] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-28T18:43:07Z","receivedAt":"2018-09-28T18:43:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Peart <peartben@gmail.com> writes:\n\n> Junio, can you squash in the following patch or would you prefer I\n> reroll the entire series?\n\nSquash it to f8cd77d5 (\"fsmonitor: update GIT_TEST_FSMONITOR\nsupport\", 2018-09-18) and use the two new lines in the log message?\n\nI can do that.\n\nThanks.\n"}]}