fsmonitor: MINGW support for watchman integration
authorBen Peart <benpeart@microsoft.com>
Wed, 4 Oct 2017 02:09:50 +0000 (11:09 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Oct 2017 02:10:24 +0000 (11:10 +0900)
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>
t/t7519/fsmonitor-watchman
templates/hooks--fsmonitor-watchman.sample
index 7ceb32dc181b644d705c59f23c8708d51bc965f4..cca3d71e9073a655350e2522eb6075c0c46216ea 100755 (executable)
@@ -36,7 +36,7 @@ my $system = `uname -s`;
 $system =~ s/[\r\n]+//g;
 my $git_work_tree;
 
-if ($system =~ m/^MSYS_NT/) {
+if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {
        $git_work_tree = `cygpath -aw "\$PWD"`;
        $git_work_tree =~ s/[\r\n]+//g;
        $git_work_tree =~ s,\\,/,g;
index 870a59d23791cbd51cc66ea49aca6e3d6b2e25ce..c68038ef0045f55bb5675f899d59b94f335d1284 100755 (executable)
@@ -35,7 +35,7 @@ my $system = `uname -s`;
 $system =~ s/[\r\n]+//g;
 my $git_work_tree;
 
-if ($system =~ m/^MSYS_NT/) {
+if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {
        $git_work_tree = `cygpath -aw "\$PWD"`;
        $git_work_tree =~ s/[\r\n]+//g;
        $git_work_tree =~ s,\\,/,g;