Git development
 help / color / mirror / Atom feed
From: Steffen Prohaska <prohaska@zib.de>
To: git@vger.kernel.org
Cc: Steffen Prohaska <prohaska@zib.de>
Subject: push fails with unexpected 'matches more than one'
Date: Fri, 12 Oct 2007 08:59:39 +0200	[thread overview]
Message-ID: <11921723791817-git-send-email-prohaska@zib.de> (raw)

This adds a test case for unambigous local match but multiple remote
matches. To me, it is unexpected that a ref that is perfectly defined
on the local side fails with 'matches more than one'.

The following rule could solve this:
A ref shall first be unambigously resolved on the local side, and its
full name should be used for matching on the remote side.
For example 'frotz' resolves locally to 'heads/refs/frotz'.
Therefore pretend the user had typed 'heads/refs/frotz'.

But maybe there is some hidden secret about the current rules that
I do not see.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 t/t5516-fetch-push.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index ca46aaf..f249216 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -244,4 +244,12 @@ test_expect_success 'push with colon-less refspec (4)' '
 
 '
 
+test_expect_success 'push with colon-less refspec (locally unambigous)' '
+
+	mk_test heads/frotz heads/t/frotz &&
+	git branch -f frotz master &&
+	git push testrepo frotz
+
+'
+
 test_done
-- 
1.5.3.4.219.gd0b2

             reply	other threads:[~2007-10-12  6:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12  6:59 Steffen Prohaska [this message]
2007-10-12 12:06 ` push fails with unexpected 'matches more than one' Steffen Prohaska
2007-10-13  3:21   ` Shawn O. Pearce
2007-10-13 16:51     ` Steffen Prohaska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11921723791817-git-send-email-prohaska@zib.de \
    --to=prohaska@zib.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox