X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5601-clone.sh;h=5a068b21e4aeac79863df657d6388ec4c2732d55;hb=bc67ad8c375ce8f31021411f088a968f12cb2675;hp=8abb71afcd4d7389260baa6f82ecb9b53bb9524c;hpb=7a876edf5d5224e0755cfabb808b042f300e293d;p=git.git diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 8abb71afc..5a068b21e 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -31,7 +31,7 @@ test_expect_success 'clone with excess parameters (2)' ' ' -test_expect_success 'output from clone' ' +test_expect_success C_LOCALE_OUTPUT 'output from clone' ' rm -fr dst && git clone -n "file://$(pwd)/src" dst >output && test $(grep Clon output | wc -l) = 1 @@ -163,10 +163,7 @@ test_expect_success 'clone a void' ' test_expect_success 'clone respects global branch.autosetuprebase' ' ( - HOME=$(pwd) && - export HOME && test_config="$HOME/.gitconfig" && - unset GIT_CONFIG_NOGLOBAL && git config -f "$test_config" branch.autosetuprebase remote && rm -fr dst && git clone src dst && @@ -178,8 +175,14 @@ test_expect_success 'clone respects global branch.autosetuprebase' ' test_expect_success 'respect url-encoding of file://' ' git init x+y && - test_must_fail git clone "file://$PWD/x+y" xy-url && - git clone "file://$PWD/x%2By" xy-url + git clone "file://$PWD/x+y" xy-url-1 && + git clone "file://$PWD/x%2By" xy-url-2 +' + +test_expect_success 'do not query-string-decode + in URLs' ' + rm -rf x+y && + git init "x y" && + test_must_fail git clone "file://$PWD/x+y" xy-no-plus ' test_expect_success 'do not respect url-encoding of non-url path' ' @@ -188,4 +191,17 @@ test_expect_success 'do not respect url-encoding of non-url path' ' git clone x+y xy-regular ' +test_expect_success 'clone separate gitdir' ' + rm -rf dst && + git clone --separate-git-dir realgitdir src dst && + echo "gitdir: `pwd`/realgitdir" >expected && + test_cmp expected dst/.git && + test -d realgitdir/refs +' + +test_expect_success 'clone separate gitdir where target already exists' ' + rm -rf dst && + test_must_fail git clone --separate-git-dir realgitdir src dst +' + test_done