fsmonitor: MINGW support for watchman integration

Instead of just taking $ENV{'PWD'}, use the same logic that converts PWD to $git_work_tree on MSYS_NT in the watchman integration hook script also on MINGW. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ben Peart committed Oct 4, 2017 at 11:09 UTC dcdb71f1599734ae46870d3eca11e2093bbd7520
2 files changed +2 -2
t/t7519/fsmonitor-watchman
+1 -1
@@ -36,7 +36,7 @@ my $system = `uname -s`;
36 $system =~ s/[\r\n]+//g;
37 my $git_work_tree;
38
39 -if ($system =~ m/^MSYS_NT/) {
39 +if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {
40 $git_work_tree = `cygpath -aw "\$PWD"`;
41 $git_work_tree =~ s/[\r\n]+//g;
42 $git_work_tree =~ s,\\,/,g;
templates/hooks--fsmonitor-watchman.sample
+1 -1
@@ -35,7 +35,7 @@ my $system = `uname -s`;
35 $system =~ s/[\r\n]+//g;
36 my $git_work_tree;
37
38 -if ($system =~ m/^MSYS_NT/) {
38 +if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {
39 $git_work_tree = `cygpath -aw "\$PWD"`;
40 $git_work_tree =~ s/[\r\n]+//g;
41 $git_work_tree =~ s,\\,/,g;