commit-graph: fix bug around octopus merges
[gitweb.git] / t / t6040-tracking-info.sh
index 970b25a289a00cefa57d25c48cf750b95fd4ed0d..ad1922b999b18d8437cc48c139a862ab5f59425d 100755 (executable)
@@ -159,6 +159,19 @@ test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '
        test_i18ncmp expect actual
 '
 
+cat >expect <<\EOF
+## b1...origin/master [different]
+EOF
+
+test_expect_success 'status.aheadbehind=false status -s -b (diverged from upstream)' '
+       (
+               cd test &&
+               git checkout b1 >/dev/null &&
+               git -c status.aheadbehind=false status -s -b | head -1
+       ) >actual &&
+       test_i18ncmp expect actual
+'
+
 cat >expect <<\EOF
 On branch b1
 Your branch and 'origin/master' have diverged,
@@ -174,6 +187,15 @@ test_expect_success 'status --long --branch' '
        test_i18ncmp expect actual
 '
 
+test_expect_success 'status --long --branch' '
+       (
+               cd test &&
+               git checkout b1 >/dev/null &&
+               git -c status.aheadbehind=true status --long -b | head -3
+       ) >actual &&
+       test_i18ncmp expect actual
+'
+
 cat >expect <<\EOF
 On branch b1
 Your branch and 'origin/master' refer to different commits.
@@ -188,6 +210,15 @@ test_expect_success 'status --long --branch --no-ahead-behind' '
        test_i18ncmp expect actual
 '
 
+test_expect_success 'status.aheadbehind=false status --long --branch' '
+       (
+               cd test &&
+               git checkout b1 >/dev/null &&
+               git -c status.aheadbehind=false status --long -b | head -2
+       ) >actual &&
+       test_i18ncmp expect actual
+'
+
 cat >expect <<\EOF
 ## b5...brokenbase [gone]
 EOF