summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-05-11 15:47:56 +0200
committerJunio C Hamano <gitster@pobox.com>2017-05-12 15:05:58 +0900
commit98d1be27858a30b7c7a45851ba2031d3e80461d8 (patch)
treef91af0f27cf765bd8f2ae5dbcf2e737fe1dbf29f
parent0ea81e8e98b650bb20357e7f099ad583974748c7 (diff)
downloadgit-98d1be27858a30b7c7a45851ba2031d3e80461d8.tar.gz
PREVIEW: t5516: stop testing .git/branches/ functionality
We are about to remove support for .git/remotes/ and .git/branches/, at long last. In preparation for this move, let's remove the corresponding regression tests from t5516-fetch-push. Note: the `push --prune` test case (and another test case after that) relied on the side effect where a branch with the name `second` was created earlier. We simply move that branch creation into that test case. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t5516-fetch-push.sh59
1 files changed, 1 insertions, 58 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 457f648ad9..c8ba7b67f6 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -862,64 +862,6 @@ test_expect_success 'allow push to HEAD of non-bare repository (config)' '
! grep "warning: updating the current branch" stderr
'
-test_expect_success 'fetch with branches' '
- mk_empty testrepo &&
- git branch second $the_first_commit &&
- git checkout second &&
- mkdir -p testrepo/.git/branches &&
- echo ".." > testrepo/.git/branches/branch1 &&
- (
- cd testrepo &&
- git fetch branch1 &&
- echo "$the_commit commit refs/heads/branch1" >expect &&
- git for-each-ref refs/heads >actual &&
- test_cmp expect actual
- ) &&
- git checkout master
-'
-
-test_expect_success 'fetch with branches containing #' '
- mk_empty testrepo &&
- mkdir -p testrepo/.git/branches &&
- echo "..#second" > testrepo/.git/branches/branch2 &&
- (
- cd testrepo &&
- git fetch branch2 &&
- echo "$the_first_commit commit refs/heads/branch2" >expect &&
- git for-each-ref refs/heads >actual &&
- test_cmp expect actual
- ) &&
- git checkout master
-'
-
-test_expect_success 'push with branches' '
- mk_empty testrepo &&
- git checkout second &&
- mkdir -p .git/branches &&
- echo "testrepo" > .git/branches/branch1 &&
- git push branch1 &&
- (
- cd testrepo &&
- echo "$the_first_commit commit refs/heads/master" >expect &&
- git for-each-ref refs/heads >actual &&
- test_cmp expect actual
- )
-'
-
-test_expect_success 'push with branches containing #' '
- mk_empty testrepo &&
- mkdir -p .git/branches &&
- echo "testrepo#branch3" > .git/branches/branch2 &&
- git push branch2 &&
- (
- cd testrepo &&
- echo "$the_first_commit commit refs/heads/branch3" >expect &&
- git for-each-ref refs/heads >actual &&
- test_cmp expect actual
- ) &&
- git checkout master
-'
-
test_expect_success 'push into aliased refs (consistent)' '
mk_test testrepo heads/master &&
mk_child testrepo child1 &&
@@ -1042,6 +984,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '
test_expect_success 'push --prune' '
mk_test testrepo heads/master heads/second heads/foo heads/bar &&
+ git branch second $the_first_commit &&
git push --prune testrepo : &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_first_commit heads/second &&