aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-05 19:15:39 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-05 19:15:39 -0700
commitdc484f2213a34ced5abe5eb968650035204b6035 (patch)
tree1e1d0d7563cc91bd52ffcb895b9f21a0ed2607c8 /t
parent2b3e60c245684fd68bab36c07fee9888ff24f4b4 (diff)
parent84bb2dfd9f4873c9ca19537efe62219b09ec03bf (diff)
downloadgit-dc484f2213a34ced5abe5eb968650035204b6035.tar.gz
git-dc484f2213a34ced5abe5eb968650035204b6035.tar.xz
Merge branch 'pb/remote-mirror-config'
* pb/remote-mirror-config: Add a remote.*.mirror configuration option
Diffstat (limited to 't')
-rwxr-xr-xt/t5517-push-mirror.sh41
1 files changed, 40 insertions, 1 deletions
diff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh
index ed3fec192..ea49dedbf 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