From: Johannes Sixt Date: Sat, 21 Mar 2009 21:26:24 GMT Subject: [PATCH 01/16] test-lib: Work around incompatible sort and find on Windows Message-ID: In-Reply-To: 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 --- BTW, we have the same thing in git-sh-setup.sh t/test-lib.sh | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 638cca4..4eda5ab 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 -- 1.6.2.1.224.g2225f