From dcdb71f1599734ae46870d3eca11e2093bbd7520 Mon Sep 17 00:00:00 2001 From: Ben Peart Date: Wed, 4 Oct 2017 11:09:50 +0900 Subject: 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 Signed-off-by: Junio C Hamano diff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman index 7ceb32d..cca3d71 100755 --- a/t/t7519/fsmonitor-watchman +++ b/t/t7519/fsmonitor-watchman @@ -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; diff --git a/templates/hooks--fsmonitor-watchman.sample b/templates/hooks--fsmonitor-watchman.sample index 870a59d..c68038ef0 100755 --- a/templates/hooks--fsmonitor-watchman.sample +++ b/templates/hooks--fsmonitor-watchman.sample @@ -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; -- cgit v0.10.2-6-g49f6