]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t6040-tracking-info.sh
status: support --no-ahead-behind in long format
[thirdparty/git.git] / t / t6040-tracking-info.sh
index 019022080b035d6a5e6b0caf654a3e48ab4e5e1d..716283b274677dc6c954044c2f11b902ace79527 100755 (executable)
@@ -159,6 +159,35 @@ test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '
        test_i18ncmp expect actual
 '
 
+cat >expect <<\EOF
+On branch b1
+Your branch and 'origin/master' have diverged,
+and have 1 and 1 different commits each, respectively.
+EOF
+
+test_expect_success 'status --long --branch' '
+       (
+               cd test &&
+               git checkout b1 >/dev/null &&
+               git 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.
+EOF
+
+test_expect_success 'status --long --branch --no-ahead-behind' '
+       (
+               cd test &&
+               git checkout b1 >/dev/null &&
+               git status --long -b --no-ahead-behind | head -2
+       ) >actual &&
+       test_i18ncmp expect actual
+'
+
 cat >expect <<\EOF
 ## b5...brokenbase [gone]
 EOF