summaryrefslogtreecommitdiff
path: root/t/t1504-ceiling-dirs.sh
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2009-02-07 15:08:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-02-07 20:23:29 (GMT)
commit43a7ddb55d82d5c6f0c4d2cbe408a1df71d58ef3 (patch)
tree59fd700614e85f9f4f9054d946a92c4de5c89f0b /t/t1504-ceiling-dirs.sh
parentf3cad0ad82e24966bf7bcc8a47670c54c30e4b18 (diff)
downloadgit-43a7ddb55d82d5c6f0c4d2cbe408a1df71d58ef3.zip
git-43a7ddb55d82d5c6f0c4d2cbe408a1df71d58ef3.tar.gz
git-43a7ddb55d82d5c6f0c4d2cbe408a1df71d58ef3.tar.bz2
Fix GIT_CEILING_DIRECTORIES on Windows
Using git with GIT_CEILING_DIRECTORIES crashed on Windows due to a failed assertion in normalize_absolute_path(): This function expects absolute paths to start with a slash, while on Windows they can start with a drive letter or a backslash. This fixes it by using the alternative, normalize_path_copy() instead, which can handle Windows-style paths just fine. Secondly, the portability macro PATH_SEP is used instead of expecting colons to be used as path list delimiter. The test script t1504 is also changed to help MSYS's bash recognize some program arguments as path list. (MSYS's bash must translate POSIX-style path lists to Windows-style path lists, and the heuristic did not catch some cases.) Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1504-ceiling-dirs.sh')
-rwxr-xr-xt/t1504-ceiling-dirs.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t1504-ceiling-dirs.sh b/t/t1504-ceiling-dirs.sh
index 91b704a..e377d48 100755
--- a/t/t1504-ceiling-dirs.sh
+++ b/t/t1504-ceiling-dirs.sh
@@ -93,13 +93,13 @@ GIT_CEILING_DIRECTORIES="$TRASH_ROOT/subdi"
test_prefix subdir_ceil_at_subdi_slash "sub/dir/"
-GIT_CEILING_DIRECTORIES="foo:$TRASH_ROOT/sub"
+GIT_CEILING_DIRECTORIES="/foo:$TRASH_ROOT/sub"
test_fail second_of_two
-GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub:bar"
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub:/bar"
test_fail first_of_two
-GIT_CEILING_DIRECTORIES="foo:$TRASH_ROOT/sub:bar"
+GIT_CEILING_DIRECTORIES="/foo:$TRASH_ROOT/sub:/bar"
test_fail second_of_three