diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-07-07 08:09:17 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-07 08:09:17 +0300 |
commit | 11cbda2add5d3eb7c415f1f6dd8186181a7f9874 (patch) | |
tree | 7d722860aa28b92087406bf063c7ad6fe6c45c30 /t/t5528-push-default.sh | |
parent | 480e78595ea531482018826d35fed0fb0529afa2 (diff) | |
parent | 508fd8e8baf3e18ee40b2cf0b8899188a8506d07 (diff) |
Merge branch 'js/default-branch-name'
The name of the primary branch in existing repositories, and the
default name used for the first branch in newly created
repositories, is made configurable, so that we can eventually wean
ourselves off of the hardcoded 'master'.
* js/default-branch-name:
contrib: subtree: adjust test to change in fmt-merge-msg
testsvn: respect `init.defaultBranch`
remote: use the configured default branch name when appropriate
clone: use configured default branch name when appropriate
init: allow setting the default for the initial branch name via the config
init: allow specifying the initial branch name for the new repository
docs: add missing diamond brackets
submodule: fall back to remote's HEAD for missing remote.<name>.branch
send-pack/transport-helper: avoid mentioning a particular branch
fmt-merge-msg: stop treating `master` specially
Diffstat (limited to 't/t5528-push-default.sh')
-rwxr-xr-x | t/t5528-push-default.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh index 4d1e0c363e..f0a287d97d 100755 --- a/t/t5528-push-default.sh +++ b/t/t5528-push-default.sh @@ -98,6 +98,12 @@ test_expect_success 'push from/to new branch with upstream, matching and simple' test_push_failure upstream ' +test_expect_success '"matching" fails if none match' ' + git init --bare empty && + test_must_fail git push empty : 2>actual && + test_i18ngrep "Perhaps you should specify a branch" actual +' + test_expect_success 'push ambiguously named branch with upstream, matching and simple' ' git checkout -b ambiguous && test_config branch.ambiguous.remote parent1 && |