Skip to content

Commit

Permalink
fsmonitor: MINGW support for watchman integration
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
benpeart authored and gitster committed Oct 4, 2017
1 parent 14527b3 commit dcdb71f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t/t7519/fsmonitor-watchman
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion templates/hooks--fsmonitor-watchman.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dcdb71f

Please sign in to comment.