path: root/t/perf/
diff options
authorRené Scharfe <>2017-12-16 12:12:23 (GMT)
committerJunio C Hamano <>2017-12-18 22:00:45 (GMT)
commitb4f61b7fa455b6bea2a12d46c59d8685f761018b (patch)
tree88d0fc6c6a352669808c4b75b4656c0f8d4f5d89 /t/perf/
parent614a718a797e04fb037b25371896f910e464b671 (diff)
p7519: improve check for prerequisite WATCHMAN
The return code of command -v with a non-existing command is 1 in bash and 127 in dash. Use that return code directly to allow the script to work with dash and without watchman (e.g. on Debian). While at it stop redirecting the output. stderr is redirected to /dev/null by test_lazy_prereq already, and stdout can actually be useful -- the path of the found watchman executable is sent there, but it's shown only if the script was run with --verbose. Signed-off-by: Rene Scharfe <> Acked-by: Ben Peart <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/perf/')
1 files changed, 1 insertions, 2 deletions
diff --git a/t/perf/ b/t/perf/
index 16d1bf7..65e145c 100755
--- a/t/perf/
+++ b/t/perf/
@@ -40,8 +40,7 @@ test_lazy_prereq UNTRACKED_CACHE '
test_lazy_prereq WATCHMAN '
- { command -v watchman >/dev/null 2>&1; ret=$?; } &&
- test $ret -ne 1
+ command -v watchman
if test_have_prereq WATCHMAN