Merge branch 'js/filter-branch-prime'
[gitweb.git] / t / t6040-tracking-info.sh
index 4b89ac71f53394fafec2697301b85c2cea7e1709..664b0f805288863955d8b6389c95f0f8f542f136 100755 (executable)
@@ -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,12 +58,18 @@ test_expect_success 'checkout' '
        grep "have 1 and 1 different" actual
 '
 
+test_expect_success 'checkout with local tracked branch' '
+       git checkout master &&
+       git checkout follower >actual
+       grep "is ahead of" actual
+'
+
 test_expect_success 'status' '
        (
                cd test &&
                git checkout b1 >/dev/null &&
                # reports nothing to commit
-               test_must_fail git status
+               test_must_fail git commit --dry-run
        ) >actual &&
        grep "have 1 and 1 different" actual
 '
@@ -74,7 +82,7 @@ test_expect_success 'status when tracking lightweight tags' '
        git checkout lighttrack
 '
 
-test_expect_failure 'status when tracking annotated tags' '
+test_expect_success 'status when tracking annotated tags' '
        git checkout master &&
        git tag -m heavy heavy &&
        git branch --track heavytrack heavy >actual &&