git-svn: support for git-svn propset
[gitweb.git] / t / t5701-clone-local.sh
index c6feca44e3677c416bfe4841fda5205b2133f7bc..3c087e907c4fbe6d8a05854f1d1051a9f9afec7c 100755 (executable)
@@ -12,8 +12,8 @@ test_expect_success 'preparing origin repository' '
        : >file && git add . && git commit -m1 &&
        git clone --bare . a.git &&
        git clone --bare . x &&
-       test "$(GIT_CONFIG=a.git/config git config --bool core.bare)" = true &&
-       test "$(GIT_CONFIG=x/config git config --bool core.bare)" = true &&
+       test "$(cd a.git && git config --bool core.bare)" = true &&
+       test "$(cd x && git config --bool core.bare)" = true &&
        git bundle create b1.bundle --all &&
        git bundle create b2.bundle master &&
        mkdir dir &&
@@ -24,7 +24,7 @@ test_expect_success 'preparing origin repository' '
 test_expect_success 'local clone without .git suffix' '
        git clone -l -s a b &&
        (cd b &&
-       test "$(GIT_CONFIG=.git/config git config --bool core.bare)" = false &&
+       test "$(git config --bool core.bare)" = false &&
        git fetch)
 '
 
@@ -124,4 +124,18 @@ test_expect_success 'cloning non-git directory fails' '
        test_must_fail git clone not-a-git-repo not-a-git-repo-clone
 '
 
+test_expect_success 'cloning file:// does not hardlink' '
+       git clone --bare file://"$(pwd)"/a non-local &&
+       ! repo_is_hardlinked non-local
+'
+
+test_expect_success 'cloning a local path with --no-local does not hardlink' '
+       git clone --bare --no-local a force-nonlocal &&
+       ! repo_is_hardlinked force-nonlocal
+'
+
+test_expect_success 'cloning locally respects "-u" for fetching refs' '
+       test_must_fail git clone --bare -u false a should_not_work.git
+'
+
 test_done