aboutsummaryrefslogtreecommitdiff
path: root/t/t5516-fetch-push.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-26 23:05:45 -0800
committerJunio C Hamano <gitster@pobox.com>2012-02-26 23:05:45 -0800
commitd365a432271d2f6384cda9c37fb2fe463bdc2850 (patch)
tree56fa405031b5951038d2d0189f4ac84b3801b0cb /t/t5516-fetch-push.sh
parent5419127d0475a78983696544ca5e672e8ea4075d (diff)
parent6ddba5e241ebe484d53e3573c72386f487e25697 (diff)
downloadgit-d365a432271d2f6384cda9c37fb2fe463bdc2850.tar.gz
git-d365a432271d2f6384cda9c37fb2fe463bdc2850.tar.xz
Merge branch 'fc/push-prune'
* fc/push-prune: push: add '--prune' option remote: refactor code into alloc_delete_ref() remote: reorganize check_pattern_match() remote: use a local variable in match_push_refs() Conflicts: builtin/push.c
Diffstat (limited to 't/t5516-fetch-push.sh')
-rwxr-xr-xt/t5516-fetch-push.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index b69cf574d..b5417cc95 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -979,4 +979,20 @@ test_expect_success 'push --porcelain --dry-run rejected' '
test_cmp .git/foo .git/bar
'
+test_expect_success 'push --prune' '
+ mk_test heads/master heads/second heads/foo heads/bar &&
+ git push --prune testrepo &&
+ check_push_result $the_commit heads/master &&
+ check_push_result $the_first_commit heads/second &&
+ ! check_push_result $the_first_commit heads/foo heads/bar
+'
+
+test_expect_success 'push --prune refspec' '
+ mk_test tmp/master tmp/second tmp/foo tmp/bar &&
+ git push --prune testrepo "refs/heads/*:refs/tmp/*" &&
+ check_push_result $the_commit tmp/master &&
+ check_push_result $the_first_commit tmp/second &&
+ ! check_push_result $the_first_commit tmp/foo tmp/bar
+'
+
test_done