diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-21 14:07:51 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-21 14:07:51 +0900 |
commit | c9fdbca92c66b93f95a19bf1f38ab9088db78540 (patch) | |
tree | b0aaedc6f6c92d0de8a8fe49a19f8522653bcd96 /t/t7519 | |
parent | Merge branch 'bp/fsmonitor' (diff) | |
parent | fsmonitor: simplify determining the git worktree under Windows (diff) | |
download | tgif-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-x | t/t7519/fsmonitor-watchman | 16 |
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; |