summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a95148d)
raw | patch | inline | side by side (parent: a95148d)
author | Michael J Gruber <git@drmicha.warpmail.net> | |
Mon, 11 May 2009 14:42:53 +0000 (16:42 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 14 May 2009 03:25:56 +0000 (20:25 -0700) |
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>
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>
t/t6040-tracking-info.sh | patch | blob | history |
index ba9060190d31f0b57a461c114e1c856523845f78..4b89ac71f53394fafec2697301b85c2cea7e1709 100755 (executable)
--- a/t/t6040-tracking-info.sh
+++ b/t/t6040-tracking-info.sh
grep "have 1 and 1 different" actual
'
+test_expect_success 'status when tracking lightweight tags' '
+ git checkout master &&
+ git tag light &&
+ git branch --track lighttrack light >actual &&
+ grep "set up to track" actual &&
+ git checkout lighttrack
+'
+test_expect_failure 'status when tracking annotated tags' '
+ git checkout master &&
+ git tag -m heavy heavy &&
+ git branch --track heavytrack heavy >actual &&
+ grep "set up to track" actual &&
+ git checkout heavytrack
+'
test_done