Merge branch 'pw/rebase-i-regression-fix'
[gitweb.git] / t / t0001-init.sh
index e424de5363848233d2c1d9807df0a01411fd0d6d..c4814d248fc96e7dc0177b6987baa18853c6213c 100755 (executable)
@@ -315,6 +315,20 @@ test_expect_success 'init with separate gitdir' '
        test_path_is_dir realgitdir/refs
 '
 
+test_expect_success 'init in long base path' '
+       # exceed initial buffer size of strbuf_getcwd()
+       component=123456789abcdef &&
+       test_when_finished "chmod 0700 $component; rm -rf $component" &&
+       p31=$component/$component &&
+       p127=$p31/$p31/$p31/$p31 &&
+       mkdir -p $p127 &&
+       chmod 0111 $component &&
+       (
+               cd $p127 &&
+               git init newdir
+       )
+'
+
 test_expect_success 're-init on .git file' '
        ( cd newdir && git init )
 '