X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5505-remote.sh;h=0d0222ea2ace733ffe3fbfbdee58520abcd40e92;hb=9901923cf0994582592a34128a466c58735621fd;hp=4e69c907d810c5a82892f94f05374b824a003771;hpb=d6ad4ff1202bd79f6470e8699bbd16d6ceb6ae98;p=git.git diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 4e69c907d..0d0222ea2 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 &&