]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t6040-tracking-info.sh
Merge branch 'ap/maint-merge-strategy-list-fix'
[git.git] / t / t6040-tracking-info.sh
index aac212e936331db9a596fda0c4a9c0382e123797..00e1de9627e8e20f4d28e3122502a494d21899e5 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'
@@ -53,7 +55,13 @@ test_expect_success 'checkout' '
        (
                cd test && git checkout b1
        ) >actual &&
-       grep -e "have 1 and 1 different" actual
+       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' '
@@ -63,8 +71,22 @@ test_expect_success 'status' '
                # reports nothing to commit
                test_must_fail git status
        ) >actual &&
-       grep -e "have 1 and 1 different" actual
+       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_success '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