diff options
Diffstat (limited to 't/t5605-clone-local.sh')
| -rwxr-xr-x | t/t5605-clone-local.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh index a3055869bc..31f6249ac9 100755 --- a/t/t5605-clone-local.sh +++ b/t/t5605-clone-local.sh @@ -153,6 +153,16 @@ test_expect_success 'cloning a local path with --no-local does not hardlink' ' ! repo_is_hardlinked force-nonlocal ' +test_expect_success 'cloning a local path with --no-local from a different user succeeds' ' + git clone --upload-pack="GIT_TEST_ASSUME_DIFFERENT_OWNER=true git-upload-pack" \ + --no-local a nonlocal-otheruser 2>err && + ! repo_is_hardlinked nonlocal-otheruser && + # Verify that this is a git repository. + git -C nonlocal-otheruser rev-parse --show-toplevel && + ! test_grep "detected dubious ownership" err + +' + test_expect_success 'cloning locally respects "-u" for fetching refs' ' test_must_fail git clone --bare -u false a should_not_work.git ' |
