summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBen Peart <benpeart@microsoft.com>2017-10-04 02:09:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-04 02:10:24 (GMT)
commitdcdb71f1599734ae46870d3eca11e2093bbd7520 (patch)
tree928ebff2c60f2dbf2f5eb99f03df8cbe86da099e /templates
parent14527b30022190c6e7e8cd7f7dbef4195ebeedc2 (diff)
downloadgit-dcdb71f1599734ae46870d3eca11e2093bbd7520.zip
git-dcdb71f1599734ae46870d3eca11e2093bbd7520.tar.gz
git-dcdb71f1599734ae46870d3eca11e2093bbd7520.tar.bz2
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>
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/hooks--fsmonitor-watchman.sample2
1 files changed, 1 insertions, 1 deletions
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;