summaryrefslogtreecommitdiff
path: root/t/t4061-diff-indent.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-19 23:44:18 (GMT)
commit8f37854b187a4539dd37752b2631849c94bd627b (patch)
treeb57147cbdc2774ace04b7ea1f648900a6d59b08f /t/t4061-diff-indent.sh
parentcbc75a12f056c9e6eef30b92db2dc0ce99e97dbe (diff)
downloadgit-8f37854b187a4539dd37752b2631849c94bd627b.zip
git-8f37854b187a4539dd37752b2631849c94bd627b.tar.gz
git-8f37854b187a4539dd37752b2631849c94bd627b.tar.bz2
t4*: adjust the references to the default branch name "main"
Carefully excluding t4013 and t4015, which see independent development elsewhere at the time of writing, we use `main` as the default branch name in t4*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t4*.sh t4211/*.export && git checkout HEAD -- t4013\*) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4061-diff-indent.sh')
-rwxr-xr-xt/t4061-diff-indent.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh
index cbe64d5..bcf7493 100755
--- a/t/t4061-diff-indent.sh
+++ b/t/t4061-diff-indent.sh
@@ -3,7 +3,7 @@
test_description='Test diff indent heuristic.
'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -269,7 +269,7 @@ test_expect_success 'diff-index: nice spaces with --indent-heuristic' '
git reset --soft HEAD~ &&
git diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted &&
compare_diff spaces-compacted-expect out-diff-index-compacted &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '
@@ -277,7 +277,7 @@ test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=true diff-index -p old -- spaces.txt >out-diff-index-compacted2 &&
compare_diff spaces-compacted-expect out-diff-index-compacted2 &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '
@@ -285,7 +285,7 @@ test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '
git reset --soft HEAD~ &&
git diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index &&
compare_diff spaces-expect out-diff-index &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '
@@ -293,7 +293,7 @@ test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=false diff-index -p old -- spaces.txt >out-diff-index2 &&
compare_diff spaces-expect out-diff-index2 &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: --indent-heuristic overrides config' '
@@ -301,7 +301,7 @@ test_expect_success 'diff-index: --indent-heuristic overrides config' '
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=false diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted3 &&
compare_diff spaces-compacted-expect out-diff-index-compacted3 &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: --no-indent-heuristic overrides config' '
@@ -309,7 +309,7 @@ test_expect_success 'diff-index: --no-indent-heuristic overrides config' '
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=true diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index3 &&
compare_diff spaces-expect out-diff-index3 &&
- git checkout -f master
+ git checkout -f main
'
# --- diff-files tests ----------------------------------------------------
@@ -320,7 +320,7 @@ test_expect_success 'diff-files: nice spaces with --indent-heuristic' '
git diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw &&
grep -v index out-diff-files-raw >out-diff-files-compacted &&
compare_diff spaces-compacted-expect out-diff-files-compacted &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '
@@ -329,7 +329,7 @@ test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '
git -c diff.indentHeuristic=true diff-files -p spaces.txt >out-diff-files-raw2 &&
grep -v index out-diff-files-raw2 >out-diff-files-compacted2 &&
compare_diff spaces-compacted-expect out-diff-files-compacted2 &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '
@@ -338,7 +338,7 @@ test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '
git diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw &&
grep -v index out-diff-files-raw >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '
@@ -347,7 +347,7 @@ test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '
git -c diff.indentHeuristic=false diff-files -p spaces.txt >out-diff-files-raw2 &&
grep -v index out-diff-files-raw2 >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: --indent-heuristic overrides config' '
@@ -356,7 +356,7 @@ test_expect_success 'diff-files: --indent-heuristic overrides config' '
git -c diff.indentHeuristic=false diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw3 &&
grep -v index out-diff-files-raw3 >out-diff-files-compacted &&
compare_diff spaces-compacted-expect out-diff-files-compacted &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: --no-indent-heuristic overrides config' '
@@ -365,7 +365,7 @@ test_expect_success 'diff-files: --no-indent-heuristic overrides config' '
git -c diff.indentHeuristic=true diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw4 &&
grep -v index out-diff-files-raw4 >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
- git checkout -f master
+ git checkout -f main
'
test_done