diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-05 19:15:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-05 19:15:39 -0700 |
commit | dc484f2213a34ced5abe5eb968650035204b6035 (patch) | |
tree | 1e1d0d7563cc91bd52ffcb895b9f21a0ed2607c8 /t/t5517-push-mirror.sh | |
parent | post-merge: Add it's not executed if merge failed. (diff) | |
parent | Add a remote.*.mirror configuration option (diff) | |
download | tgif-dc484f2213a34ced5abe5eb968650035204b6035.tar.xz |
Merge branch 'pb/remote-mirror-config'
* pb/remote-mirror-config:
Add a remote.*.mirror configuration option
Diffstat (limited to 't/t5517-push-mirror.sh')
-rwxr-xr-x | t/t5517-push-mirror.sh | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh index ed3fec192a..ea49dedbf8 100755 --- a/t/t5517-push-mirror.sh +++ b/t/t5517-push-mirror.sh @@ -25,7 +25,7 @@ mk_repo_pair () { ( cd master && git init && - git config remote.up.url ../mirror + git remote add $1 up ../mirror ) } @@ -225,4 +225,43 @@ test_expect_success 'push mirror adds, updates and removes tags together' ' ' +test_expect_success 'remote.foo.mirror adds and removes branches' ' + + mk_repo_pair --mirror && + ( + cd master && + echo one >foo && git add foo && git commit -m one && + git branch keep master && + git branch remove master && + git push up && + git branch -D remove + git push up + ) && + ( + cd mirror && + git show-ref -s --verify refs/heads/keep && + invert git show-ref -s --verify refs/heads/remove + ) + +' + +test_expect_success 'remote.foo.mirror=no has no effect' ' + + mk_repo_pair && + ( + cd master && + echo one >foo && git add foo && git commit -m one && + git config --add remote.up.mirror no && + git branch keep master && + git push --mirror up && + git branch -D keep && + git push up + ) && + ( + cd mirror && + git show-ref -s --verify refs/heads/keep + ) + +' + test_done |