MSYS: local clone must use the drive letter in absolute paths.

The default of pwd of MSYS's bash and /bin/pwd are to use /c/rest/of/path
notation instead of c:/rest/of/path. But the former is not supported
by programs that use the standard C runtime (instead of MSYS's
runtime). Hence, we must make sure that only drive letter notations
are generated by using pwd's -W option.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
Johannes Sixt
2007-05-24 10:54:08 +02:00
parent b852ad8252
commit 5877600179

View File

@@ -66,6 +66,19 @@ case $(uname -s) in
xargs --no-run-if-empty \
cp $cp_arg --target-directory="$2" --parents
}
# pwd must return a path with a drive letter
bin_pwd() {
# there are no symlinks to resolve: /bin/pwd is not needed
builtin pwd -W
}
pwd() {
builtin pwd -W
}
;;
*)
bin_pwd() {
/bin/pwd
}
;;
esac
@@ -77,11 +90,11 @@ eval "$(echo "$OPTIONS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)
get_repo_base() {
(
cd "`/bin/pwd -W`" &&
cd "$(bin_pwd)" &&
cd "$1" || cd "$1.git" &&
{
cd .git
pwd -W
pwd
}
) 2>/dev/null
}