[PATCH] t1507: Test that branchname@{upstream} is interpreted as branch
- From
Kacper Kornet <draenog@pld-linux.org>
- Date
- Mar 17, 2013, 22:17 UTC
- Message-ID
- <20130317221708.GA7707@camk.edu.pl>
- 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