diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-31 12:08:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-31 12:08:52 -0700 |
commit | 2cd517cdd3f52bcfb5a87e6991560cc000b11089 (patch) | |
tree | 40ae945ca7f062da8abe6e5861fd44f78db422cf /t | |
parent | efd02e92c9961063bae63da7f7446868a38f14ce (diff) | |
parent | 3eafdc961fa6c44d40382be6a55b62b7e6edb248 (diff) | |
download | git-2cd517cdd3f52bcfb5a87e6991560cc000b11089.tar.gz |
Merge branch 'jk/maint-remote-mirror-safer'
* jk/maint-remote-mirror-safer:
remote: allow "-t" with fetch mirrors
Diffstat (limited to 't')
-rwxr-xr-x | t/t5505-remote.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 4e69c907d8..0d0222ea2a 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -347,6 +347,21 @@ test_expect_success 'fetch mirrors do not act as mirrors during push' ' ) ' +test_expect_success 'add fetch mirror with specific branches' ' + git init --bare mirror-fetch/track && + (cd mirror-fetch/track && + git remote add --mirror=fetch -t heads/new parent ../parent + ) +' + +test_expect_success 'fetch mirror respects specific branches' ' + (cd mirror-fetch/track && + git fetch parent && + git rev-parse --verify refs/heads/new && + test_must_fail git rev-parse --verify refs/heads/renamed + ) +' + test_expect_success 'add --mirror=push' ' mkdir mirror-push && git init --bare mirror-push/public && @@ -382,6 +397,13 @@ test_expect_success 'push mirrors do not act as mirrors during fetch' ' ) ' +test_expect_success 'push mirrors do not allow you to specify refs' ' + git init mirror-push/track && + (cd mirror-push/track && + test_must_fail git remote add --mirror=push -t new public ../public + ) +' + test_expect_success 'add alt && prune' ' (mkdir alttst && cd alttst && |