summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-01-17 23:11:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-17 23:11:07 (GMT)
commitaf04b1171b9ed16f5acce0a49fe3bda518a40b7e (patch)
treef86d78c39008512fa399fbf20157ffac13d53190 /t
parent943c9a7b867210f283d588e1b790d0197b66fde8 (diff)
parentb284495e93394394f7c7923f6d646947844cec04 (diff)
downloadgit-af04b1171b9ed16f5acce0a49fe3bda518a40b7e.zip
git-af04b1171b9ed16f5acce0a49fe3bda518a40b7e.tar.gz
git-af04b1171b9ed16f5acce0a49fe3bda518a40b7e.tar.bz2
Merge branch 'jc/push-default-explicit' into maint
A lazy "git push" without refspec did not internally use a fully specified refspec to perform 'current', 'simple', or 'upstream' push, causing unnecessary "ambiguous ref" errors. * jc/push-default-explicit: push: test pushing ambiguously named branches push: do not use potentially ambiguous default refspec
Diffstat (limited to 't')
-rwxr-xr-xt/t5528-push-default.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh
index 73f4bb6..4430956 100755
--- a/t/t5528-push-default.sh
+++ b/t/t5528-push-default.sh
@@ -98,6 +98,16 @@ test_expect_success 'push from/to new branch with upstream, matching and simple'
test_push_failure upstream
'
+test_expect_success 'push ambiguously named branch with upstream, matching and simple' '
+ git checkout -b ambiguous &&
+ test_config branch.ambiguous.remote parent1 &&
+ test_config branch.ambiguous.merge refs/heads/ambiguous &&
+ git tag ambiguous &&
+ test_push_success simple ambiguous &&
+ test_push_success matching ambiguous &&
+ test_push_success upstream ambiguous
+'
+
test_expect_success 'push from/to new branch with current creates remote branch' '
test_config branch.new-branch.remote repo1 &&
git checkout new-branch &&