diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2009-05-11 16:42:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-13 20:25:56 -0700 |
commit | 1be570f4ebb5f3c4e0a56341db166a760829782a (patch) | |
tree | 94211bc00ce1e4998998001e32215e58f70c30fe /t/t6040-tracking-info.sh | |
parent | a95148dea1d9546e96adef7c3cad11be80aa30f5 (diff) | |
download | git-1be570f4ebb5f3c4e0a56341db166a760829782a.tar.gz git-1be570f4ebb5f3c4e0a56341db166a760829782a.tar.xz |
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>
Diffstat (limited to 't/t6040-tracking-info.sh')
-rwxr-xr-x | t/t6040-tracking-info.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh index ba9060190..4b89ac71f 100755 --- a/t/t6040-tracking-info.sh +++ b/t/t6040-tracking-info.sh @@ -66,5 +66,19 @@ test_expect_success 'status' ' 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 |