diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-06-21 14:41:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-21 14:41:53 -0700 |
commit | 486fcbc458ecb1ee906dcb67a8a7bfe933614111 (patch) | |
tree | 82f3cc51ee866448684b81ecebfb82603533bc36 /t | |
parent | Merge branch 'jc/bundle-complete-notice' (diff) | |
parent | clone: allow --no-local to turn off local optimizations (diff) | |
download | tgif-486fcbc458ecb1ee906dcb67a8a7bfe933614111.tar.xz |
Merge branch 'jk/clone-local'
"git clone --local $path" started its life as an experiment to
optionally use link/copy when cloning a repository on the disk, but
we didn't deprecate it after we made the option a no-op to always
use the optimization.
The command learns "--no-local" option to turn this off, as a more
explicit alternative over use of file:// URL.
* jk/clone-local:
clone: allow --no-local to turn off local optimizations
docs/clone: mention that --local may be ignored
Diffstat (limited to 't')
-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 |