summaryrefslogtreecommitdiff
path: root/test-path-utils.c
diff options
context:
space:
mode:
authorRay Donnelly <mingw.android@gmail.com>2015-10-01 20:04:17 +0100
committerJunio C Hamano <gitster@pobox.com>2015-10-08 18:03:50 -0700
commitb2a7123b997f950e9785a5e7df64c3104270fef3 (patch)
treee6536372e9574e61c1d56d12263b6812389bf08d /test-path-utils.c
parent22f698cb188243b313e024d618283e0293e37140 (diff)
downloadgit-b2a7123b997f950e9785a5e7df64c3104270fef3.tar.gz
test-path-utils.c: remove incorrect assumptionrd/test-path-utils
In normalize_ceiling_entry(), we test that normalized paths end with slash, *unless* the path to be normalized was already the root directory. However, normalize_path_copy() does not even enforce this condition. Even worse: on Windows, the root directory gets translated into a Windows directory by the Bash before being passed to `git.exe` (or `test-path-utils.exe`), which means that we cannot even know whether the path that was passed to us was the root directory to begin with. This issue has already caused endless hours of trying to "fix" the MSYS2 runtime, only to break other things due to MSYS2 ensuring that the converted path maintains the same state as the input path with respect to any final '/'. So let's just forget about this test. It is non-essential to Git's operation, anyway. Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Diffstat (limited to 'test-path-utils.c')
-rw-r--r--test-path-utils.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/test-path-utils.c b/test-path-utils.c
index 3dd3744a57..c67bf65b34 100644
--- a/test-path-utils.c
+++ b/test-path-utils.c
@@ -21,8 +21,6 @@ static int normalize_ceiling_entry(struct string_list_item *item, void *unused)
if (normalize_path_copy(buf, ceil) < 0)
die("Path \"%s\" could not be normalized", ceil);
len = strlen(buf);
- if (len > 1 && buf[len-1] == '/')
- die("Normalized path \"%s\" ended with slash", buf);
free(item->string);
item->string = xstrdup(buf);
return 1;