summaryrefslogtreecommitdiff
path: root/t/t5560-http-backend-noserver.sh
AgeCommit message (Collapse)Author
2010-10-14Merge branch 'maint'Junio C Hamano
* maint: Better advice on using topic branches for kernel development Documentation: update implicit "--no-index" behavior in "git diff" Documentation: expand 'git diff' SEE ALSO section Documentation: diff can compare blobs Documentation: gitrevisions is in section 7 shell portability: no "export VAR=VAL" CodingGuidelines: reword parameter expansion section Documentation: update-index: -z applies also to --index-info Documentation: No argument of ALLOC_GROW should have side-effects
2010-10-13shell portability: no "export VAR=VAL"Junio C Hamano
It is more portable to say "VAR=VAL && export VAR" instead. Noticed by Ævar. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-03Side-step MSYS-specific path "corruption" leading to t5560 failure.Eric Sunshine
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>
2010-10-01Do not strip CR when grepping HTTP headers.Pat Thoyts
By default, MSYS grep reads in text-mode and converts CRLF into LF line endings. For testing HTTP use binary mode (-U) as checking is done for CR in HTTP headers Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-01-16Test t5560: Fix test when run with dashTarmigan Casebolt
A command invocation preceded by variable assignments, i.e. VAR1=VAL1 VAR2=VAL2 ... command args are implemented by dash and ksh in such a way not to export these variables, and keep the values after the command finishes, when the command is a shell function. POSIX.1 "2.9.5 Function Definition Command" specifies this behaviour. Many shells however treat this construct the same way as they are calling external commands. They export the variables during the duration of command, and resets their values after command returns. The test relied on the behaviour of the latter kind. Reported-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06Smart-http tests: Test http-backend without curl or a webserverTarmigan Casebolt
This reuses many of the tests from the old t5560 but runs those tests without curl or a webserver. This will hopefully increase the testing coverage for http-backend because it does not require users to set GIT_TEST_HTTPD. Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06Smart-http tests: Break test t5560-http-backend into piecesTarmigan Casebolt
This should introduce no functional change in the tests or the amount of test coverage. Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>