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@xxxxxx> --- t/t5516-fetch-push.sh | 59 +-------------------------------------------------- 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 457f648ad91..c8ba7b67f67 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 && -- 2.12.2.windows.2.800.gede8f145e06