Skip to content

Commit

Permalink
Test for local branches being followed with --track
Browse files Browse the repository at this point in the history
According to the documentation, it is perfectly okay to follow local
branches using the --track option. Introduce a test which checks whether
they behave the same. Currently one test fails.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Mar 27, 2009
1 parent eed1fcd commit 57dac0b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion t/t6040-tracking-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ test_expect_success setup '
git checkout -b b4 origin &&
advance e &&
advance f
)
) &&
git checkout -b follower --track master &&
advance g
'

script='s/^..\(b.\)[ 0-9a-f]*\[\([^]]*\)\].*/\1 \2/p'
Expand All @@ -56,6 +58,12 @@ test_expect_success 'checkout' '
grep "have 1 and 1 different" actual
'

test_expect_failure 'checkout with local tracked branch' '
git checkout master &&
git checkout follower >actual
grep "is ahead of" actual
'

test_expect_success 'status' '
(
cd test &&
Expand Down

0 comments on commit 57dac0b

Please sign in to comment.