]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t3200: prepare for `main` being shorter than `master`
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 23 Oct 2020 14:00:03 +0000 (14:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Oct 2020 15:57:41 +0000 (08:57 -0700)
In the test case adjusted by this patch, we want to cut just after the
longest shown ref name. Since `main` is shorter than `master`, we need
to decrease the number of characters. Since `topic` is shown, too, and
since that is only one character shorter than `master`, we decrement the
length by one instead of two.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3200-branch.sh

index 6efe7a44bc628f413f965b379771e0376b605911..55b24b76ced77ddd084137042003d17f1105f968 100755 (executable)
@@ -375,9 +375,9 @@ test_expect_success 'git branch --column -v should fail' '
        test_must_fail git branch --column -v
 '
 
-test_expect_success 'git branch -v with column.ui ignored' '
+test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignored' '
        git config column.ui column &&
-       COLUMNS=80 git branch -v | cut -c -9 | sed "s/ *$//" >actual &&
+       COLUMNS=80 git branch -v | cut -c -8 | sed "s/ *$//" >actual &&
        git config --unset column.ui &&
        cat >expect <<\EOF &&
   a/b/c