]> Kevux Git Server - rit/commitdiff
Windows: Work around incompatible sort and find.
authorJohannes Sixt <johannes.sixt@telecom.at>
Fri, 30 Nov 2007 21:06:30 +0000 (22:06 +0100)
committerJohannes Sixt <johannes.sixt@telecom.at>
Thu, 26 Jun 2008 06:45:09 +0000 (08:45 +0200)
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 <johannes.sixt@telecom.at>
git-sh-setup.sh

index a44b1c7..9cceb21 100755 (executable)
@@ -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