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>
This commit is contained in:
Ben Peart 2017-10-04 11:09:50 +09:00 committed by Junio C Hamano
parent 14527b3002
commit dcdb71f159
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;