{"thread":{"id":"47147","subject":"[PATCH 0/2] fsmonitor: Stop reading from PWD, write fsmonitor+split index right","startedAt":"2017-11-09T19:58:31Z","lastAt":"2017-12-16T02:02:41Z","messageCount":9,"participants":["Alex Vandiver","Junio C Hamano","Ben Peart"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"332129","messageId":"20171109195810.30446-1-alexmv@dropbox.com","threadId":"47147","inReplyTo":null,"subject":"[PATCH 0/2] fsmonitor: Stop reading from PWD, write fsmonitor+split index right","fromName":"Alex Vandiver","fromEmail":"alexmv@dropbox.com","sentAt":"2017-11-09T19:58:08Z","receivedAt":"2017-11-09T19:58:31Z","isPatch":true,"sender":{"key":"alexmv@dropbox.com","avatar":null},"body":"A couple further patches for the fsmonitor branch, which ideally I'd\nhave noticed before my previous series landed.\n\nIn the first patch I believe I've found the underlying reason for the\nPWD confusion in the previous go-around -- but I'm not sure I'm wholly\nconvinced about my solution to it.  Specifically, it seems like this\nproblem is likely more widespread than this one place, so adjusting it\nin the example hook may just be leaving the same dangerous edge for\nothers to stumble across later.\n\n - Alex\n"},{"id":"332130","messageId":"4ff73be656d5bbf9e2cada6bdec61843da9d1516.1510257457.git.alexmv@dropbox.com","threadId":"47147","inReplyTo":"20171109195810.30446-1-alexmv@dropbox.com","subject":"[PATCH 2/2] fsmonitor: Store fsmonitor bitmap before splitting index","fromName":"Alex Vandiver","fromEmail":"alexmv@dropbox.com","sentAt":"2017-11-09T19:58:10Z","receivedAt":"2017-11-09T19:58:34Z","isPatch":true,"sender":{"key":"alexmv@dropbox.com","avatar":null},"body":"ba1b9caca6 resolved the problem of the fsmonitor data being applied to\nthe non-base index when reading; however, a similar problem exists\nwhen writing the index.  Specifically, writing of the fsmonitor\nextension happens only after the work to split the index has been\napplied -- as such, the information in the index is only for the\nnon-\"base\" index, and thus the extension information contains only\npartial data.\n\nWhen saving, compute the ewah bitmap before the index is split, and\nstore it in the fsmonitor_dirty field, mirroring the behavior that\noccurred during reading.  fsmonitor_dirty is kept from being leaked by\nbeing freed when the extension data is written -- which always happens\nprecisely once, no matter the split index configuration.\n\nSigned-off-by: Alex Vandiver <alexmv@dropbox.com>\n---\n fsmonitor.c                 | 20 ++++++++++++--------\n fsmonitor.h                 |  9 ++++++++-\n read-cache.c                |  3 +++\n t/t7519-status-fsmonitor.sh | 13 +++++++++++++\n 4 files changed, 36 insertions(+), 9 deletions(-)\n\ndiff --git a/fsmonitor.c b/fsmonitor.c\nindex f494a866d..0af7c4edb 100644\n--- a/fsmonitor.c\n+++ b/fsmonitor.c\n@@ -54,12 +54,19 @@ int read_fsmonitor_extension(struct index_state *istate, const void *data,\n \treturn 0;\n }\n \n+void fill_fsmonitor_bitmap(struct index_state *istate)\n+{\n+\tint i;\n+\tistate->fsmonitor_dirty = ewah_new();\n+\tfor (i = 0; i < istate->cache_nr; i++)\n+\t\tif (!(istate->cache[i]->ce_flags & CE_FSMONITOR_VALID))\n+\t\t\tewah_set(istate->fsmonitor_dirty, i);\n+}\n+\n void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate)\n {\n \tuint32_t hdr_version;\n \tuint64_t tm;\n-\tstruct ewah_bitmap *bitmap;\n-\tint i;\n \tuint32_t ewah_start;\n \tuint32_t ewah_size = 0;\n \tint fixup = 0;\n@@ -73,12 +80,9 @@ void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate)\n \tstrbuf_add(sb, &ewah_size, sizeof(uint32_t)); /* we'll fix this up later */\n \n \tewah_start = sb->len;\n-\tbitmap = ewah_new();\n-\tfor (i = 0; i < istate->cache_nr; i++)\n-\t\tif (!(istate->cache[i]->ce_flags & CE_FSMONITOR_VALID))\n-\t\t\tewah_set(bitmap, i);\n-\tewah_serialize_strbuf(bitmap, sb);\n-\tewah_free(bitmap);\n+\tewah_serialize_strbuf(istate->fsmonitor_dirty, sb);\n+\tewah_free(istate->fsmonitor_dirty);\n+\tistate->fsmonitor_dirty = NULL;\n \n \t/* fix up size field */\n \tput_be32(&ewah_size, sb->len - ewah_start);\ndiff --git a/fsmonitor.h b/fsmonitor.h\nindex 0de644e01..cd3cc0ccf 100644\n--- a/fsmonitor.h\n+++ b/fsmonitor.h\n@@ -10,7 +10,14 @@ extern struct trace_key trace_fsmonitor;\n extern int read_fsmonitor_extension(struct index_state *istate, const void *data, unsigned long sz);\n \n /*\n- * Write the CE_FSMONITOR_VALID state into the fsmonitor index extension.\n+ * Fill the fsmonitor_dirty ewah bits with their state from the index,\n+ * before it is split during writing.\n+ */\n+extern void fill_fsmonitor_bitmap(struct index_state *istate);\n+\n+/*\n+ * Write the CE_FSMONITOR_VALID state into the fsmonitor index\n+ * extension.  Reads from the fsmonitor_dirty ewah in the index.\n  */\n extern void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate);\n \ndiff --git a/read-cache.c b/read-cache.c\nindex c18e5e623..7976d39d6 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -2529,6 +2529,9 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock,\n \tint new_shared_index, ret;\n \tstruct split_index *si = istate->split_index;\n \n+\tif (istate->fsmonitor_last_update)\n+\t\tfill_fsmonitor_bitmap(istate);\n+\n \tif (!si || alternate_index_output ||\n \t    (istate->cache_changed & ~EXTMASK)) {\n \t\tif (si)\ndiff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh\nindex c6df85af5..eb2d13bbc 100755\n--- a/t/t7519-status-fsmonitor.sh\n+++ b/t/t7519-status-fsmonitor.sh\n@@ -301,4 +301,17 @@ do\n \tdone\n done\n \n+# test that splitting the index dosn't interfere\n+test_expect_success 'splitting the index results in the same state' '\n+\twrite_integration_script &&\n+\tdirty_repo &&\n+\tgit update-index --fsmonitor  &&\n+\tgit ls-files -f >expect &&\n+\ttest-dump-fsmonitor >&2 && echo &&\n+\tgit update-index --fsmonitor --split-index &&\n+\ttest-dump-fsmonitor >&2 && echo &&\n+\tgit ls-files -f >actual &&\n+\ttest_cmp expect actual\n+'\n+\n test_done\n-- \n2.15.0.rc1.413.g76aedb451\n\n"},{"id":"332131","messageId":"1a8090dfa6f273bae68cfcdd62446944bedbc8a7.1510257457.git.alexmv@dropbox.com","threadId":"47147","inReplyTo":"20171109195810.30446-1-alexmv@dropbox.com","subject":"[PATCH 1/2] fsmonitor: Read from getcwd(), not the PWD environment variable","fromName":"Alex Vandiver","fromEmail":"alexmv@dropbox.com","sentAt":"2017-11-09T19:58:09Z","receivedAt":"2017-11-09T19:58:35Z","isPatch":true,"sender":{"key":"alexmv@dropbox.com","avatar":null},"body":"Though the process has chdir'd to the root of the working tree, the\nPWD environment variable is only guaranteed to be updated accordingly\nif a shell is involved -- which is not guaranteed to be the case.\nThat is, if `/usr/bin/perl` is a binary, $ENV{PWD} is unchanged from\nwhatever spawned `git` -- if `/usr/bin/perl` is a trivial shell\nwrapper to the real `perl`, `$ENV{PWD}` will have been updated to the\nroot of the working copy.\n\nUpdate to read from the Cwd module using the `getcwd` syscall, not the\nPWD environment variable.  The Cygwin case is left unchanged, as it\nnecessarily _does_ go through a shell.\n\nSigned-off-by: Alex Vandiver <alexmv@dropbox.com>\n---\n t/t7519/fsmonitor-watchman                 | 3 ++-\n templates/hooks--fsmonitor-watchman.sample | 3 ++-\n 2 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman\nindex a3e30bf54..5fe72cefa 100755\n--- a/t/t7519/fsmonitor-watchman\n+++ b/t/t7519/fsmonitor-watchman\n@@ -41,7 +41,8 @@ if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {\n \t$git_work_tree =~ s/[\\r\\n]+//g;\n \t$git_work_tree =~ s,\\\\,/,g;\n } else {\n-\t$git_work_tree = $ENV{'PWD'};\n+\trequire Cwd;\n+\t$git_work_tree = Cwd::cwd();\n }\n \n my $retry = 1;\ndiff --git a/templates/hooks--fsmonitor-watchman.sample b/templates/hooks--fsmonitor-watchman.sample\nindex 9a082f278..ba6d88c5f 100755\n--- a/templates/hooks--fsmonitor-watchman.sample\n+++ b/templates/hooks--fsmonitor-watchman.sample\n@@ -40,7 +40,8 @@ if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {\n \t$git_work_tree =~ s/[\\r\\n]+//g;\n \t$git_work_tree =~ s,\\\\,/,g;\n } else {\n-\t$git_work_tree = $ENV{'PWD'};\n+\trequire Cwd;\n+\t$git_work_tree = Cwd::cwd();\n }\n \n my $retry = 1;\n-- \n2.15.0.rc1.413.g76aedb451\n\n"},{"id":"332150","messageId":"xmqqzi7ug1w2.fsf@gitster.mtv.corp.google.com","threadId":"47147","inReplyTo":"1a8090dfa6f273bae68cfcdd62446944bedbc8a7.1510257457.git.alexmv@dropbox.com","subject":"Re: [PATCH 1/2] fsmonitor: Read from getcwd(), not the PWD environment variable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-11-10T05:04:45Z","receivedAt":"2017-11-10T05:04:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Vandiver <alexmv@dropbox.com> writes:\n\nThis comment is only so that I do not keep editing them while queuing..\n\n> Subject: Re: [PATCH 1/2] fsmonitor: Read from getcwd(), not the PWD environment variable\n\nDowncase \"Read\" (or any word after \"<area>: \" on the commit title).\n\n> Though the process has chdir'd to the root of the working tree, the\n> PWD environment variable is only guaranteed to be updated accordingly\n> if a shell is involved -- which is not guaranteed to be the case.\n> That is, if `/usr/bin/perl` is a binary, $ENV{PWD} is unchanged from\n> whatever spawned `git` -- if `/usr/bin/perl` is a trivial shell\n> wrapper to the real `perl`, `$ENV{PWD}` will have been updated to the\n> root of the working copy.\n>\n> Update to read from the Cwd module using the `getcwd` syscall, not the\n> PWD environment variable.  The Cygwin case is left unchanged, as it\n> necessarily _does_ go through a shell.\n\nInteresting observation.  Why didn't anybody else notice it, I\nwonder?\n\nThanks, will queue.\n\n> Signed-off-by: Alex Vandiver <alexmv@dropbox.com>\n> ---\n>  t/t7519/fsmonitor-watchman                 | 3 ++-\n>  templates/hooks--fsmonitor-watchman.sample | 3 ++-\n>  2 files changed, 4 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman\n> index a3e30bf54..5fe72cefa 100755\n> --- a/t/t7519/fsmonitor-watchman\n> +++ b/t/t7519/fsmonitor-watchman\n> @@ -41,7 +41,8 @@ if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {\n>  \t$git_work_tree =~ s/[\\r\\n]+//g;\n>  \t$git_work_tree =~ s,\\\\,/,g;\n>  } else {\n> -\t$git_work_tree = $ENV{'PWD'};\n> +\trequire Cwd;\n> +\t$git_work_tree = Cwd::cwd();\n>  }\n>  \n>  my $retry = 1;\n> diff --git a/templates/hooks--fsmonitor-watchman.sample b/templates/hooks--fsmonitor-watchman.sample\n> index 9a082f278..ba6d88c5f 100755\n> --- a/templates/hooks--fsmonitor-watchman.sample\n> +++ b/templates/hooks--fsmonitor-watchman.sample\n> @@ -40,7 +40,8 @@ if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {\n>  \t$git_work_tree =~ s/[\\r\\n]+//g;\n>  \t$git_work_tree =~ s,\\\\,/,g;\n>  } else {\n> -\t$git_work_tree = $ENV{'PWD'};\n> +\trequire Cwd;\n> +\t$git_work_tree = Cwd::cwd();\n>  }\n>  \n>  my $retry = 1;\n"},{"id":"332151","messageId":"xmqqvaiig1ki.fsf@gitster.mtv.corp.google.com","threadId":"47147","inReplyTo":"4ff73be656d5bbf9e2cada6bdec61843da9d1516.1510257457.git.alexmv@dropbox.com","subject":"Re: [PATCH 2/2] fsmonitor: Store fsmonitor bitmap before splitting index","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-11-10T05:11:41Z","receivedAt":"2017-11-10T05:11:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Vandiver <alexmv@dropbox.com> writes:\n\n> ba1b9caca6 resolved the problem of the fsmonitor data being applied to\n\n(from SubmittingPatches)\n\nIf you want to reference a previous commit in the history of a stable\nbranch, use the format \"abbreviated sha1 (subject, date)\",\nwith the subject enclosed in a pair of double-quotes, like this:\n\n    Commit f86a374 (\"pack-bitmap.c: fix a memleak\", 2015-03-30)\n    noticed that ...\n\nThe \"Copy commit summary\" command of gitk can be used to obtain this\nformat, or this invocation of \"git show\":\n\n    git show -s --date=short --pretty='format:%h (\"%s\", %ad)' <commit>\n\n\n> the non-base index when reading; however, a similar problem exists\n> when writing the index.  Specifically, writing of the fsmonitor\n> extension happens only after the work to split the index has been\n> applied -- as such, the information in the index is only for the\n> non-\"base\" index, and thus the extension information contains only\n> partial data.\n\nSo... what's the effect of not applying this change?  Do we miss\npaths that are known to the watchman to have been modified and end\nup not adding them if we do \"git add -u\"?  Or do we miss paths that\nare known to the watchman to be clean but mistakenly think are dirty,\nand spend unnecessary cycles?  IOW, is this fixing a correctness\nissue, or a performance one?\n\n> When saving, compute the ewah bitmap before the index is split, and\n> store it in the fsmonitor_dirty field, mirroring the behavior that\n> occurred during reading.  fsmonitor_dirty is kept from being leaked by\n> being freed when the extension data is written -- which always happens\n> precisely once, no matter the split index configuration.\n\nThe observation and the approach stated to fix both sounds\nsensible.  I'll queue this too, awaiting for Ben's review.\n\nThanks.\n"},{"id":"332247","messageId":"20171110210311.11036-1-benpeart@microsoft.com","threadId":"47147","inReplyTo":"xmqqzi7ug1w2.fsf@gitster.mtv.corp.google.com","subject":"[PATCH v1] fsmonitor: simplify determining the git worktree under Windows","fromName":"Ben Peart","fromEmail":"benpeart@microsoft.com","sentAt":"2017-11-10T21:03:11Z","receivedAt":"2017-11-10T21:03:46Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"I haven't tested the non Windows paths but the patch looks reasonable.\n\nThis inspired me to get someone more familiar with perl (thanks Johannes)\nto revisit this code for the Windows side as well.  The logic for\ndetermining the git worktree when running on Windows is more complex\nthan necessary.  It also spawns multiple processes (uname and cygpath)\nwhich slows things down.\n\nSimplify and speed up the process of finding the git worktree when\nrunning on Windows by keeping it in perl and avoiding spawning helper\nprocesses.\n\nSigned-off-by: Ben Peart <benpeart@microsoft.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\nNotes:\n    Base Ref:\n    Web-Diff: https://github.com/benpeart/git/commit/20affe124b\n    Checkout: git fetch https://github.com/benpeart/git fsmonitor_splitindex-v1 && git checkout 20affe124b\n\n t/t7519/fsmonitor-watchman                 | 13 +++----------\n templates/hooks--fsmonitor-watchman.sample | 13 +++----------\n 2 files changed, 6 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman\nindex 5fe72cefaf..5514edcf68 100755\n--- a/t/t7519/fsmonitor-watchman\n+++ b/t/t7519/fsmonitor-watchman\n@@ -29,17 +29,10 @@ if ($version == 1) {\n \t    \"Falling back to scanning...\\n\";\n }\n \n-# Convert unix style paths to escaped Windows style paths when running\n-# in Windows command prompt\n-\n-my $system = `uname -s`;\n-$system =~ s/[\\r\\n]+//g;\n my $git_work_tree;\n-\n-if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {\n-\t$git_work_tree = `cygpath -aw \"\\$PWD\"`;\n-\t$git_work_tree =~ s/[\\r\\n]+//g;\n-\t$git_work_tree =~ s,\\\\,/,g;\n+if ($^O =~ 'msys' || $^O =~ 'cygwin') {\n+\t$git_work_tree = Win32::GetCwd();\n+\t$git_work_tree =~ tr/\\\\/\\//;\n } else {\n \trequire Cwd;\n \t$git_work_tree = Cwd::cwd();\ndiff --git a/templates/hooks--fsmonitor-watchman.sample b/templates/hooks--fsmonitor-watchman.sample\nindex ba6d88c5f8..e673bb3980 100755\n--- a/templates/hooks--fsmonitor-watchman.sample\n+++ b/templates/hooks--fsmonitor-watchman.sample\n@@ -28,17 +28,10 @@ if ($version == 1) {\n \t    \"Falling back to scanning...\\n\";\n }\n \n-# Convert unix style paths to escaped Windows style paths when running\n-# in Windows command prompt\n-\n-my $system = `uname -s`;\n-$system =~ s/[\\r\\n]+//g;\n my $git_work_tree;\n-\n-if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {\n-\t$git_work_tree = `cygpath -aw \"\\$PWD\"`;\n-\t$git_work_tree =~ s/[\\r\\n]+//g;\n-\t$git_work_tree =~ s,\\\\,/,g;\n+if ($^O =~ 'msys' || $^O =~ 'cygwin') {\n+\t$git_work_tree = Win32::GetCwd();\n+\t$git_work_tree =~ tr/\\\\/\\//;\n } else {\n \trequire Cwd;\n \t$git_work_tree = Cwd::cwd();\n\nbase-commit: f9d9e50b62094689773dccc5f9493fa15e30d592\n-- \n2.15.0.windows.1\n\n"},{"id":"332376","messageId":"xmqqzi7rat4a.fsf@gitster.mtv.corp.google.com","threadId":"47147","inReplyTo":"20171110210311.11036-1-benpeart@microsoft.com","subject":"Re: [PATCH v1] fsmonitor: simplify determining the git worktree under Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-11-13T01:02:13Z","receivedAt":"2017-11-13T01:02:23Z","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> I haven't tested the non Windows paths but the patch looks reasonable.\n\nI do not think the above line part of the proposed log message for\nthis patch ;-)  I guess I'll strip these earlier parts and leave\nonly the last paragraph while queuing.\n\n>\n> This inspired me to get someone more familiar with perl (thanks Johannes)\n> to revisit this code for the Windows side as well.  The logic for\n> determining the git worktree when running on Windows is more complex\n> than necessary.  It also spawns multiple processes (uname and cygpath)\n> which slows things down.\n>\n> Simplify and speed up the process of finding the git worktree when\n> running on Windows by keeping it in perl and avoiding spawning helper\n> processes.\n>\n> Signed-off-by: Ben Peart <benpeart@microsoft.com>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n\nThe patch looks reasonable ;-)  Thanks.\n\n> +if ($^O =~ 'msys' || $^O =~ 'cygwin') {\n> +\t$git_work_tree = Win32::GetCwd();\n> +\t$git_work_tree =~ tr/\\\\/\\//;\n>  } else {\n>  \trequire Cwd;\n>  \t$git_work_tree = Cwd::cwd();\n"},{"id":"332418","messageId":"9b6679ea-b7e4-b45a-32bb-448cd2e891df@gmail.com","threadId":"47147","inReplyTo":"4ff73be656d5bbf9e2cada6bdec61843da9d1516.1510257457.git.alexmv@dropbox.com","subject":"Re: [PATCH 2/2] fsmonitor: Store fsmonitor bitmap before splitting index","fromName":"Ben Peart","fromEmail":"peartben@gmail.com","sentAt":"2017-11-13T15:28:43Z","receivedAt":"2017-11-13T15:28:50Z","isPatch":true,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"\n\nOn 11/9/2017 2:58 PM, Alex Vandiver wrote:\n> ba1b9caca6 resolved the problem of the fsmonitor data being applied to\n> the non-base index when reading; however, a similar problem exists\n> when writing the index.  Specifically, writing of the fsmonitor\n> extension happens only after the work to split the index has been\n> applied -- as such, the information in the index is only for the\n> non-\"base\" index, and thus the extension information contains only\n> partial data.\n> \n> When saving, compute the ewah bitmap before the index is split, and\n> store it in the fsmonitor_dirty field, mirroring the behavior that\n> occurred during reading.  fsmonitor_dirty is kept from being leaked by\n> being freed when the extension data is written -- which always happens\n> precisely once, no matter the split index configuration.\n> \n> Signed-off-by: Alex Vandiver <alexmv@dropbox.com>\n> ---\n\nThe patch looks like a reasonable fix to make fsmonitor work correctly \nwith split index.  I also did manual testing to verify it was working as \nexpected.\n\nThanks for adding this additional test case to ensure we don't have any \nregressions with the interactions between fsmonitor and split-index. \nWhile the test does correctly fail before the patch and pass after the \npatch, I had a question about the test-dump-fsmonitor lines.\n\nWhy do you redirect stdout to stderr and then and perform an \"echo\" \nafterwards?  I don't understand what benefit that provides.  I removed \nthis logic and the test still passes so am confused as to what its \npurpose is.\n\n\n>   \n> +# test that splitting the index dosn't interfere\n> +test_expect_success 'splitting the index results in the same state' '\n> +\twrite_integration_script &&\n> +\tdirty_repo &&\n> +\tgit update-index --fsmonitor  &&\n> +\tgit ls-files -f >expect &&\n> +\ttest-dump-fsmonitor >&2 && echo &&\n> +\tgit update-index --fsmonitor --split-index &&\n> +\ttest-dump-fsmonitor >&2 && echo &&\n> +\tgit ls-files -f >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n>   test_done\n> \n"},{"id":"334911","messageId":"alpine.DEB.2.10.1712151800010.7105@alexmv-linux","threadId":"47147","inReplyTo":"9b6679ea-b7e4-b45a-32bb-448cd2e891df@gmail.com","subject":"Re: [PATCH 2/2] fsmonitor: Store fsmonitor bitmap before splitting index","fromName":"Alex Vandiver","fromEmail":"alexmv@dropbox.com","sentAt":"2017-12-16T02:02:21Z","receivedAt":"2017-12-16T02:02:41Z","isPatch":true,"sender":{"key":"alexmv@dropbox.com","avatar":null},"body":"On Mon, 13 Nov 2017, Ben Peart wrote:\n> Why do you redirect stdout to stderr and then and perform an \"echo\"\n> afterwards?  I don't understand what benefit that provides.  I removed this\n> logic and the test still passes so am confused as to what its purpose is.\n\nAh -- the \"echo\" was purely to clean up STDERR as I was running the\ntest interactively.  It serves no purpose, which is why it was hard\nto understand its benefit. :)\n\nApologies for missing this (and in not replying here earlier!).  I'll\nsend a commit that drops these.\n - Alex\n\n> > +# test that splitting the index dosn't interfere\n> > +test_expect_success 'splitting the index results in the same state' '\n> > +\twrite_integration_script &&\n> > +\tdirty_repo &&\n> > +\tgit update-index --fsmonitor  &&\n> > +\tgit ls-files -f >expect &&\n> > +\ttest-dump-fsmonitor >&2 && echo &&\n> > +\tgit update-index --fsmonitor --split-index &&\n> > +\ttest-dump-fsmonitor >&2 && echo &&\n> > +\tgit ls-files -f >actual &&\n> > +\ttest_cmp expect actual\n> > +'\n> > +\n> >   test_done\n"}]}