Skip to content

Commit dcdb71f

Browse files
benpeartgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 14527b3 commit dcdb71f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/t7519/fsmonitor-watchman

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ my $system = `uname -s`;
3636
$system =~ s/[\r\n]+//g;
3737
my $git_work_tree;
3838

39-
if ($system =~ m/^MSYS_NT/) {
39+
if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {
4040
$git_work_tree = `cygpath -aw "\$PWD"`;
4141
$git_work_tree =~ s/[\r\n]+//g;
4242
$git_work_tree =~ s,\\,/,g;

templates/hooks--fsmonitor-watchman.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ my $system = `uname -s`;
3535
$system =~ s/[\r\n]+//g;
3636
my $git_work_tree;
3737

38-
if ($system =~ m/^MSYS_NT/) {
38+
if ($system =~ m/^MSYS_NT/ || $system =~ m/^MINGW/) {
3939
$git_work_tree = `cygpath -aw "\$PWD"`;
4040
$git_work_tree =~ s/[\r\n]+//g;
4141
$git_work_tree =~ s,\\,/,g;

0 commit comments

Comments
 (0)