{"thread":{"id":"49339","subject":"[PATCH v1] fsmonitor: update GIT_TEST_FSMONITOR support","startedAt":"2018-09-13T17:46:27Z","lastAt":"2018-09-14T13:09:40Z","messageCount":4,"participants":["Ben Peart","Junio C Hamano","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"358062","messageId":"20180913174522.53872-1-benpeart@microsoft.com","threadId":"49339","inReplyTo":null,"subject":"[PATCH v1] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2018-09-13T17:45:42Z","receivedAt":"2018-09-13T17:46:27Z","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\nSigned-off-by: Ben Peart <Ben.Peart@microsoft.com>\n---\n\nNotes:\n    Base Ref: v2.19.0\n    Web-Diff: https://github.com/benpeart/git/commit/311484a684\n    Checkout: git fetch https://github.com/benpeart/git git-test-fsmonitor-v1 && git checkout 311484a684\n\n config.c                    | 2 +-\n t/README                    | 4 ++++\n t/t1700-split-index.sh      | 2 +-\n t/t7519-status-fsmonitor.sh | 2 +-\n 4 files changed, 7 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 9028b47d92..545438c820 100644\n--- a/t/README\n+++ b/t/README\n@@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncomon 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'\n\nbase-commit: 1d4361b0f344188ab5eec6dcea01f61a3a3a1670\n-- \n2.18.0.windows.1\n\n"},{"id":"358079","messageId":"xmqqo9d1ff66.fsf@gitster-ct.c.googlers.com","threadId":"49339","inReplyTo":"20180913174522.53872-1-benpeart@microsoft.com","subject":"Re: [PATCH v1] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-13T18:03:29Z","receivedAt":"2018-09-13T18:03:34Z","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> Rename GIT_FSMONITOR_TEST to GIT_TEST_FSMONITOR for consistency with the\n> other GIT_TEST_ special setups and properly document its use.\n\nMakes sense.\n\nThanks for such an attention to detail.\n\n>\n> Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>\n> ---\n>\n> Notes:\n>     Base Ref: v2.19.0\n>     Web-Diff: https://github.com/benpeart/git/commit/311484a684\n>     Checkout: git fetch https://github.com/benpeart/git git-test-fsmonitor-v1 && git checkout 311484a684\n>\n>  config.c                    | 2 +-\n>  t/README                    | 4 ++++\n>  t/t1700-split-index.sh      | 2 +-\n>  t/t7519-status-fsmonitor.sh | 2 +-\n>  4 files changed, 7 insertions(+), 3 deletions(-)\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>  \tif (core_fsmonitor && !*core_fsmonitor)\n>  \t\tcore_fsmonitor = NULL;\n> diff --git a/t/README b/t/README\n> index 9028b47d92..545438c820 100644\n> --- a/t/README\n> +++ b/t/README\n> @@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncomon 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>  \n> diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\n> index 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 &&\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>  \n>  # Note, after \"git reset --hard HEAD\" no extensions exist other than 'TREE'\n>\n> base-commit: 1d4361b0f344188ab5eec6dcea01f61a3a3a1670\n"},{"id":"358085","messageId":"87h8itkz2h.fsf@evledraar.gmail.com","threadId":"49339","inReplyTo":"20180913174522.53872-1-benpeart@microsoft.com","subject":"Re: [PATCH v1] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-09-13T18:54:46Z","receivedAt":"2018-09-13T18:54:52Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Sep 13 2018, Ben Peart wrote:\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>  \tif (core_fsmonitor && !*core_fsmonitor)\n>  \t\tcore_fsmonitor = NULL;\n> diff --git a/t/README b/t/README\n> index 9028b47d92..545438c820 100644\n> --- a/t/README\n> +++ b/t/README\n> @@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncomon 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\nI've seen this & will watch out for it, but still, when I'm updating to\n\"next\" in a couple of months I may not be tracking the exact state of\nthe integration of this patch, and then running with\nGIT_FSMONITOR_TEST=... will suddenly be a noop.\n\nSo maybe something like this to test-lib.sh as well (or directly in\nconfig.c):\n\n    if test -n \"$GIT_FSMONITOR_TEST\"\n    then\n        echo \"The GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n        exit 1\n    fi\n\nMaybe I'm being too nitpicky and there's only two of us who run the test\nwith this anyway, and we can deal with it.\n\nIt just rubs me the wrong way that we have a test mode that silently\nstops being picked up because a command-line option or env variable got\nrenamed, especially since we've had it for 4 stable releases, especially\nsince it's so easy for us to avoid that confusion (just die),\nv.s. potential time wasted downstream (wondering why fsmonitor stuff\nbroke on $SOME_OS even though we're testing for it during package\nbuild...).\n"},{"id":"358118","messageId":"90c3d391-a10c-0fd5-4c76-96e547b8bd64@gmail.com","threadId":"49339","inReplyTo":"87h8itkz2h.fsf@evledraar.gmail.com","subject":"Re: [PATCH v1] fsmonitor: update GIT_TEST_FSMONITOR support","fromName":"Ben Peart","fromEmail":"peartben@gmail.com","sentAt":"2018-09-14T13:09:33Z","receivedAt":"2018-09-14T13:09:40Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"\n\nOn 9/13/2018 2:54 PM, Ævar Arnfjörð Bjarmason wrote:\n> \n> On Thu, Sep 13 2018, Ben Peart wrote:\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>>   \tif (core_fsmonitor && !*core_fsmonitor)\n>>   \t\tcore_fsmonitor = NULL;\n>> diff --git a/t/README b/t/README\n>> index 9028b47d92..545438c820 100644\n>> --- a/t/README\n>> +++ b/t/README\n>> @@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncomon 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> \n> I've seen this & will watch out for it, but still, when I'm updating to\n> \"next\" in a couple of months I may not be tracking the exact state of\n> the integration of this patch, and then running with\n> GIT_FSMONITOR_TEST=... will suddenly be a noop.\n> \n> So maybe something like this to test-lib.sh as well (or directly in\n> config.c):\n> \n>      if test -n \"$GIT_FSMONITOR_TEST\"\n>      then\n>          echo \"The GIT_FSMONITOR_TEST variable has been renamed to GIT_TEST_FSMONITOR\"\n>          exit 1\n>      fi\n> \n> Maybe I'm being too nitpicky and there's only two of us who run the test\n> with this anyway, and we can deal with it.\n> \n\nI agree that there are probably only 2 people in the world who ever used \nthis but I'm happy to add the additional test to make it obvious it has \nbeen renamed.\n\n> It just rubs me the wrong way that we have a test mode that silently\n> stops being picked up because a command-line option or env variable got\n> renamed, especially since we've had it for 4 stable releases, especially\n> since it's so easy for us to avoid that confusion (just die),\n> v.s. potential time wasted downstream (wondering why fsmonitor stuff\n> broke on $SOME_OS even though we're testing for it during package\n> build...).\n> \n"}]}