Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 9c9cd39

Browse files
jherlandgitster
authored andcommitted
t3200.39: tracking setup should fail if there is no matching refspec.
We are formalizing a requirement that any remote-tracking branch to be used as an upstream (i.e. as an argument to --track), _must_ "belong" to a configured remote by being matched by the "dst" side of a fetch refspec. This patch encodes the new expected behavior of this test, and marks the test with "test_expect_failure" in anticipation of a following patch to introduce the new behavior. Signed-off-by: Johan Herland <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fa83a33 commit 9c9cd39

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t3200-branch.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ test_expect_success 'test tracking setup (non-wildcard, matching)' '
317317
test $(git config branch.my4.merge) = refs/heads/master
318318
'
319319

320-
test_expect_success 'test tracking setup (non-wildcard, not matching)' '
320+
test_expect_failure 'tracking setup fails on non-matching refspec' '
321321
git config remote.local.url . &&
322322
git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
323323
(git show-ref -q refs/remotes/local/master || git fetch local) &&
324-
git branch --track my5 local/master &&
325-
! test "$(git config branch.my5.remote)" = local &&
326-
! test "$(git config branch.my5.merge)" = refs/heads/master
324+
test_must_fail git branch --track my5 local/master &&
325+
test_must_fail git config branch.my5.remote &&
326+
test_must_fail git config branch.my5.merge
327327
'
328328

329329
test_expect_success 'test tracking setup via config' '

0 commit comments

Comments
 (0)