]> Pileus Git - ~andy/git/blobdiff - t/t5601-clone.sh
clone: create intermediate directories of destination repo
[~andy/git] / t / t5601-clone.sh
index 593d1a38772843f1afd67814dcf8920bea3366bc..b642fb260b37a7be2bcd37ea22ba2097e26f07a2 100755 (executable)
@@ -30,4 +30,26 @@ test_expect_success 'clone checks out files' '
 
 '
 
+test_expect_success 'clone respects GIT_WORK_TREE' '
+
+       GIT_WORK_TREE=worktree git clone src bare &&
+       test -f bare/config &&
+       test -f worktree/file
+
+'
+
+test_expect_success 'clone creates intermediate directories' '
+
+       git clone src long/path/to/dst &&
+       test -f long/path/to/dst/file
+
+'
+
+test_expect_success 'clone creates intermediate directories for bare repo' '
+
+       git clone --bare src long/path/to/bare/dst &&
+       test -f long/path/to/bare/dst/config
+
+'
+
 test_done