diff options
author | Jeff King <peff@peff.net> | 2012-05-30 07:10:16 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-30 09:51:22 -0700 |
commit | 189260b190be845f0e24ede93f9ac539627d72fa (patch) | |
tree | 56ff9209ef823fcc0e2a11eda79c5dbb09c2802b /t/t5701-clone-local.sh | |
parent | 9197a10c7188a74356384a7ce46e05104ac68240 (diff) | |
download | git-189260b190be845f0e24ede93f9ac539627d72fa.tar.gz |
clone: allow --no-local to turn off local optimizations
This is basically the same as using "file://", but is a
little less subtle for the end user. It also allows relative
paths to be specified.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5701-clone-local.sh')
-rwxr-xr-x | t/t5701-clone-local.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh index c6feca44e3..7ff6e0e16c 100755 --- a/t/t5701-clone-local.sh +++ b/t/t5701-clone-local.sh @@ -124,4 +124,14 @@ 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_done |