summaryrefslogtreecommitdiff
path: root/t/t7519
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-11-21 14:07:51 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-11-21 14:07:51 +0900
commitc9fdbca92c66b93f95a19bf1f38ab9088db78540 (patch)
treeb0aaedc6f6c92d0de8a8fe49a19f8522653bcd96 /t/t7519
parentMerge branch 'bp/fsmonitor' (diff)
parentfsmonitor: simplify determining the git worktree under Windows (diff)
downloadtgif-c9fdbca92c66b93f95a19bf1f38ab9088db78540.tar.xz
Merge branch 'av/fsmonitor'
Various fixes to bp/fsmonitor topic. * av/fsmonitor: fsmonitor: simplify determining the git worktree under Windows fsmonitor: store fsmonitor bitmap before splitting index fsmonitor: read from getcwd(), not the PWD environment variable fsmonitor: delay updating state until after split index is merged fsmonitor: document GIT_TRACE_FSMONITOR fsmonitor: don't bother pretty-printing JSON from watchman fsmonitor: set the PWD to the top of the working tree
Diffstat (limited to 't/t7519')
-rwxr-xr-xt/t7519/fsmonitor-watchman16
1 files changed, 5 insertions, 11 deletions
diff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman
index a3e30bf54f..5514edcf68 100755
--- a/t/t7519/fsmonitor-watchman
+++ b/t/t7519/fsmonitor-watchman
@@ -29,19 +29,13 @@ if ($version == 1) {
"Falling back to scanning...\n";
}
-# Convert unix style paths to escaped Windows style paths when running
-# in Windows command prompt
-
-my $system = `uname -s`;
-$system =~ s/[\r\n]+//g;
my $git_work_tree;
-
-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;
+if ($^O =~ 'msys' || $^O =~ 'cygwin') {
+ $git_work_tree = Win32::GetCwd();
+ $git_work_tree =~ tr/\\/\//;
} else {
- $git_work_tree = $ENV{'PWD'};
+ require Cwd;
+ $git_work_tree = Cwd::cwd();
}
my $retry = 1;