Skip to content

Commit 2ac3b25

Browse files
committed
t2031: verify that git init can create a long path
This currently fails, with: ++ p=/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef ++ p=y/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef ++ test_config_global core.longpaths true ++ test_when_finished 'test_unconfig --global '\''core.longpaths'\''' ++ test 0 = 0 ++ test_cleanup='{ test_unconfig --global '\''core.longpaths'\'' } && (exit "$eval_ret"); eval_ret=$?; :' ++ git config --global core.longpaths true ++ git init y/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef fatal: cannot chdir to y/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef: No such file or directory error: last command exited with $?=128 not ok 7 - init with long path Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 7a3a4c7 commit 2ac3b25

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/t2031-checkout-long-paths.sh

+7
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,11 @@ test_expect_success SHORTABSPATH 'clean up path close to MAX_PATH' '
9999
test ! -d "$subdir1"
100100
'
101101

102+
test_expect_success 'init with long path' '
103+
p=/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef &&
104+
p=y$p$p$p$p &&
105+
test_config_global core.longpaths true &&
106+
git init $p
107+
'
108+
102109
test_done

0 commit comments

Comments
 (0)