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 <johannes.sixt@telecom.at>
Johannes Sixt committed
Nov 30, 2007 at 22:06 UTC
87bddba9924045e39e988d9704714db90abd5619
1 file changed
+13
git-sh-setup.sh
+13
@@ -142,3 +142,16 @@ then
142
}
143
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
144
fi
145
+
146
+# Fix some commands on Windows
147
+case $(uname -s) in
148
+*MINGW*)
149
+ # Windows has its own (incompatible) sort and find
150
+ sort () {
151
+ /usr/bin/sort "$@"
152
+ }
153
+ find () {
154
+ /usr/bin/find "$@"
155
+ }
156
+ ;;
157
+esac