Skip to content

Commit 57dac0b

Browse files
Michael J Grubergitster
authored andcommitted
Test for local branches being followed with --track
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eed1fcd commit 57dac0b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

t/t6040-tracking-info.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ test_expect_success setup '
2929
git checkout -b b4 origin &&
3030
advance e &&
3131
advance f
32-
)
32+
) &&
33+
git checkout -b follower --track master &&
34+
advance g
3335
'
3436

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

61+
test_expect_failure 'checkout with local tracked branch' '
62+
git checkout master &&
63+
git checkout follower >actual
64+
grep "is ahead of" actual
65+
'
66+
5967
test_expect_success 'status' '
6068
(
6169
cd test &&

0 commit comments

Comments
 (0)