summaryrefslogtreecommitdiff
path: root/t/t6006-rev-list-format.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6006-rev-list-format.sh')
-rwxr-xr-xt/t6006-rev-list-format.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 7e82e43..35a2f62 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -5,6 +5,9 @@
test_description='git rev-list --pretty=format test'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-terminal.sh
@@ -32,7 +35,6 @@ changed_iso88591=$(echo "$changed" | iconv -f utf-8 -t $test_encoding)
truncate_count=20
test_expect_success 'setup' '
- test_oid_init &&
: >foo &&
git add foo &&
git config i18n.commitEncoding $test_encoding &&
@@ -54,7 +56,7 @@ test_expect_success 'setup' '
test_format () {
cat >expect.$1
test_expect_${3:-success} "format $1" "
- git rev-list --pretty=format:'$2' master >output.$1 &&
+ git rev-list --pretty=format:'$2' main >output.$1 &&
test_cmp expect.$1 output.$1
"
}
@@ -185,13 +187,13 @@ test_expect_success 'basic colors' '
<RED>foo<GREEN>bar<BLUE>baz<RESET>xyzzy
EOF
format="%Credfoo%Cgreenbar%Cbluebaz%Cresetxyzzy" &&
- git rev-list --color --format="$format" -1 master >actual.raw &&
+ git rev-list --color --format="$format" -1 main >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect actual
'
test_expect_success '%S is not a placeholder for rev-list yet' '
- git rev-list --format="%S" -1 master | grep "%S"
+ git rev-list --format="%S" -1 main | grep "%S"
'
test_expect_success 'advanced colors' '
@@ -200,7 +202,7 @@ test_expect_success 'advanced colors' '
<BOLD;RED;BYELLOW>foo<RESET>
EOF
format="%C(red yellow bold)foo%C(reset)" &&
- git rev-list --color --format="$format" -1 master >actual.raw &&
+ git rev-list --color --format="$format" -1 main >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect actual
'
@@ -340,7 +342,7 @@ commit $head1
.. (hinzugef${added_utf8_part_iso88591}gt) foo
EOF
-test_expect_success 'prepare expected messages (for test %b)' '
+test_expect_success 'setup expected messages (for test %b)' '
cat <<-EOF >expected.utf-8 &&
commit $head3
This commit message is much longer than the others,
@@ -407,7 +409,7 @@ test_expect_success '%x00 shows NUL' '
test_expect_success '%ad respects --date=' '
echo 2005-04-07 >expect.ad-short &&
- git log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&
+ git log -1 --date=short --pretty=tformat:%ad >output.ad-short main &&
test_cmp expect.ad-short output.ad-short
'
@@ -495,8 +497,8 @@ test_expect_success '"%h %gD: %gs" is same as git-reflog (with --abbrev)' '
'
test_expect_success '%gd shortens ref name' '
- echo "master@{0}" >expect.gd-short &&
- git log -g -1 --format=%gd refs/heads/master >actual.gd-short &&
+ echo "main@{0}" >expect.gd-short &&
+ git log -g -1 --format=%gd refs/heads/main >actual.gd-short &&
test_cmp expect.gd-short actual.gd-short
'