From: Johannes Sixt Date: Wed, 11 Mar 2009 20:17:26 +0000 (+0100) Subject: test-lib: Work around incompatible sort and find on Windows X-Git-Tag: v1.6.3-rc0~93^2~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f17e9fbbe919bc1f4ecaa35a9cb0869a5ec47fc0;p=git.git test-lib: Work around incompatible sort and find on Windows If the PATH lists the Windows system directories before the MSYS directories, Windows's own incompatible sort and find commands would be picked up. We implement these commands as functions and call the real tools by absolute path. Signed-off-by: Johannes Sixt --- diff --git a/t/test-lib.sh b/t/test-lib.sh index 638cca41e..4eda5aba4 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -635,3 +635,16 @@ do test_done esac done + +# Fix some commands on Windows +case $(uname -s) in +*MINGW*) + # Windows has its own (incompatible) sort and find + sort () { + /usr/bin/sort "$@" + } + find () { + /usr/bin/find "$@" + } + ;; +esac