diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2010-07-20 19:29:16 -0400 |
---|---|---|
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | 2010-10-03 23:31:13 +0100 |
commit | 36e035f5dcd214039d5ea96c29de110ae7435137 (patch) | |
tree | a5f8fc284f0ab2ccdbf3854a53ca4a73cdad8c80 /t | |
parent | ca02ad3447efdbd4cb2aa9ba0ee3fc6124035274 (diff) | |
download | git-36e035f5dcd214039d5ea96c29de110ae7435137.tar.gz git-36e035f5dcd214039d5ea96c29de110ae7435137.tar.xz |
Side-step MSYS-specific path "corruption" leading to t5560 failure.
Upon program invocation, MSYS converts environment variables containing
path-like values from Unix-style to DOS-style under the assumption that
the program being invoked understands only DOS-style pathnames. For
instance, the Unix-style path /msysgit is translated to c:/msysgit. For
test t5560, the path being requested from git-http-backend is specified
via environment variable PATH_INFO as a URL path of the form
/repo.git/foobar, which git-http-backend combines with GIT_PROJECT_ROOT
to determine the actual physical path within the repository. This is a
case where MSYS's conversion of the path-like value of PATH_INFO causes
harm, for two reasons. First, the resulting converted path, when joined
with GIT_PROJECT_ROOT is bogus (for instance,
"C:/msysgit/git/t/trash-zzz/C:/msysgit/repo.git/HEAD"). Second, the
converted PATH_INFO path is rejected by git-http-backend as an 'alias'
due to validation failure on the part of daemon_avoid_alias().
Unfortunately, the standard work-around of doubling the leading slash
(i.e. //repo.git/foobar) to suppress MSYS path conversion works only for
command-line arguments, but not for environment variables.
Consequently, side step the problem by instead passing git-http-backend
an already-constructed full path rather than components GIT_PROJECT_ROOT
and PATH_INFO.
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5560-http-backend-noserver.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh index 4b0364374..406432e7a 100755 --- a/t/t5560-http-backend-noserver.sh +++ b/t/t5560-http-backend-noserver.sh @@ -10,8 +10,7 @@ test_have_prereq MINGW && export GREP_OPTIONS=-U run_backend() { echo "$2" | QUERY_STRING="${1#*\?}" \ - GIT_PROJECT_ROOT="$HTTPD_DOCUMENT_ROOT_PATH" \ - PATH_INFO="${1%%\?*}" \ + PATH_TRANSLATED="$HTTPD_DOCUMENT_ROOT_PATH/${1%%\?*}" \ git http-backend >act.out 2>act.err } |