From: Michael J Gruber Date: Thu, 26 Mar 2009 20:53:24 +0000 (+0100) Subject: Test for local branches being followed with --track X-Git-Tag: v1.6.3-rc0~31^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=57dac0bfe43a68d55e16def58b8ed305e0676d3f;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh index ba9060190..2a2b6b63d 100755 --- a/t/t6040-tracking-info.sh +++ b/t/t6040-tracking-info.sh @@ -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' @@ -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 &&