Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-30 15:10:16 +0400
committerJunio C Hamano <gitster@pobox.com>2012-05-30 20:51:22 +0400
commit189260b190be845f0e24ede93f9ac539627d72fa (patch)
tree56ff9209ef823fcc0e2a11eda79c5dbb09c2802b /t/t5701-clone-local.sh
parent9197a10c7188a74356384a7ce46e05104ac68240 (diff)
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-xt/t5701-clone-local.sh10
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