From: Kacper Kornet <draenog@pld-linux.org>
To: git@vger.kernel.org
Subject: [PATCH] t1507: Test that branchname@{upstream} is interpreted as branch
Date: Sun, 17 Mar 2013 23:17:09 +0100 [thread overview]
Message-ID: <20130317221708.GA7707@camk.edu.pl> (raw)
In-Reply-To: <1363459903-32358-1-git-send-email-draenog@pld-linux.org>
Syntax branchname@{upstream} should interpret its argument as a name of
a branch. Add the test to check that it doesn't try to interpret it as a
refname if the branch in question does not exist.
Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
---
Maybe I'm too cautious adding this test. But just in case here it is.
t/t1507-rev-parse-upstream.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index d6e5761..b27a720 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -54,6 +54,10 @@ test_expect_success 'my-side@{upstream} resolves to correct full name' '
test refs/remotes/origin/side = "$(full_name my-side@{u})"
'
+test_expect_success 'refs/heads/my-side@{upstream} does not resolve to my-side{upstream}' '
+ test_must_fail full_name refs/heads/my-side@{upstream}
+'
+
test_expect_success 'my-side@{u} resolves to correct commit' '
git checkout side &&
test_commit 5 &&
--
1.8.2
prev parent reply other threads:[~2013-03-17 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-16 18:51 [PATCH] rev-parse: Clarify documentation of @{upstream} syntax Kacper Kornet
2013-03-17 4:31 ` Eric Sunshine
2013-03-17 22:17 ` Kacper Kornet [this message]
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=20130317221708.GA7707@camk.edu.pl \
--to=draenog@pld-linux.org \
--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;
as well as URLs for NNTP newsgroup(s).