mirror of
https://github.com/git/git.git
synced 2026-03-14 02:43:25 +01:00
Work around incompatible sort and find on windows.
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. Also add a dummy implementation of sync to avoid an error in git-repack. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
10
git-clone.sh
10
git-clone.sh
@@ -13,6 +13,16 @@ die() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Fix some commands on Windows
|
||||
case $(uname -s) in
|
||||
*MINGW*)
|
||||
# Windows has its own (incompatible) find
|
||||
find () {
|
||||
/usr/bin/find "$@"
|
||||
}
|
||||
;;
|
||||
esac
|
||||
|
||||
usage() {
|
||||
die "Usage: $0 [--template=<template_directory>] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [--depth <n>] [-n] <repo> [<dir>]"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user