]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1400: prepare for `main` being default branch name
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 23 Oct 2020 14:00:06 +0000 (14:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Oct 2020 15:57:43 +0000 (08:57 -0700)
In addition to the trivial search-and-replace, there are three
non-trivial adjustments necessary.

Mark the respective test cases with the transitional prereq and make
those non-trivial adjustments early, to make this change easier to
review.

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

index 770e7be363cdaa0fbbfc52a03cbc195c0920aad1..4c01e08551e5b8ea203f53b1e50f81a36ce27731 100755 (executable)
@@ -585,10 +585,10 @@ test_expect_success 'stdin fails on unbalanced quotes' '
        grep "fatal: badly quoted argument: \\\"master" err
 '
 
-test_expect_success 'stdin fails on invalid escape' '
-       echo "create $a \"ma\zter\"" >stdin &&
+test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '
+       echo "create $a \"ma\zn\"" >stdin &&
        test_must_fail git update-ref --stdin <stdin 2>err &&
-       grep "fatal: badly quoted argument: \\\"ma\\\\zter\\\"" err
+       grep "fatal: badly quoted argument: \\\"ma\\\\zn\\\"" err
 '
 
 test_expect_success 'stdin fails on junk after quoted argument' '
@@ -704,9 +704,9 @@ test_expect_success 'stdin succeeds with quoted argument' '
        test_cmp expect actual
 '
 
-test_expect_success 'stdin succeeds with escaped character' '
+test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin succeeds with escaped character' '
        git update-ref -d $a &&
-       echo "create $a \"ma\\163ter\"" >stdin &&
+       echo "create $a \"ma\\151n\"" >stdin &&
        git update-ref --stdin <stdin &&
        git rev-parse $m >expect &&
        git rev-parse $a >actual &&