Test tracking of non-commit upstreams
git-checkout and git-branch allow setting up an arbitrary committish as the upstream reference for --track. In particular, tags are allowed. But they and git-status barf on non-commit upstreams as soon as they are asked for trackings stats. Expose this shortcoming by adding two tests: annotated tags are affected but lightweight tags are OK. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael J Gruber committed
May 11, 2009 at 16:42 UTC
1be570f4ebb5f3c4e0a56341db166a760829782a
1 file changed
+14
t/t6040-tracking-info.sh
+14
@@ -66,5 +66,19 @@ test_expect_success 'status' '
66
grep "have 1 and 1 different" actual
67
'
68
69
+test_expect_success 'status when tracking lightweight tags' '
70
+ git checkout master &&
71
+ git tag light &&
72
+ git branch --track lighttrack light >actual &&
73
+ grep "set up to track" actual &&
74
+ git checkout lighttrack
75
+'
76
77
+test_expect_failure 'status when tracking annotated tags' '
78
+ git checkout master &&
79
+ git tag -m heavy heavy &&
80
+ git branch --track heavytrack heavy >actual &&
81
+ grep "set up to track" actual &&
82
+ git checkout heavytrack
83
+'
84
test_done