Skip to content

Commit

Permalink
Windows: Work around incompatible sort and find.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Sixt committed Jun 26, 2008
1 parent 618ebe9 commit 87bddba
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions git-sh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 87bddba

Please sign in to comment.