test-lib: Work around incompatible sort and find on Windows
[gitweb.git] / t / test-lib.sh
index 638cca41e3bb08da342a5ed115a0d1f779f63fbb..4eda5aba4b48eb871e684ccd9cd1b6e42439f025 100644 (file)
@@ -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