Thread (1 message) 1 message, 1 author, 2016-10-31

Re: [PATCH] push: do not use potentially ambiguous default refspec

From: Junio C Hamano <hidden>
Date: 2016-10-31 21:11:16

Dennis Kaarsemaker [off-list ref] writes:
On Fri, Oct 28, 2016 at 12:25:30PM -0700, Junio C Hamano wrote:
quoted
 * It is appreciated if somebody with spare cycles can add a test or
   two for this in t/t5523-push-upstream.sh or somewhere nearby.
5523 is for push --set-upstream-to, 5528 seemed more appropriate. Here's
something squashable that fails before your patch and succeeds after.
Thanks.
quoted hunk
quoted
8----
Subject: [PATCH] push: test pushing ambiguously named branches

Signed-off-by: Dennis Kaarsemaker <redacted>
---
 t/t5528-push-default.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh
index 73f4bb6..ac103ce 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 &&
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help