summaryrefslogtreecommitdiff
path: root/git-sh-setup.sh
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-11-30 22:06:30 +0100
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-26 08:45:09 +0200
commit87bddba9924045e39e988d9704714db90abd5619 (patch)
tree7c60c7d2dda31c3e495cb8aa271d57deeb1113f4 /git-sh-setup.sh
parent618ebe9ff997d27714487c4a4232720be240badc (diff)
downloadgit-87bddba9924045e39e988d9704714db90abd5619.tar.gz
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>
Diffstat (limited to 'git-sh-setup.sh')
-rwxr-xr-xgit-sh-setup.sh13
1 files changed, 13 insertions, 0 deletions
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