From: Johannes Sixt Date: Fri, 30 Nov 2007 21:06:30 +0000 (+0100) Subject: Windows: Work around incompatible sort and find. X-Git-Tag: v1.6.0-rc0~159^2~15 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/87bddba9924045e39e988d9704714db90abd5619 Windows: Work around incompatible sort and find. 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/git-sh-setup.sh b/git-sh-setup.sh index a44b1c74a3..9cceb21a82 100755 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -142,3 +142,16 @@ then } : ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"} fi + +# 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