about summary refs log tree commit diff
path: root/third_party/git/t/t5528-push-default.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/t5528-push-default.sh')
-rwxr-xr-xthird_party/git/t/t5528-push-default.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/third_party/git/t/t5528-push-default.sh b/third_party/git/t/t5528-push-default.sh
index 44309566f134..f0a287d97dba 100755
--- a/third_party/git/t/t5528-push-default.sh
+++ b/third_party/git/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 &&
@@ -163,7 +169,7 @@ test_pushdefault_workflow success current master
 # update parent1's foo (which is our upstream)
 test_pushdefault_workflow success upstream foo
 
-# upsream is foo which is not the name of the current branch
+# upstream is foo which is not the name of the current branch
 test_pushdefault_workflow failure simple master
 
 # master and foo are updated