Git fork

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>

authored by

Johannes Schindelin and committed by
Junio C Hamano
8f37854b cbc75a12

+319 -319
+89 -89
t/t4014-format-patch.sh
··· 5 5 6 6 test_description='various format-patch tests' 7 7 8 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 8 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 10 11 11 . ./test-lib.sh ··· 35 35 test_tick && 36 36 git commit -m "Side changes #3 with \\n backslash-n in it." && 37 37 38 - git checkout master && 38 + git checkout main && 39 39 git diff-tree -p C2 >patch && 40 40 git apply --index <patch && 41 41 test_tick && 42 - git commit -m "Master accepts moral equivalent of #2" && 42 + git commit -m "Main accepts moral equivalent of #2" && 43 43 44 44 git checkout side && 45 45 git checkout -b patchid && ··· 59 59 test_tick && 60 60 git commit -m "patchid 3" && 61 61 62 - git checkout master 62 + git checkout main 63 63 ' 64 64 65 65 test_expect_success 'format-patch --ignore-if-in-upstream' ' 66 - git format-patch --stdout master..side >patch0 && 66 + git format-patch --stdout main..side >patch0 && 67 67 grep "^From " patch0 >from0 && 68 68 test_line_count = 3 from0 69 69 ' 70 70 71 71 test_expect_success 'format-patch --ignore-if-in-upstream' ' 72 72 git format-patch --stdout \ 73 - --ignore-if-in-upstream master..side >patch1 && 73 + --ignore-if-in-upstream main..side >patch1 && 74 74 grep "^From " patch1 >from1 && 75 75 test_line_count = 2 from1 76 76 ' 77 77 78 78 test_expect_success 'format-patch --ignore-if-in-upstream handles tags' ' 79 79 git tag -a v1 -m tag side && 80 - git tag -a v2 -m tag master && 80 + git tag -a v2 -m tag main && 81 81 git format-patch --stdout --ignore-if-in-upstream v2..v1 >patch1 && 82 82 grep "^From " patch1 >from1 && 83 83 test_line_count = 2 from1 84 84 ' 85 85 86 86 test_expect_success "format-patch doesn't consider merge commits" ' 87 - git checkout -b feature master && 87 + git checkout -b feature main && 88 88 echo "Another line" >>file && 89 89 test_tick && 90 90 git commit -am "Feature branch change #1" && 91 91 echo "Yet another line" >>file && 92 92 test_tick && 93 93 git commit -am "Feature branch change #2" && 94 - git checkout -b merger master && 94 + git checkout -b merger main && 95 95 test_tick && 96 96 git merge --no-ff feature && 97 97 git format-patch -3 --stdout >patch && ··· 100 100 ' 101 101 102 102 test_expect_success 'format-patch result applies' ' 103 - git checkout -b rebuild-0 master && 103 + git checkout -b rebuild-0 main && 104 104 git am -3 patch0 && 105 - git rev-list master.. >list && 105 + git rev-list main.. >list && 106 106 test_line_count = 2 list 107 107 ' 108 108 109 109 test_expect_success 'format-patch --ignore-if-in-upstream result applies' ' 110 - git checkout -b rebuild-1 master && 110 + git checkout -b rebuild-1 main && 111 111 git am -3 patch1 && 112 - git rev-list master.. >list && 112 + git rev-list main.. >list && 113 113 test_line_count = 2 list 114 114 ' 115 115 ··· 133 133 " && 134 134 git config --add format.headers "Cc: S E Cipient <scipient@example.com> 135 135 " && 136 - git format-patch --stdout master..side >patch2 && 136 + git format-patch --stdout main..side >patch2 && 137 137 sed -e "/^\$/q" patch2 >hdrs2 && 138 138 grep "^To: R E Cipient <rcipient@example.com>\$" hdrs2 && 139 139 grep "^Cc: S E Cipient <scipient@example.com>\$" hdrs2 ··· 142 142 test_expect_success 'extra headers without newlines' ' 143 143 git config --replace-all format.headers "To: R E Cipient <rcipient@example.com>" && 144 144 git config --add format.headers "Cc: S E Cipient <scipient@example.com>" && 145 - git format-patch --stdout master..side >patch3 && 145 + git format-patch --stdout main..side >patch3 && 146 146 sed -e "/^\$/q" patch3 >hdrs3 && 147 147 grep "^To: R E Cipient <rcipient@example.com>\$" hdrs3 && 148 148 grep "^Cc: S E Cipient <scipient@example.com>\$" hdrs3 ··· 151 151 test_expect_success 'extra headers with multiple To:s' ' 152 152 git config --replace-all format.headers "To: R E Cipient <rcipient@example.com>" && 153 153 git config --add format.headers "To: S E Cipient <scipient@example.com>" && 154 - git format-patch --stdout master..side >patch4 && 154 + git format-patch --stdout main..side >patch4 && 155 155 sed -e "/^\$/q" patch4 >hdrs4 && 156 156 grep "^To: R E Cipient <rcipient@example.com>,\$" hdrs4 && 157 157 grep "^ *S E Cipient <scipient@example.com>\$" hdrs4 ··· 159 159 160 160 test_expect_success 'additional command line cc (ascii)' ' 161 161 git config --replace-all format.headers "Cc: R E Cipient <rcipient@example.com>" && 162 - git format-patch --cc="S E Cipient <scipient@example.com>" --stdout master..side >patch5 && 162 + git format-patch --cc="S E Cipient <scipient@example.com>" --stdout main..side >patch5 && 163 163 sed -e "/^\$/q" patch5 >hdrs5 && 164 164 grep "^Cc: R E Cipient <rcipient@example.com>,\$" hdrs5 && 165 165 grep "^ *S E Cipient <scipient@example.com>\$" hdrs5 ··· 167 167 168 168 test_expect_failure 'additional command line cc (rfc822)' ' 169 169 git config --replace-all format.headers "Cc: R E Cipient <rcipient@example.com>" && 170 - git format-patch --cc="S. E. Cipient <scipient@example.com>" --stdout master..side >patch5 && 170 + git format-patch --cc="S. E. Cipient <scipient@example.com>" --stdout main..side >patch5 && 171 171 sed -e "/^\$/q" patch5 >hdrs5 && 172 172 grep "^Cc: R E Cipient <rcipient@example.com>,\$" hdrs5 && 173 173 grep "^ *\"S. E. Cipient\" <scipient@example.com>\$" hdrs5 ··· 175 175 176 176 test_expect_success 'command line headers' ' 177 177 git config --unset-all format.headers && 178 - git format-patch --add-header="Cc: R E Cipient <rcipient@example.com>" --stdout master..side >patch6 && 178 + git format-patch --add-header="Cc: R E Cipient <rcipient@example.com>" --stdout main..side >patch6 && 179 179 sed -e "/^\$/q" patch6 >hdrs6 && 180 180 grep "^Cc: R E Cipient <rcipient@example.com>\$" hdrs6 181 181 ' 182 182 183 183 test_expect_success 'configuration headers and command line headers' ' 184 184 git config --replace-all format.headers "Cc: R E Cipient <rcipient@example.com>" && 185 - git format-patch --add-header="Cc: S E Cipient <scipient@example.com>" --stdout master..side >patch7 && 185 + git format-patch --add-header="Cc: S E Cipient <scipient@example.com>" --stdout main..side >patch7 && 186 186 sed -e "/^\$/q" patch7 >hdrs7 && 187 187 grep "^Cc: R E Cipient <rcipient@example.com>,\$" hdrs7 && 188 188 grep "^ *S E Cipient <scipient@example.com>\$" hdrs7 ··· 190 190 191 191 test_expect_success 'command line To: header (ascii)' ' 192 192 git config --unset-all format.headers && 193 - git format-patch --to="R E Cipient <rcipient@example.com>" --stdout master..side >patch8 && 193 + git format-patch --to="R E Cipient <rcipient@example.com>" --stdout main..side >patch8 && 194 194 sed -e "/^\$/q" patch8 >hdrs8 && 195 195 grep "^To: R E Cipient <rcipient@example.com>\$" hdrs8 196 196 ' 197 197 198 198 test_expect_failure 'command line To: header (rfc822)' ' 199 - git format-patch --to="R. E. Cipient <rcipient@example.com>" --stdout master..side >patch8 && 199 + git format-patch --to="R. E. Cipient <rcipient@example.com>" --stdout main..side >patch8 && 200 200 sed -e "/^\$/q" patch8 >hdrs8 && 201 201 grep "^To: \"R. E. Cipient\" <rcipient@example.com>\$" hdrs8 202 202 ' 203 203 204 204 test_expect_failure 'command line To: header (rfc2047)' ' 205 - git format-patch --to="R Ä Cipient <rcipient@example.com>" --stdout master..side >patch8 && 205 + git format-patch --to="R Ä Cipient <rcipient@example.com>" --stdout main..side >patch8 && 206 206 sed -e "/^\$/q" patch8 >hdrs8 && 207 207 grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\$" hdrs8 208 208 ' 209 209 210 210 test_expect_success 'configuration To: header (ascii)' ' 211 211 git config format.to "R E Cipient <rcipient@example.com>" && 212 - git format-patch --stdout master..side >patch9 && 212 + git format-patch --stdout main..side >patch9 && 213 213 sed -e "/^\$/q" patch9 >hdrs9 && 214 214 grep "^To: R E Cipient <rcipient@example.com>\$" hdrs9 215 215 ' 216 216 217 217 test_expect_failure 'configuration To: header (rfc822)' ' 218 218 git config format.to "R. E. Cipient <rcipient@example.com>" && 219 - git format-patch --stdout master..side >patch9 && 219 + git format-patch --stdout main..side >patch9 && 220 220 sed -e "/^\$/q" patch9 >hdrs9 && 221 221 grep "^To: \"R. E. Cipient\" <rcipient@example.com>\$" hdrs9 222 222 ' 223 223 224 224 test_expect_failure 'configuration To: header (rfc2047)' ' 225 225 git config format.to "R Ä Cipient <rcipient@example.com>" && 226 - git format-patch --stdout master..side >patch9 && 226 + git format-patch --stdout main..side >patch9 && 227 227 sed -e "/^\$/q" patch9 >hdrs9 && 228 228 grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\$" hdrs9 229 229 ' ··· 237 237 } 238 238 239 239 test_expect_success 'format.from=false' ' 240 - git -c format.from=false format-patch --stdout master..side >patch && 240 + git -c format.from=false format-patch --stdout main..side >patch && 241 241 sed -e "/^\$/q" patch >hdrs && 242 242 check_patch patch && 243 243 ! grep "^From: C O Mitter <committer@example.com>\$" hdrs 244 244 ' 245 245 246 246 test_expect_success 'format.from=true' ' 247 - git -c format.from=true format-patch --stdout master..side >patch && 247 + git -c format.from=true format-patch --stdout main..side >patch && 248 248 sed -e "/^\$/q" patch >hdrs && 249 249 check_patch hdrs && 250 250 grep "^From: C O Mitter <committer@example.com>\$" hdrs 251 251 ' 252 252 253 253 test_expect_success 'format.from with address' ' 254 - git -c format.from="F R Om <from@example.com>" format-patch --stdout master..side >patch && 254 + git -c format.from="F R Om <from@example.com>" format-patch --stdout main..side >patch && 255 255 sed -e "/^\$/q" patch >hdrs && 256 256 check_patch hdrs && 257 257 grep "^From: F R Om <from@example.com>\$" hdrs 258 258 ' 259 259 260 260 test_expect_success '--no-from overrides format.from' ' 261 - git -c format.from="F R Om <from@example.com>" format-patch --no-from --stdout master..side >patch && 261 + git -c format.from="F R Om <from@example.com>" format-patch --no-from --stdout main..side >patch && 262 262 sed -e "/^\$/q" patch >hdrs && 263 263 check_patch hdrs && 264 264 ! grep "^From: F R Om <from@example.com>\$" hdrs 265 265 ' 266 266 267 267 test_expect_success '--from overrides format.from' ' 268 - git -c format.from="F R Om <from@example.com>" format-patch --from --stdout master..side >patch && 268 + git -c format.from="F R Om <from@example.com>" format-patch --from --stdout main..side >patch && 269 269 sed -e "/^\$/q" patch >hdrs && 270 270 check_patch hdrs && 271 271 ! grep "^From: F R Om <from@example.com>\$" hdrs ··· 274 274 test_expect_success '--no-to overrides config.to' ' 275 275 git config --replace-all format.to \ 276 276 "R E Cipient <rcipient@example.com>" && 277 - git format-patch --no-to --stdout master..side >patch10 && 277 + git format-patch --no-to --stdout main..side >patch10 && 278 278 sed -e "/^\$/q" patch10 >hdrs10 && 279 279 check_patch hdrs10 && 280 280 ! grep "^To: R E Cipient <rcipient@example.com>\$" hdrs10 ··· 284 284 git config --replace-all format.to \ 285 285 "Someone <someone@out.there>" && 286 286 git format-patch --no-to --to="Someone Else <else@out.there>" \ 287 - --stdout master..side >patch11 && 287 + --stdout main..side >patch11 && 288 288 sed -e "/^\$/q" patch11 >hdrs11 && 289 289 check_patch hdrs11 && 290 290 ! grep "^To: Someone <someone@out.there>\$" hdrs11 && ··· 294 294 test_expect_success '--no-cc overrides config.cc' ' 295 295 git config --replace-all format.cc \ 296 296 "C E Cipient <rcipient@example.com>" && 297 - git format-patch --no-cc --stdout master..side >patch12 && 297 + git format-patch --no-cc --stdout main..side >patch12 && 298 298 sed -e "/^\$/q" patch12 >hdrs12 && 299 299 check_patch hdrs12 && 300 300 ! grep "^Cc: C E Cipient <rcipient@example.com>\$" hdrs12 ··· 303 303 test_expect_success '--no-add-header overrides config.headers' ' 304 304 git config --replace-all format.headers \ 305 305 "Header1: B E Cipient <rcipient@example.com>" && 306 - git format-patch --no-add-header --stdout master..side >patch13 && 306 + git format-patch --no-add-header --stdout main..side >patch13 && 307 307 sed -e "/^\$/q" patch13 >hdrs13 && 308 308 check_patch hdrs13 && 309 309 ! grep "^Header1: B E Cipient <rcipient@example.com>\$" hdrs13 ··· 312 312 test_expect_success 'multiple files' ' 313 313 rm -rf patches/ && 314 314 git checkout side && 315 - git format-patch -o patches/ master && 315 + git format-patch -o patches/ main && 316 316 ls patches/0001-Side-changes-1.patch patches/0002-Side-changes-2.patch patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch 317 317 ' 318 318 319 319 test_expect_success 'reroll count' ' 320 320 rm -fr patches && 321 - git format-patch -o patches --cover-letter --reroll-count 4 master..side >list && 321 + git format-patch -o patches --cover-letter --reroll-count 4 main..side >list && 322 322 ! grep -v "^patches/v4-000[0-3]-" list && 323 323 sed -n -e "/^Subject: /p" $(cat list) >subjects && 324 324 ! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects ··· 326 326 327 327 test_expect_success 'reroll count (-v)' ' 328 328 rm -fr patches && 329 - git format-patch -o patches --cover-letter -v4 master..side >list && 329 + git format-patch -o patches --cover-letter -v4 main..side >list && 330 330 ! grep -v "^patches/v4-000[0-3]-" list && 331 331 sed -n -e "/^Subject: /p" $(cat list) >subjects && 332 332 ! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects ··· 362 362 363 363 test_expect_success 'no threading' ' 364 364 git checkout side && 365 - check_threading expect.no-threading master 365 + check_threading expect.no-threading main 366 366 ' 367 367 368 368 cat >expect.thread <<EOF ··· 379 379 EOF 380 380 381 381 test_expect_success 'thread' ' 382 - check_threading expect.thread --thread master 382 + check_threading expect.thread --thread main 383 383 ' 384 384 385 385 cat >expect.in-reply-to <<EOF ··· 399 399 400 400 test_expect_success 'thread in-reply-to' ' 401 401 check_threading expect.in-reply-to --in-reply-to="<test.message>" \ 402 - --thread master 402 + --thread main 403 403 ' 404 404 405 405 cat >expect.cover-letter <<EOF ··· 420 420 EOF 421 421 422 422 test_expect_success 'thread cover-letter' ' 423 - check_threading expect.cover-letter --cover-letter --thread master 423 + check_threading expect.cover-letter --cover-letter --thread main 424 424 ' 425 425 426 426 cat >expect.cl-irt <<EOF ··· 447 447 448 448 test_expect_success 'thread cover-letter in-reply-to' ' 449 449 check_threading expect.cl-irt --cover-letter \ 450 - --in-reply-to="<test.message>" --thread master 450 + --in-reply-to="<test.message>" --thread main 451 451 ' 452 452 453 453 test_expect_success 'thread explicit shallow' ' 454 454 check_threading expect.cl-irt --cover-letter \ 455 - --in-reply-to="<test.message>" --thread=shallow master 455 + --in-reply-to="<test.message>" --thread=shallow main 456 456 ' 457 457 458 458 cat >expect.deep <<EOF ··· 470 470 EOF 471 471 472 472 test_expect_success 'thread deep' ' 473 - check_threading expect.deep --thread=deep master 473 + check_threading expect.deep --thread=deep main 474 474 ' 475 475 476 476 cat >expect.deep-irt <<EOF ··· 493 493 494 494 test_expect_success 'thread deep in-reply-to' ' 495 495 check_threading expect.deep-irt --thread=deep \ 496 - --in-reply-to="<test.message>" master 496 + --in-reply-to="<test.message>" main 497 497 ' 498 498 499 499 cat >expect.deep-cl <<EOF ··· 517 517 EOF 518 518 519 519 test_expect_success 'thread deep cover-letter' ' 520 - check_threading expect.deep-cl --cover-letter --thread=deep master 520 + check_threading expect.deep-cl --cover-letter --thread=deep main 521 521 ' 522 522 523 523 cat >expect.deep-cl-irt <<EOF ··· 547 547 548 548 test_expect_success 'thread deep cover-letter in-reply-to' ' 549 549 check_threading expect.deep-cl-irt --cover-letter \ 550 - --in-reply-to="<test.message>" --thread=deep master 550 + --in-reply-to="<test.message>" --thread=deep main 551 551 ' 552 552 553 553 test_expect_success 'thread via config' ' 554 554 test_config format.thread true && 555 - check_threading expect.thread master 555 + check_threading expect.thread main 556 556 ' 557 557 558 558 test_expect_success 'thread deep via config' ' 559 559 test_config format.thread deep && 560 - check_threading expect.deep master 560 + check_threading expect.deep main 561 561 ' 562 562 563 563 test_expect_success 'thread config + override' ' 564 564 test_config format.thread deep && 565 - check_threading expect.thread --thread master 565 + check_threading expect.thread --thread main 566 566 ' 567 567 568 568 test_expect_success 'thread config + --no-thread' ' 569 569 test_config format.thread deep && 570 - check_threading expect.no-threading --no-thread master 570 + check_threading expect.no-threading --no-thread main 571 571 ' 572 572 573 573 test_expect_success 'excessive subject' ' ··· 580 580 after=$(git rev-parse --short $after) && 581 581 git update-index file && 582 582 git commit -m "This is an excessively long subject line for a message due to the habit some projects have of not having a short, one-line subject at the start of the commit message, but rather sticking a whole paragraph right at the start as the only thing in the commit message. It had better not become the filename for the patch." && 583 - git format-patch -o patches/ master..side && 583 + git format-patch -o patches/ main..side && 584 584 ls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch 585 585 ' 586 586 ··· 842 842 ' 843 843 844 844 test_expect_success 'format-patch --numstat should produce a patch' ' 845 - git format-patch --numstat --stdout master..side >output && 845 + git format-patch --numstat --stdout main..side >output && 846 846 grep "^diff --git a/" output >diff && 847 847 test_line_count = 5 diff 848 848 ' 849 849 850 850 test_expect_success 'format-patch -- <path>' ' 851 - git format-patch master..side -- file 2>error && 851 + git format-patch main..side -- file 2>error && 852 852 ! grep "Use .--" error 853 853 ' 854 854 ··· 1622 1622 test_config branch.rebuild-1.description "config subject 1623 1623 1624 1624 body" && 1625 - test_must_fail git format-patch --cover-letter --cover-from-description garbage master && 1625 + test_must_fail git format-patch --cover-letter --cover-from-description garbage main && 1626 1626 test_config format.coverFromDescription garbage && 1627 - test_must_fail git format-patch --cover-letter master 1627 + test_must_fail git format-patch --cover-letter main 1628 1628 ' 1629 1629 1630 1630 test_expect_success 'cover letter with format.coverFromDescription = default' ' ··· 1633 1633 body" && 1634 1634 test_config format.coverFromDescription default && 1635 1635 git checkout rebuild-1 && 1636 - git format-patch --stdout --cover-letter master >actual && 1636 + git format-patch --stdout --cover-letter main >actual && 1637 1637 grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual && 1638 1638 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1639 1639 grep "^config subject$" actual && ··· 1645 1645 1646 1646 body" && 1647 1647 git checkout rebuild-1 && 1648 - git format-patch --stdout --cover-letter --cover-from-description default master >actual && 1648 + git format-patch --stdout --cover-letter --cover-from-description default main >actual && 1649 1649 grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual && 1650 1650 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1651 1651 grep "^config subject$" actual && ··· 1658 1658 body" && 1659 1659 test_config format.coverFromDescription none && 1660 1660 git checkout rebuild-1 && 1661 - git format-patch --stdout --cover-letter master >actual && 1661 + git format-patch --stdout --cover-letter main >actual && 1662 1662 grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual && 1663 1663 grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1664 1664 ! grep "^config subject$" actual && ··· 1670 1670 1671 1671 body" && 1672 1672 git checkout rebuild-1 && 1673 - git format-patch --stdout --cover-letter --cover-from-description none master >actual && 1673 + git format-patch --stdout --cover-letter --cover-from-description none main >actual && 1674 1674 grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual && 1675 1675 grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1676 1676 ! grep "^config subject$" actual && ··· 1683 1683 body" && 1684 1684 test_config format.coverFromDescription message && 1685 1685 git checkout rebuild-1 && 1686 - git format-patch --stdout --cover-letter master >actual && 1686 + git format-patch --stdout --cover-letter main >actual && 1687 1687 grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual && 1688 1688 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1689 1689 grep "^config subject$" actual && ··· 1695 1695 1696 1696 body" && 1697 1697 git checkout rebuild-1 && 1698 - git format-patch --stdout --cover-letter --cover-from-description message master >actual && 1698 + git format-patch --stdout --cover-letter --cover-from-description message main >actual && 1699 1699 grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual && 1700 1700 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1701 1701 grep "^config subject$" actual && ··· 1708 1708 body" && 1709 1709 test_config format.coverFromDescription subject && 1710 1710 git checkout rebuild-1 && 1711 - git format-patch --stdout --cover-letter master >actual && 1711 + git format-patch --stdout --cover-letter main >actual && 1712 1712 grep "^Subject: \[PATCH 0/2\] config subject$" actual && 1713 1713 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1714 1714 ! grep "^config subject$" actual && ··· 1720 1720 1721 1721 body" && 1722 1722 git checkout rebuild-1 && 1723 - git format-patch --stdout --cover-letter --cover-from-description subject master >actual && 1723 + git format-patch --stdout --cover-letter --cover-from-description subject main >actual && 1724 1724 grep "^Subject: \[PATCH 0/2\] config subject$" actual && 1725 1725 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1726 1726 ! grep "^config subject$" actual && ··· 1733 1733 body" && 1734 1734 test_config format.coverFromDescription auto && 1735 1735 git checkout rebuild-1 && 1736 - git format-patch --stdout --cover-letter master >actual && 1736 + git format-patch --stdout --cover-letter main >actual && 1737 1737 grep "^Subject: \[PATCH 0/2\] config subject$" actual && 1738 1738 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1739 1739 ! grep "^config subject$" actual && ··· 1745 1745 1746 1746 body" && 1747 1747 git checkout rebuild-1 && 1748 - git format-patch --stdout --cover-letter --cover-from-description auto master >actual && 1748 + git format-patch --stdout --cover-letter --cover-from-description auto main >actual && 1749 1749 grep "^Subject: \[PATCH 0/2\] config subject$" actual && 1750 1750 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1751 1751 ! grep "^config subject$" actual && ··· 1758 1758 body" && 1759 1759 test_config format.coverFromDescription auto && 1760 1760 git checkout rebuild-1 && 1761 - git format-patch --stdout --cover-letter master >actual && 1761 + git format-patch --stdout --cover-letter main >actual && 1762 1762 grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual && 1763 1763 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1764 1764 grep "^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$" actual && ··· 1770 1770 1771 1771 body" && 1772 1772 git checkout rebuild-1 && 1773 - git format-patch --stdout --cover-letter --cover-from-description auto master >actual && 1773 + git format-patch --stdout --cover-letter --cover-from-description auto main >actual && 1774 1774 grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual && 1775 1775 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1776 1776 grep "^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$" actual && ··· 1783 1783 body" && 1784 1784 test_config format.coverFromDescription none && 1785 1785 git checkout rebuild-1 && 1786 - git format-patch --stdout --cover-letter --cover-from-description subject master >actual && 1786 + git format-patch --stdout --cover-letter --cover-from-description subject main >actual && 1787 1787 grep "^Subject: \[PATCH 0/2\] config subject$" actual && 1788 1788 ! grep "^\*\*\* BLURB HERE \*\*\*$" actual && 1789 1789 ! grep "^config subject$" actual && ··· 1793 1793 test_expect_success 'cover letter using branch description (1)' ' 1794 1794 git checkout rebuild-1 && 1795 1795 test_config branch.rebuild-1.description hello && 1796 - git format-patch --stdout --cover-letter master >actual && 1796 + git format-patch --stdout --cover-letter main >actual && 1797 1797 grep hello actual 1798 1798 ' 1799 1799 ··· 1807 1807 test_expect_success 'cover letter using branch description (3)' ' 1808 1808 git checkout rebuild-1 && 1809 1809 test_config branch.rebuild-1.description hello && 1810 - git format-patch --stdout --cover-letter ^master rebuild-1 >actual && 1810 + git format-patch --stdout --cover-letter ^main rebuild-1 >actual && 1811 1811 grep hello actual 1812 1812 ' 1813 1813 1814 1814 test_expect_success 'cover letter using branch description (4)' ' 1815 1815 git checkout rebuild-1 && 1816 1816 test_config branch.rebuild-1.description hello && 1817 - git format-patch --stdout --cover-letter master.. >actual && 1817 + git format-patch --stdout --cover-letter main.. >actual && 1818 1818 grep hello actual 1819 1819 ' 1820 1820 ··· 1881 1881 1882 1882 test_expect_success 'format-patch -o with no leading directories' ' 1883 1883 rm -fr patches && 1884 - git format-patch -o patches master..side && 1885 - count=$(git rev-list --count master..side) && 1884 + git format-patch -o patches main..side && 1885 + count=$(git rev-list --count main..side) && 1886 1886 ls patches >list && 1887 1887 test_line_count = $count list 1888 1888 ' ··· 1890 1890 test_expect_success 'format-patch -o with leading existing directories' ' 1891 1891 rm -rf existing-dir && 1892 1892 mkdir existing-dir && 1893 - git format-patch -o existing-dir/patches master..side && 1894 - count=$(git rev-list --count master..side) && 1893 + git format-patch -o existing-dir/patches main..side && 1894 + count=$(git rev-list --count main..side) && 1895 1895 ls existing-dir/patches >list && 1896 1896 test_line_count = $count list 1897 1897 ' 1898 1898 1899 1899 test_expect_success 'format-patch -o with leading non-existing directories' ' 1900 1900 rm -rf non-existing-dir && 1901 - git format-patch -o non-existing-dir/patches master..side && 1902 - count=$(git rev-list --count master..side) && 1901 + git format-patch -o non-existing-dir/patches main..side && 1902 + count=$(git rev-list --count main..side) && 1903 1903 test_path_is_dir non-existing-dir && 1904 1904 ls non-existing-dir/patches >list && 1905 1905 test_line_count = $count list ··· 1908 1908 test_expect_success 'format-patch format.outputDirectory option' ' 1909 1909 test_config format.outputDirectory patches && 1910 1910 rm -fr patches && 1911 - git format-patch master..side && 1912 - count=$(git rev-list --count master..side) && 1911 + git format-patch main..side && 1912 + count=$(git rev-list --count main..side) && 1913 1913 ls patches >list && 1914 1914 test_line_count = $count list 1915 1915 ' ··· 1917 1917 test_expect_success 'format-patch -o overrides format.outputDirectory' ' 1918 1918 test_config format.outputDirectory patches && 1919 1919 rm -fr patches patchset && 1920 - git format-patch master..side -o patchset && 1920 + git format-patch main..side -o patchset && 1921 1921 test_path_is_missing patches && 1922 1922 test_path_is_dir patchset 1923 1923 ' ··· 2014 2014 # ------------W 2015 2015 # 2016 2016 # If "format-patch Z..X" is given, P and Z can not be specified as the base commit 2017 - git checkout -b topic1 master && 2017 + git checkout -b topic1 main && 2018 2018 git rev-parse HEAD >commit-id-base && 2019 2019 test_commit P && 2020 2020 git rev-parse HEAD >commit-id-P && 2021 2021 test_commit Z && 2022 2022 git rev-parse HEAD >commit-id-Z && 2023 2023 test_commit Y && 2024 - git checkout -b topic2 master && 2024 + git checkout -b topic2 main && 2025 2025 test_commit W && 2026 2026 git merge topic1 && 2027 2027 test_commit X && ··· 2034 2034 ' 2035 2035 2036 2036 test_expect_success 'format-patch --base=auto' ' 2037 - git checkout -b upstream master && 2037 + git checkout -b upstream main && 2038 2038 git checkout -b local upstream && 2039 2039 git branch --set-upstream-to=upstream && 2040 2040 test_commit N1 && ··· 2055 2055 # \ / \ 2056 2056 # C---M2---E 2057 2057 # 2058 - git checkout master && 2058 + git checkout main && 2059 2059 test_commit A && 2060 - git checkout -b xb master && 2060 + git checkout -b xb main && 2061 2061 test_commit B && 2062 - git checkout -b xc master && 2062 + git checkout -b xc main && 2063 2063 test_commit C && 2064 2064 git checkout -b xbc xb -- && 2065 2065 git merge xc && ··· 2179 2179 ' 2180 2180 2181 2181 test_expect_success 'interdiff: setup' ' 2182 - git checkout -b boop master && 2182 + git checkout -b boop main && 2183 2183 test_commit fnorp blorp && 2184 2184 test_commit fleep blorp 2185 2185 '
+2 -2
t/t4017-diff-retval.sh
··· 2 2 3 3 test_description='Return value of diffs' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 114 114 git checkout HEAD^ && 115 115 echo binary >>b && 116 116 git commit -m "side" b && 117 - test_must_fail git merge master && 117 + test_must_fail git merge main && 118 118 git add b && 119 119 test_expect_code 2 git --no-pager diff --cached --check >test.out && 120 120 test 3 = $(grep "conflict marker" test.out | wc -l) &&
+8 -8
t/t4038-diff-combined.sh
··· 2 2 3 3 test_description='combined diff' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 118 118 ' 119 119 120 120 test_expect_success 'setup combined ignore spaces' ' 121 - git checkout master && 121 + git checkout main && 122 122 >test && 123 123 git add test && 124 124 git commit -m initial && ··· 146 146 EOF 147 147 git commit -m "test other space changes" -a && 148 148 149 - test_must_fail git merge master && 149 + test_must_fail git merge main && 150 150 tr -d Q <<-\EOF >test && 151 151 eol spaces Q 152 152 space change ··· 407 407 test_expect_success 'combine diff gets tree sorting right' ' 408 408 # create a directory and a file that sort differently in trees 409 409 # versus byte-wise (implied "/" sorts after ".") 410 - git checkout -f master && 410 + git checkout -f main && 411 411 mkdir foo && 412 412 echo base >foo/one && 413 413 echo base >foo/two && ··· 417 417 418 418 # one side modifies a file in the directory, along with the root 419 419 # file... 420 - echo master >foo/one && 421 - echo master >foo.ext && 422 - git commit -a -m master && 420 + echo main >foo/one && 421 + echo main >foo.ext && 422 + git commit -a -m main && 423 423 424 424 # the other side modifies the other file in the directory 425 425 git checkout -b other HEAD^ && ··· 429 429 # And now we merge. The files in the subdirectory will resolve cleanly, 430 430 # meaning that a combined diff will not find them interesting. But it 431 431 # will find the tree itself interesting, because it had to be merged. 432 - git checkout master && 432 + git checkout main && 433 433 git merge other && 434 434 435 435 printf "MM\tfoo\n" >expect &&
+2 -2
t/t4041-diff-submodule-option.sh
··· 9 9 This test tries to verify the sanity of the --submodule option of git diff. 10 10 ' 11 11 12 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 12 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 13 13 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 14 14 15 15 . ./test-lib.sh ··· 541 541 (cd super && 542 542 (cd sub && 543 543 git fetch && 544 - git checkout origin/master 544 + git checkout origin/main 545 545 ) && 546 546 git diff --submodule > ../actual 547 547 ) &&
+6 -6
t/t4048-diff-combined-binary.sh
··· 1 1 #!/bin/sh 2 2 3 3 test_description='combined and merge diff handle binary files and textconv' 4 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 4 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 6 7 7 . ./test-lib.sh ··· 17 17 echo threeQ3 | q_to_nul >binary && 18 18 git commit -a -m three && 19 19 three=$(git rev-parse --short HEAD:binary) && 20 - test_must_fail git merge master && 20 + test_must_fail git merge main && 21 21 echo resolvedQhooray | q_to_nul >binary && 22 22 git commit -a -m resolved && 23 23 res=$(git rev-parse --short HEAD:binary) ··· 65 65 ' 66 66 67 67 test_expect_success 'setup non-binary with binary attribute' ' 68 - git checkout master && 68 + git checkout main && 69 69 test_commit one text && 70 70 test_commit two text && 71 71 two=$(git rev-parse --short HEAD:text) && 72 72 git checkout -b branch-text HEAD^ && 73 73 test_commit three text && 74 74 three=$(git rev-parse --short HEAD:text) && 75 - test_must_fail git merge master && 75 + test_must_fail git merge main && 76 76 test_commit resolved text && 77 77 res=$(git rev-parse --short HEAD:text) && 78 78 echo text -diff >.gitattributes ··· 209 209 +THREE 210 210 ++======= 211 211 + TWO 212 - ++>>>>>>> MASTER 212 + ++>>>>>>> MAIN 213 213 EOF 214 214 test_expect_success 'diff --cc respects textconv on worktree file' ' 215 215 git reset --hard HEAD^ && 216 - test_must_fail git merge master && 216 + test_must_fail git merge main && 217 217 git diff >actual && 218 218 test_cmp expect actual 219 219 '
+3 -3
t/t4052-stat-output.sh
··· 5 5 6 6 test_description='test --stat output of various commands' 7 7 8 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 8 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 10 11 11 . ./test-lib.sh ··· 356 356 EOF 357 357 test_expect_success 'merge --stat respects COLUMNS (big change)' ' 358 358 git checkout -b branch HEAD^^ && 359 - COLUMNS=100 git merge --stat --no-ff master^ >output && 359 + COLUMNS=100 git merge --stat --no-ff main^ >output && 360 360 grep " | " output >actual && 361 361 test_cmp expect actual 362 362 ' ··· 365 365 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++ 366 366 EOF 367 367 test_expect_success 'merge --stat respects COLUMNS (long filename)' ' 368 - COLUMNS=100 git merge --stat --no-ff master >output && 368 + COLUMNS=100 git merge --stat --no-ff main >output && 369 369 grep " | " output >actual && 370 370 test_cmp expect actual 371 371 '
+2 -2
t/t4056-diff-order.sh
··· 2 2 3 3 test_description='diff order' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 109 109 test_expect_success 'setup for testing combine-diff order' ' 110 110 git checkout -b tmp HEAD~ && 111 111 create_files 3 && 112 - git checkout master && 112 + git checkout main && 113 113 git merge --no-commit -s ours tmp && 114 114 create_files 5 115 115 '
+11 -11
t/t4057-diff-combined-paths.sh
··· 2 2 3 3 test_description='combined diff show only paths that are different to all parents' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 27 27 echo $i/2 >>$i.txt 28 28 done && 29 29 git commit -a -m "side 2-9" && 30 - git checkout master && 30 + git checkout main && 31 31 echo 1/2 >1.txt && 32 - git commit -a -m "master 1" && 32 + git commit -a -m "main 1" && 33 33 git merge side && 34 34 >diffc.expect && 35 35 diffc_verify ··· 44 44 done && 45 45 echo "4side" >>4.txt && 46 46 git commit -a -m "side 2-9 +4" && 47 - git checkout master && 47 + git checkout main && 48 48 for i in $(test_seq 1 9) 49 49 do 50 50 echo $i/3 >>$i.txt 51 51 done && 52 - echo "4master" >>4.txt && 53 - git commit -a -m "master 1-9 +4" && 52 + echo "4main" >>4.txt && 53 + git commit -a -m "main 1-9 +4" && 54 54 test_must_fail git merge side && 55 55 cat <<-\EOF >4.txt && 56 56 4 57 57 4/2 58 58 4/3 59 - 4master 59 + 4main 60 60 4side 61 61 EOF 62 62 git add 4.txt && ··· 72 72 echo $i/4 >>$i.txt 73 73 done && 74 74 git commit -a -m "side 5-9" && 75 - git checkout master && 75 + git checkout main && 76 76 for i in $(test_seq 1 3) 77 77 do 78 78 echo $i/4 >>$i.txt 79 79 done && 80 - git commit -a -m "master 1-3 +4hello" && 80 + git commit -a -m "main 1-3 +4hello" && 81 81 git merge side && 82 82 echo "Hello World" >4hello.txt && 83 83 git add 4hello.txt && ··· 93 93 echo $i/5 >>$i.txt 94 94 done && 95 95 git commit -a -m "side 5-9" && 96 - git checkout master && 96 + git checkout main && 97 97 for i in $(test_seq 1 3) 98 98 do 99 99 echo $i/4 >>$i.txt 100 100 done && 101 - git commit -a -m "master 1-3" && 101 + git commit -a -m "main 1-3" && 102 102 git merge side && 103 103 git rm 4.txt && 104 104 git commit --amend &&
+13 -13
t/t4061-diff-indent.sh
··· 3 3 test_description='Test diff indent heuristic. 4 4 5 5 ' 6 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 6 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 7 7 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 8 8 9 9 . ./test-lib.sh ··· 269 269 git reset --soft HEAD~ && 270 270 git diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted && 271 271 compare_diff spaces-compacted-expect out-diff-index-compacted && 272 - git checkout -f master 272 + git checkout -f main 273 273 ' 274 274 275 275 test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' ' ··· 277 277 git reset --soft HEAD~ && 278 278 git -c diff.indentHeuristic=true diff-index -p old -- spaces.txt >out-diff-index-compacted2 && 279 279 compare_diff spaces-compacted-expect out-diff-index-compacted2 && 280 - git checkout -f master 280 + git checkout -f main 281 281 ' 282 282 283 283 test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' ' ··· 285 285 git reset --soft HEAD~ && 286 286 git diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index && 287 287 compare_diff spaces-expect out-diff-index && 288 - git checkout -f master 288 + git checkout -f main 289 289 ' 290 290 291 291 test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' ' ··· 293 293 git reset --soft HEAD~ && 294 294 git -c diff.indentHeuristic=false diff-index -p old -- spaces.txt >out-diff-index2 && 295 295 compare_diff spaces-expect out-diff-index2 && 296 - git checkout -f master 296 + git checkout -f main 297 297 ' 298 298 299 299 test_expect_success 'diff-index: --indent-heuristic overrides config' ' ··· 301 301 git reset --soft HEAD~ && 302 302 git -c diff.indentHeuristic=false diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted3 && 303 303 compare_diff spaces-compacted-expect out-diff-index-compacted3 && 304 - git checkout -f master 304 + git checkout -f main 305 305 ' 306 306 307 307 test_expect_success 'diff-index: --no-indent-heuristic overrides config' ' ··· 309 309 git reset --soft HEAD~ && 310 310 git -c diff.indentHeuristic=true diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index3 && 311 311 compare_diff spaces-expect out-diff-index3 && 312 - git checkout -f master 312 + git checkout -f main 313 313 ' 314 314 315 315 # --- diff-files tests ---------------------------------------------------- ··· 320 320 git diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw && 321 321 grep -v index out-diff-files-raw >out-diff-files-compacted && 322 322 compare_diff spaces-compacted-expect out-diff-files-compacted && 323 - git checkout -f master 323 + git checkout -f main 324 324 ' 325 325 326 326 test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' ' ··· 329 329 git -c diff.indentHeuristic=true diff-files -p spaces.txt >out-diff-files-raw2 && 330 330 grep -v index out-diff-files-raw2 >out-diff-files-compacted2 && 331 331 compare_diff spaces-compacted-expect out-diff-files-compacted2 && 332 - git checkout -f master 332 + git checkout -f main 333 333 ' 334 334 335 335 test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' ' ··· 338 338 git diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw && 339 339 grep -v index out-diff-files-raw >out-diff-files && 340 340 compare_diff spaces-expect out-diff-files && 341 - git checkout -f master 341 + git checkout -f main 342 342 ' 343 343 344 344 test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' ' ··· 347 347 git -c diff.indentHeuristic=false diff-files -p spaces.txt >out-diff-files-raw2 && 348 348 grep -v index out-diff-files-raw2 >out-diff-files && 349 349 compare_diff spaces-expect out-diff-files && 350 - git checkout -f master 350 + git checkout -f main 351 351 ' 352 352 353 353 test_expect_success 'diff-files: --indent-heuristic overrides config' ' ··· 356 356 git -c diff.indentHeuristic=false diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw3 && 357 357 grep -v index out-diff-files-raw3 >out-diff-files-compacted && 358 358 compare_diff spaces-compacted-expect out-diff-files-compacted && 359 - git checkout -f master 359 + git checkout -f main 360 360 ' 361 361 362 362 test_expect_success 'diff-files: --no-indent-heuristic overrides config' ' ··· 365 365 git -c diff.indentHeuristic=true diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw4 && 366 366 grep -v index out-diff-files-raw4 >out-diff-files && 367 367 compare_diff spaces-expect out-diff-files && 368 - git checkout -f master 368 + git checkout -f main 369 369 ' 370 370 371 371 test_done
+2 -2
t/t4066-diff-emit-delay.sh
··· 1 1 #!/bin/sh 2 2 3 3 test_description='test combined/stat/moved interaction' 4 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 4 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 6 7 7 . ./test-lib.sh ··· 16 16 test_commit B && 17 17 git checkout -b side HEAD^ && 18 18 test_commit C && 19 - git merge -m M master && 19 + git merge -m M main && 20 20 test_commit D 21 21 ' 22 22
+25 -25
t/t4068-diff-symmetric-merge-base.sh
··· 2 2 3 3 test_description='behavior of diff with symmetric-diff setups and --merge-base' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh 9 9 10 10 # build these situations: 11 11 # - normal merge with one merge base (br1...b2r); 12 - # - criss-cross merge ie 2 merge bases (br1...master); 13 - # - disjoint subgraph (orphan branch, br3...master). 12 + # - criss-cross merge ie 2 merge bases (br1...main); 13 + # - disjoint subgraph (orphan branch, br3...main). 14 14 # 15 - # B---E <-- master 15 + # B---E <-- main 16 16 # / \ / 17 17 # A X 18 18 # \ / \ ··· 35 35 git add c && 36 36 git commit -m C && 37 37 git tag commit-C && 38 - git merge -m D master && 38 + git merge -m D main && 39 39 git tag commit-D && 40 - git checkout master && 40 + git checkout main && 41 41 git merge -m E commit-C && 42 42 git checkout -b br2 commit-C && 43 43 echo f >f && ··· 61 61 # It should have one of those two, which comes out 62 62 # to seven lines. 63 63 test_expect_success 'diff with two merge bases' ' 64 - git diff br1...master >tmp 2>err && 64 + git diff br1...main >tmp 2>err && 65 65 test_line_count = 7 tmp && 66 66 test_line_count = 1 err 67 67 ' ··· 72 72 ' 73 73 74 74 test_expect_success 'diff with too many symmetric differences' ' 75 - test_must_fail git diff br1...master br2...br3 2>err && 75 + test_must_fail git diff br1...main br2...br3 2>err && 76 76 test_i18ngrep "usage" err 77 77 ' 78 78 79 79 test_expect_success 'diff with symmetric difference and extraneous arg' ' 80 - test_must_fail git diff master br1...master 2>err && 80 + test_must_fail git diff main br1...main 2>err && 81 81 test_i18ngrep "usage" err 82 82 ' 83 83 84 84 test_expect_success 'diff with two ranges' ' 85 - test_must_fail git diff master br1..master br2..br3 2>err && 85 + test_must_fail git diff main br1..main br2..br3 2>err && 86 86 test_i18ngrep "usage" err 87 87 ' 88 88 89 89 test_expect_success 'diff with ranges and extra arg' ' 90 - test_must_fail git diff master br1..master commit-D 2>err && 90 + test_must_fail git diff main br1..main commit-D 2>err && 91 91 test_i18ngrep "usage" err 92 92 ' 93 93 ··· 96 96 ' 97 97 98 98 test_expect_success 'diff --merge-base with three commits' ' 99 - test_must_fail git diff --merge-base br1 br2 master 2>err && 99 + test_must_fail git diff --merge-base br1 br2 main 2>err && 100 100 test_i18ngrep "usage" err 101 101 ' 102 102 103 103 for cmd in diff-index diff 104 104 do 105 105 test_expect_success "$cmd --merge-base with one commit" ' 106 - git checkout master && 106 + git checkout main && 107 107 git $cmd commit-C >expect && 108 108 git $cmd --merge-base br2 >actual && 109 109 test_cmp expect actual 110 110 ' 111 111 112 112 test_expect_success "$cmd --merge-base with one commit and unstaged changes" ' 113 - git checkout master && 113 + git checkout main && 114 114 test_when_finished git reset --hard && 115 115 echo unstaged >>c && 116 116 git $cmd commit-C >expect && ··· 119 119 ' 120 120 121 121 test_expect_success "$cmd --merge-base with one commit and staged and unstaged changes" ' 122 - git checkout master && 122 + git checkout main && 123 123 test_when_finished git reset --hard && 124 124 echo staged >>c && 125 125 git add c && ··· 130 130 ' 131 131 132 132 test_expect_success "$cmd --merge-base --cached with one commit and staged and unstaged changes" ' 133 - git checkout master && 133 + git checkout main && 134 134 test_when_finished git reset --hard && 135 135 echo staged >>c && 136 136 git add c && ··· 141 141 ' 142 142 143 143 test_expect_success "$cmd --merge-base with non-commit" ' 144 - git checkout master && 145 - test_must_fail git $cmd --merge-base master^{tree} 2>err && 144 + git checkout main && 145 + test_must_fail git $cmd --merge-base main^{tree} 2>err && 146 146 test_i18ngrep "fatal: --merge-base only works with commits" err 147 147 ' 148 148 149 149 test_expect_success "$cmd --merge-base with no merge bases and one commit" ' 150 - git checkout master && 150 + git checkout main && 151 151 test_must_fail git $cmd --merge-base br3 2>err && 152 152 test_i18ngrep "fatal: no merge base found" err 153 153 ' 154 154 155 155 test_expect_success "$cmd --merge-base with multiple merge bases and one commit" ' 156 - git checkout master && 156 + git checkout main && 157 157 test_must_fail git $cmd --merge-base br1 2>err && 158 158 test_i18ngrep "fatal: multiple merge bases found" err 159 159 ' ··· 162 162 for cmd in diff-tree diff 163 163 do 164 164 test_expect_success "$cmd --merge-base with two commits" ' 165 - git $cmd commit-C master >expect && 166 - git $cmd --merge-base br2 master >actual && 165 + git $cmd commit-C main >expect && 166 + git $cmd --merge-base br2 main >actual && 167 167 test_cmp expect actual 168 168 ' 169 169 170 170 test_expect_success "$cmd --merge-base commit and non-commit" ' 171 - test_must_fail git $cmd --merge-base br2 master^{tree} 2>err && 171 + test_must_fail git $cmd --merge-base br2 main^{tree} 2>err && 172 172 test_i18ngrep "fatal: --merge-base only works with commits" err 173 173 ' 174 174 ··· 178 178 ' 179 179 180 180 test_expect_success "$cmd --merge-base with multiple merge bases and two commits" ' 181 - test_must_fail git $cmd --merge-base master br1 2>err && 181 + test_must_fail git $cmd --merge-base main br1 2>err && 182 182 test_i18ngrep "fatal: multiple merge bases found" err 183 183 ' 184 184 done 185 185 186 186 test_expect_success 'diff-tree --merge-base with one commit' ' 187 - test_must_fail git diff-tree --merge-base master 2>err && 187 + test_must_fail git diff-tree --merge-base main 2>err && 188 188 test_i18ngrep "fatal: --merge-base only works with two commits" err 189 189 ' 190 190
+19 -19
t/t4103-apply-binary.sh
··· 6 6 test_description='git apply handling binary patches 7 7 8 8 ' 9 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 9 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 10 10 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 11 11 12 12 . ./test-lib.sh ··· 34 34 git update-index --add --remove file1 file2 file3 file4 && 35 35 git commit -m "Second Version" && 36 36 37 - git diff-tree -p master binary >B.diff && 38 - git diff-tree -p -C master binary >C.diff && 37 + git diff-tree -p main binary >B.diff && 38 + git diff-tree -p -C main binary >C.diff && 39 39 40 - git diff-tree -p --binary master binary >BF.diff && 41 - git diff-tree -p --binary -C master binary >CF.diff && 40 + git diff-tree -p --binary main binary >BF.diff && 41 + git diff-tree -p --binary -C main binary >CF.diff && 42 42 43 - git diff-tree -p --full-index master binary >B-index.diff && 44 - git diff-tree -p -C --full-index master binary >C-index.diff && 43 + git diff-tree -p --full-index main binary >B-index.diff && 44 + git diff-tree -p -C --full-index main binary >C-index.diff && 45 45 46 - git diff-tree -p --binary --no-prefix master binary -- file3 >B0.diff && 46 + git diff-tree -p --binary --no-prefix main binary -- file3 >B0.diff && 47 47 48 48 git init other-repo && 49 49 ( 50 50 cd other-repo && 51 - git fetch .. master && 51 + git fetch .. main && 52 52 git reset --hard FETCH_HEAD 53 53 ) 54 54 ' 55 55 56 56 test_expect_success 'stat binary diff -- should not fail.' \ 57 - 'git checkout master && 57 + 'git checkout main && 58 58 git apply --stat --summary B.diff' 59 59 60 60 test_expect_success 'stat binary -p0 diff -- should not fail.' ' 61 - git checkout master && 61 + git checkout main && 62 62 git apply --stat -p0 B0.diff 63 63 ' 64 64 65 65 test_expect_success 'stat binary diff (copy) -- should not fail.' \ 66 - 'git checkout master && 66 + 'git checkout main && 67 67 git apply --stat --summary C.diff' 68 68 69 69 test_expect_success 'check binary diff -- should fail.' \ 70 - 'git checkout master && 70 + 'git checkout main && 71 71 test_must_fail git apply --check B.diff' 72 72 73 73 test_expect_success 'check binary diff (copy) -- should fail.' \ 74 - 'git checkout master && 74 + 'git checkout main && 75 75 test_must_fail git apply --check C.diff' 76 76 77 77 test_expect_success \ 78 78 'check incomplete binary diff with replacement -- should fail.' ' 79 - git checkout master && 79 + git checkout main && 80 80 test_must_fail git apply --check --allow-binary-replacement B.diff 81 81 ' 82 82 83 83 test_expect_success \ 84 84 'check incomplete binary diff with replacement (copy) -- should fail.' ' 85 - git checkout master && 85 + git checkout main && 86 86 test_must_fail git apply --check --allow-binary-replacement C.diff 87 87 ' 88 88 89 89 test_expect_success 'check binary diff with replacement.' \ 90 - 'git checkout master && 90 + 'git checkout main && 91 91 git apply --check --allow-binary-replacement BF.diff' 92 92 93 93 test_expect_success 'check binary diff with replacement (copy).' \ 94 - 'git checkout master && 94 + 'git checkout main && 95 95 git apply --check --allow-binary-replacement CF.diff' 96 96 97 97 # Now we start applying them. ··· 99 99 do_reset () { 100 100 rm -f file? && 101 101 git reset --hard && 102 - git checkout -f master 102 + git checkout -f main 103 103 } 104 104 105 105 test_expect_success 'apply binary diff -- should fail.' \
+8 -8
t/t4108-apply-threeway.sh
··· 2 2 3 3 test_description='git apply --3way' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 27 27 test_tick && 28 28 test_write_lines 1 two 3 4 5 six 7 >one && 29 29 test_write_lines 1 two 3 4 5 6 7 >two && 30 - git commit -a -m master && 30 + git commit -a -m main && 31 31 32 32 git checkout side && 33 33 test_write_lines 1 2 3 4 five 6 7 >one && 34 34 test_write_lines 1 2 3 4 five 6 7 >two && 35 35 git commit -a -m side && 36 36 37 - git checkout master 37 + git checkout main 38 38 ' 39 39 40 40 test_expect_success 'apply without --3way' ' ··· 42 42 43 43 # should fail to apply 44 44 git reset --hard && 45 - git checkout master^0 && 45 + git checkout main^0 && 46 46 test_must_fail git apply --index P.diff && 47 47 # should leave things intact 48 48 git diff-files --exit-code && ··· 55 55 56 56 # The corresponding conflicted merge 57 57 git reset --hard && 58 - git checkout master^0 && 58 + git checkout main^0 && 59 59 test_must_fail git merge --no-commit side && 60 60 git ls-files -s >expect.ls && 61 61 print_sanitized_conflicted_diff >expect.diff && 62 62 63 63 # should fail to apply 64 64 git reset --hard && 65 - git checkout master^0 && 65 + git checkout main^0 && 66 66 test_must_fail git apply --index --3way P.diff && 67 67 git ls-files -s >actual.ls && 68 68 print_sanitized_conflicted_diff >actual.diff && ··· 89 89 90 90 # The corresponding conflicted merge 91 91 git reset --hard && 92 - git checkout master^0 && 92 + git checkout main^0 && 93 93 test_must_fail git merge --no-commit side && 94 94 95 95 # Manually resolve and record the resolution ··· 99 99 100 100 # should fail to apply 101 101 git reset --hard && 102 - git checkout master^0 && 102 + git checkout main^0 && 103 103 test_must_fail git apply --index --3way P.diff && 104 104 105 105 # but rerere should have replayed the recorded resolution
+2 -2
t/t4121-apply-diffs.sh
··· 1 1 #!/bin/sh 2 2 3 3 test_description='git apply for contextually independent diffs' 4 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 4 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 6 7 7 . ./test-lib.sh ··· 26 26 git commit -a -q -m 2 && 27 27 echo 9 >>file && 28 28 git commit -a -q -m 3 && 29 - git checkout master' 29 + git checkout main' 30 30 31 31 test_expect_success \ 32 32 'check if contextually independent diffs for the same file apply' \
+14 -14
t/t4150-am.sh
··· 2 2 3 3 test_description='git am running' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 182 182 test_tick && 183 183 git commit -m "added another file" && 184 184 185 - git format-patch --stdout master >lorem-move.patch && 186 - git format-patch --no-prefix --stdout master >lorem-zero.patch && 185 + git format-patch --stdout main >lorem-move.patch && 186 + git format-patch --no-prefix --stdout main >lorem-zero.patch && 187 187 188 188 git checkout -b rename && 189 189 git mv file renamed && ··· 456 456 git checkout first && 457 457 git am patch2 && 458 458 test_path_is_missing .git/rebase-apply && 459 - test "$(git rev-parse master^^)" = "$(git rev-parse HEAD^^)" && 460 - git diff --exit-code master..HEAD && 461 - git diff --exit-code master^..HEAD^ && 462 - compare author master HEAD && 463 - compare author master^ HEAD^ && 459 + test "$(git rev-parse main^^)" = "$(git rev-parse HEAD^^)" && 460 + git diff --exit-code main..HEAD && 461 + git diff --exit-code main^..HEAD^ && 462 + compare author main HEAD && 463 + compare author main^ HEAD^ && 464 464 test "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" = \ 465 465 "$(git log -1 --pretty=format:"%cn <%ce>" HEAD)" 466 466 ' ··· 762 762 git checkout first && 763 763 cat pine patch1 | git am && 764 764 test_path_is_missing .git/rebase-apply && 765 - git diff --exit-code master^..HEAD 765 + git diff --exit-code main^..HEAD 766 766 ' 767 767 768 768 test_expect_success 'am fails on mail without patch' ' ··· 1115 1115 test_commit sixth && 1116 1116 1117 1117 git checkout test && 1118 - git format-patch --stdout master..HEAD >patches && 1119 - git reset --hard master && 1118 + git format-patch --stdout main..HEAD >patches && 1119 + git reset --hard main && 1120 1120 git am patches && 1121 1121 grep "smudged" a.txt && 1122 1122 1123 1123 git checkout removal && 1124 1124 git reset --hard && 1125 - git format-patch --stdout master..HEAD >patches && 1126 - git reset --hard master && 1125 + git format-patch --stdout main..HEAD >patches && 1126 + git reset --hard main && 1127 1127 git am patches && 1128 1128 grep "clean" a.txt && 1129 1129 1130 1130 git checkout conflict && 1131 1131 git reset --hard && 1132 - git format-patch --stdout master..HEAD >patches && 1132 + git format-patch --stdout main..HEAD >patches && 1133 1133 git reset --hard fourth && 1134 1134 test_must_fail git am -3 patches && 1135 1135 grep "<<<<<<<<<<" a.txt
+11 -11
t/t4200-rerere.sh
··· 8 8 ! [fifth] version1 9 9 ! [first] first 10 10 ! [fourth] version1 11 - ! [master] initial 11 + ! [main] initial 12 12 ! [second] prefer first over second 13 13 ! [third] version2 14 14 ------ ··· 19 19 - [second] prefer first over second 20 20 + + [first] first 21 21 + [second^] second 22 - ++++++ [master] initial 22 + ++++++ [main] initial 23 23 ' 24 24 25 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 25 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 26 26 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 27 27 28 28 . ./test-lib.sh ··· 60 60 test_tick && 61 61 git commit -q -a -m first && 62 62 63 - git checkout -b second master && 63 + git checkout -b second main && 64 64 git show first:a1 | 65 65 sed -e "s/To die, t/To die! T/" -e "s/Some title/Some Title/" >a1 && 66 66 echo "* END *" >>a1 && ··· 171 171 172 172 oldmtimepost=$(test-tool chmtime --get -60 $rr/postimage) && 173 173 174 - git checkout -b third master && 174 + git checkout -b third main && 175 175 git show second^:a1 | sed "s/To die: t/To die! T/" >a1 && 176 176 git commit -q -a -m third && 177 177 ··· 583 583 test_expect_success 'rerere with unexpected conflict markers does not crash' ' 584 584 git reset --hard && 585 585 586 - git checkout -b branch-1 master && 586 + git checkout -b branch-1 main && 587 587 echo "bar" >test && 588 588 git add test && 589 589 git commit -q -m two && 590 590 591 591 git reset --hard && 592 - git checkout -b branch-2 master && 592 + git checkout -b branch-2 main && 593 593 echo "foo" >test && 594 594 git add test && 595 595 git commit -q -a -m one && ··· 604 604 test_expect_success 'rerere with inner conflict markers' ' 605 605 git reset --hard && 606 606 607 - git checkout -b A master && 607 + git checkout -b A main && 608 608 echo "bar" >test && 609 609 git add test && 610 610 git commit -q -m two && ··· 613 613 git commit -q -m three && 614 614 615 615 git reset --hard && 616 - git checkout -b B master && 616 + git checkout -b B main && 617 617 echo "foo" >test && 618 618 git add test && 619 619 git commit -q -a -m one && ··· 654 654 git add original && 655 655 git commit -m original && 656 656 657 - git checkout -b A master && 657 + git checkout -b A main && 658 658 git mv original A && 659 659 git commit -m "rename to A" && 660 660 661 - git checkout -b B master && 661 + git checkout -b B main && 662 662 git mv original B && 663 663 git commit -m "rename to B" 664 664 )
+2 -2
t/t4201-shortlog.sh
··· 6 6 test_description='git shortlog 7 7 ' 8 8 9 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 9 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 10 10 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 11 11 12 12 . ./test-lib.sh ··· 194 194 ' 195 195 196 196 test_expect_success 'shortlog with --output=<file>' ' 197 - git shortlog --output=shortlog -1 master >output && 197 + git shortlog --output=shortlog -1 main >output && 198 198 test_must_be_empty output && 199 199 test_line_count = 3 shortlog 200 200 '
+54 -54
t/t4202-log.sh
··· 2 2 3 3 test_description='git log' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 481 481 git checkout -b side HEAD~4 && 482 482 test_commit side-1 1 1 && 483 483 test_commit side-2 2 2 && 484 - git checkout master && 484 + git checkout main && 485 485 git merge side 486 486 ' 487 487 ··· 544 544 ' 545 545 546 546 test_expect_success 'log --raw --graph -m with merge' ' 547 - git log --raw --graph --oneline -m master | head -n 500 >actual && 547 + git log --raw --graph --oneline -m main | head -n 500 >actual && 548 548 grep "initial" actual 549 549 ' 550 550 551 551 test_expect_success 'diff-tree --graph' ' 552 - git diff-tree --graph master^ | head -n 500 >actual && 552 + git diff-tree --graph main^ | head -n 500 >actual && 553 553 grep "one" actual 554 554 ' 555 555 556 556 cat > expect <<\EOF 557 - * commit master 557 + * commit main 558 558 |\ Merge: A B 559 559 | | Author: A U Thor <author@example.com> 560 560 | | ··· 570 570 | | 571 571 | | side-1 572 572 | | 573 - * | commit master~1 573 + * | commit main~1 574 574 | | Author: A U Thor <author@example.com> 575 575 | | 576 576 | | Second 577 577 | | 578 - * | commit master~2 578 + * | commit main~2 579 579 | | Author: A U Thor <author@example.com> 580 580 | | 581 581 | | sixth 582 582 | | 583 - * | commit master~3 583 + * | commit main~3 584 584 | | Author: A U Thor <author@example.com> 585 585 | | 586 586 | | fifth 587 587 | | 588 - * | commit master~4 588 + * | commit main~4 589 589 |/ Author: A U Thor <author@example.com> 590 590 | 591 591 | fourth ··· 616 616 test_expect_success 'set up more tangled history' ' 617 617 git checkout -b tangle HEAD~6 && 618 618 test_commit tangle-a tangle-a a && 619 - git merge master~3 && 619 + git merge main~3 && 620 620 git merge side~1 && 621 - git checkout master && 621 + git checkout main && 622 622 git merge tangle && 623 623 git checkout -b reach && 624 624 test_commit reach && 625 - git checkout master && 625 + git checkout main && 626 626 git checkout -b octopus-a && 627 627 test_commit octopus-a && 628 - git checkout master && 628 + git checkout main && 629 629 git checkout -b octopus-b && 630 630 test_commit octopus-b && 631 - git checkout master && 631 + git checkout main && 632 632 test_commit seventh && 633 633 git merge octopus-a octopus-b && 634 634 git merge reach ··· 653 653 |\ 654 654 | * Merge branch 'side' (early part) into tangle 655 655 | |\ 656 - | * \ Merge branch 'master' (early part) into tangle 656 + | * \ Merge branch 'main' (early part) into tangle 657 657 | |\ \ 658 658 | * | | tangle-a 659 659 * | | | Merge branch 'side' ··· 797 797 798 798 test_expect_success 'decorate-refs-exclude with glob' ' 799 799 cat >expect.decorate <<-\EOF && 800 - Merge-tag-reach (HEAD -> master) 800 + Merge-tag-reach (HEAD -> main) 801 801 Merge-tags-octopus-a-and-octopus-b 802 802 seventh (tag: seventh) 803 803 octopus-b (tag: octopus-b) ··· 814 814 815 815 test_expect_success 'decorate-refs-exclude without globs' ' 816 816 cat >expect.decorate <<-\EOF && 817 - Merge-tag-reach (HEAD -> master) 817 + Merge-tag-reach (HEAD -> main) 818 818 Merge-tags-octopus-a-and-octopus-b 819 819 seventh (tag: seventh) 820 820 octopus-b (tag: octopus-b, octopus-b) ··· 831 831 832 832 test_expect_success 'multiple decorate-refs-exclude' ' 833 833 cat >expect.decorate <<-\EOF && 834 - Merge-tag-reach (HEAD -> master) 834 + Merge-tag-reach (HEAD -> main) 835 835 Merge-tags-octopus-a-and-octopus-b 836 836 seventh (tag: seventh) 837 837 octopus-b (tag: octopus-b) ··· 854 854 855 855 test_expect_success 'decorate-refs and decorate-refs-exclude' ' 856 856 cat >expect.no-decorate <<-\EOF && 857 - Merge-tag-reach (master) 857 + Merge-tag-reach (main) 858 858 Merge-tags-octopus-a-and-octopus-b 859 859 seventh 860 860 octopus-b ··· 869 869 870 870 test_expect_success 'deocrate-refs and log.excludeDecoration' ' 871 871 cat >expect.decorate <<-\EOF && 872 - Merge-tag-reach (master) 872 + Merge-tag-reach (main) 873 873 Merge-tags-octopus-a-and-octopus-b 874 874 seventh 875 875 octopus-b (octopus-b) ··· 884 884 885 885 test_expect_success 'decorate-refs-exclude and simplify-by-decoration' ' 886 886 cat >expect.decorate <<-\EOF && 887 - Merge-tag-reach (HEAD -> master) 887 + Merge-tag-reach (HEAD -> main) 888 888 reach (tag: reach, reach) 889 889 seventh (tag: seventh) 890 890 Merge-branch-tangle ··· 1083 1083 | |\ \ Merge: MERGE_PARENTS 1084 1084 | | | | Author: A U Thor <author@example.com> 1085 1085 | | | | 1086 - | | | | Merge branch 'master' (early part) into tangle 1086 + | | | | Merge branch 'main' (early part) into tangle 1087 1087 | | | | 1088 1088 | * | | commit COMMIT_OBJECT_NAME 1089 1089 | | | | Author: A U Thor <author@example.com> ··· 1358 1358 *** | |\ \ Merge: MERGE_PARENTS 1359 1359 *** | | | | Author: A U Thor <author@example.com> 1360 1360 *** | | | | 1361 - *** | | | | Merge branch 'master' (early part) into tangle 1361 + *** | | | | Merge branch 'main' (early part) into tangle 1362 1362 *** | | | | 1363 1363 *** | * | | commit COMMIT_OBJECT_NAME 1364 1364 *** | | | | Author: A U Thor <author@example.com> ··· 1591 1591 ' 1592 1592 1593 1593 test_expect_success GPG 'setup signed branch' ' 1594 - test_when_finished "git reset --hard && git checkout master" && 1595 - git checkout -b signed master && 1594 + test_when_finished "git reset --hard && git checkout main" && 1595 + git checkout -b signed main && 1596 1596 echo foo >foo && 1597 1597 git add foo && 1598 1598 git commit -S -m signed_commit 1599 1599 ' 1600 1600 1601 1601 test_expect_success GPG 'setup signed branch with subkey' ' 1602 - test_when_finished "git reset --hard && git checkout master" && 1603 - git checkout -b signed-subkey master && 1602 + test_when_finished "git reset --hard && git checkout main" && 1603 + git checkout -b signed-subkey main && 1604 1604 echo foo >foo && 1605 1605 git add foo && 1606 1606 git commit -SB7227189 -m signed_commit 1607 1607 ' 1608 1608 1609 1609 test_expect_success GPGSM 'setup signed branch x509' ' 1610 - test_when_finished "git reset --hard && git checkout master" && 1611 - git checkout -b signed-x509 master && 1610 + test_when_finished "git reset --hard && git checkout main" && 1611 + git checkout -b signed-x509 main && 1612 1612 echo foo >foo && 1613 1613 git add foo && 1614 1614 test_config gpg.format x509 && ··· 1641 1641 ' 1642 1642 1643 1643 test_expect_success GPG 'log --graph --show-signature for merged tag' ' 1644 - test_when_finished "git reset --hard && git checkout master" && 1645 - git checkout -b plain master && 1644 + test_when_finished "git reset --hard && git checkout main" && 1645 + git checkout -b plain main && 1646 1646 echo aaa >bar && 1647 1647 git add bar && 1648 1648 git commit -m bar_commit && 1649 - git checkout -b tagged master && 1649 + git checkout -b tagged main && 1650 1650 echo bbb >baz && 1651 1651 git add baz && 1652 1652 git commit -m baz_commit && ··· 1660 1660 ' 1661 1661 1662 1662 test_expect_success GPG 'log --graph --show-signature for merged tag in shallow clone' ' 1663 - test_when_finished "git reset --hard && git checkout master" && 1664 - git checkout -b plain-shallow master && 1663 + test_when_finished "git reset --hard && git checkout main" && 1664 + git checkout -b plain-shallow main && 1665 1665 echo aaa >bar && 1666 1666 git add bar && 1667 1667 git commit -m bar_commit && 1668 - git checkout --detach master && 1668 + git checkout --detach main && 1669 1669 echo bbb >baz && 1670 1670 git add baz && 1671 1671 git commit -m baz_commit && ··· 1680 1680 ' 1681 1681 1682 1682 test_expect_success GPG 'log --graph --show-signature for merged tag with missing key' ' 1683 - test_when_finished "git reset --hard && git checkout master" && 1684 - git checkout -b plain-nokey master && 1683 + test_when_finished "git reset --hard && git checkout main" && 1684 + git checkout -b plain-nokey main && 1685 1685 echo aaa >bar && 1686 1686 git add bar && 1687 1687 git commit -m bar_commit && 1688 - git checkout -b tagged-nokey master && 1688 + git checkout -b tagged-nokey main && 1689 1689 echo bbb >baz && 1690 1690 git add baz && 1691 1691 git commit -m baz_commit && ··· 1699 1699 ' 1700 1700 1701 1701 test_expect_success GPG 'log --graph --show-signature for merged tag with bad signature' ' 1702 - test_when_finished "git reset --hard && git checkout master" && 1703 - git checkout -b plain-bad master && 1702 + test_when_finished "git reset --hard && git checkout main" && 1703 + git checkout -b plain-bad main && 1704 1704 echo aaa >bar && 1705 1705 git add bar && 1706 1706 git commit -m bar_commit && 1707 - git checkout -b tagged-bad master && 1707 + git checkout -b tagged-bad main && 1708 1708 echo bbb >baz && 1709 1709 git add baz && 1710 1710 git commit -m baz_commit && ··· 1721 1721 ' 1722 1722 1723 1723 test_expect_success GPG 'log --show-signature for merged tag with GPG failure' ' 1724 - test_when_finished "git reset --hard && git checkout master" && 1725 - git checkout -b plain-fail master && 1724 + test_when_finished "git reset --hard && git checkout main" && 1725 + git checkout -b plain-fail main && 1726 1726 echo aaa >bar && 1727 1727 git add bar && 1728 1728 git commit -m bar_commit && 1729 - git checkout -b tagged-fail master && 1729 + git checkout -b tagged-fail main && 1730 1730 echo bbb >baz && 1731 1731 git add baz && 1732 1732 git commit -m baz_commit && ··· 1740 1740 ' 1741 1741 1742 1742 test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' ' 1743 - test_when_finished "git reset --hard && git checkout master" && 1743 + test_when_finished "git reset --hard && git checkout main" && 1744 1744 test_config gpg.format x509 && 1745 1745 test_config user.signingkey $GIT_COMMITTER_EMAIL && 1746 - git checkout -b plain-x509 master && 1746 + git checkout -b plain-x509 main && 1747 1747 echo aaa >bar && 1748 1748 git add bar && 1749 1749 git commit -m bar_commit && 1750 - git checkout -b tagged-x509 master && 1750 + git checkout -b tagged-x509 main && 1751 1751 echo bbb >baz && 1752 1752 git add baz && 1753 1753 git commit -m baz_commit && ··· 1761 1761 ' 1762 1762 1763 1763 test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 missing key' ' 1764 - test_when_finished "git reset --hard && git checkout master" && 1764 + test_when_finished "git reset --hard && git checkout main" && 1765 1765 test_config gpg.format x509 && 1766 1766 test_config user.signingkey $GIT_COMMITTER_EMAIL && 1767 - git checkout -b plain-x509-nokey master && 1767 + git checkout -b plain-x509-nokey main && 1768 1768 echo aaa >bar && 1769 1769 git add bar && 1770 1770 git commit -m bar_commit && 1771 - git checkout -b tagged-x509-nokey master && 1771 + git checkout -b tagged-x509-nokey main && 1772 1772 echo bbb >baz && 1773 1773 git add baz && 1774 1774 git commit -m baz_commit && ··· 1781 1781 ' 1782 1782 1783 1783 test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' ' 1784 - test_when_finished "git reset --hard && git checkout master" && 1784 + test_when_finished "git reset --hard && git checkout main" && 1785 1785 test_config gpg.format x509 && 1786 1786 test_config user.signingkey $GIT_COMMITTER_EMAIL && 1787 - git checkout -b plain-x509-bad master && 1787 + git checkout -b plain-x509-bad main && 1788 1788 echo aaa >bar && 1789 1789 git add bar && 1790 1790 git commit -m bar_commit && 1791 - git checkout -b tagged-x509-bad master && 1791 + git checkout -b tagged-x509-bad main && 1792 1792 echo bbb >baz && 1793 1793 git add baz && 1794 1794 git commit -m baz_commit && ··· 1838 1838 git init empty && 1839 1839 test_must_fail git -C empty log 2>stderr && 1840 1840 test_i18ngrep does.not.have.any.commits stderr && 1841 - echo 1234abcd >empty/.git/refs/heads/master && 1841 + echo 1234abcd >empty/.git/refs/heads/main && 1842 1842 test_must_fail git -C empty log 2>stderr && 1843 1843 test_i18ngrep broken stderr && 1844 1844 echo "ref: refs/heads/invalid.lock" >empty/.git/HEAD &&
+2 -2
t/t4203-mailmap.sh
··· 2 2 3 3 test_description='.mailmap configurations' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 197 197 198 198 test_expect_success 'setup mailmap blob tests' ' 199 199 git checkout -b map && 200 - test_when_finished "git checkout master" && 200 + test_when_finished "git checkout main" && 201 201 cat >just-bugs <<- EOF && 202 202 Blob Guy <bugs@company.xx> 203 203 EOF
+14 -14
t/t4204-patch-id.sh
··· 2 2 3 3 test_description='git patch-id' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 16 16 test_write_lines $as b >foo && 17 17 test_write_lines $as b >bar && 18 18 git commit -a -m first && 19 - git checkout -b same master && 19 + git checkout -b same main && 20 20 git commit --amend -m same-msg && 21 - git checkout -b notsame master && 21 + git checkout -b notsame main && 22 22 echo c >foo && 23 23 echo c >bar && 24 24 git commit --amend -a -m notsame-msg && ··· 49 49 } 50 50 51 51 test_expect_success 'patch-id detects equality' ' 52 - get_patch_id master && 52 + get_patch_id main && 53 53 get_patch_id same && 54 - test_cmp patch-id_master patch-id_same 54 + test_cmp patch-id_main patch-id_same 55 55 ' 56 56 57 57 test_expect_success 'patch-id detects inequality' ' 58 - get_patch_id master && 58 + get_patch_id main && 59 59 get_patch_id notsame && 60 - ! test_cmp patch-id_master patch-id_notsame 60 + ! test_cmp patch-id_main patch-id_notsame 61 61 ' 62 62 63 63 test_expect_success 'patch-id supports git-format-patch output' ' 64 - get_patch_id master && 64 + get_patch_id main && 65 65 git checkout same && 66 66 git format-patch -1 --stdout | calc_patch_id same && 67 - test_cmp patch-id_master patch-id_same && 67 + test_cmp patch-id_main patch-id_same && 68 68 set $(git format-patch -1 --stdout | git patch-id) && 69 69 test "$2" = $(git rev-parse HEAD) 70 70 ' 71 71 72 72 test_expect_success 'whitespace is irrelevant in footer' ' 73 - get_patch_id master && 73 + get_patch_id main && 74 74 git checkout same && 75 75 git format-patch -1 --stdout | sed "s/ \$//" | calc_patch_id same && 76 - test_cmp patch-id_master patch-id_same 76 + test_cmp patch-id_main patch-id_same 77 77 ' 78 78 79 79 cmp_patch_id () { ··· 91 91 shift 92 92 name="order-${1}-$relevant" 93 93 shift 94 - get_top_diff "master" | calc_patch_id "$name" "$@" && 94 + get_top_diff "main" | calc_patch_id "$name" "$@" && 95 95 git checkout same && 96 96 git format-patch -1 --stdout -O foo-then-bar | 97 97 calc_patch_id "ordered-$name" "$@" && ··· 140 140 ' 141 141 142 142 test_expect_success 'patch-id supports git-format-patch MIME output' ' 143 - get_patch_id master && 143 + get_patch_id main && 144 144 git checkout same && 145 145 git format-patch -1 --attach --stdout | calc_patch_id same && 146 - test_cmp patch-id_master patch-id_same 146 + test_cmp patch-id_main patch-id_same 147 147 ' 148 148 149 149 test_expect_success 'patch-id respects config from subdir' '
+4 -4
t/t4207-log-decoration-colors.sh
··· 5 5 6 6 test_description='Test for "git log --decorate" colors' 7 7 8 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 8 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 10 11 11 . ./test-lib.sh ··· 43 43 44 44 cat >expected <<EOF 45 45 ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD ->\ 46 - ${c_reset}${c_branch}master${c_reset}${c_commit},\ 46 + ${c_reset}${c_branch}main${c_reset}${c_commit},\ 47 47 ${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\ 48 48 ${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B 49 49 ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit},\ 50 - ${c_reset}${c_remoteBranch}other/master${c_reset}${c_commit})${c_reset} A1 50 + ${c_reset}${c_remoteBranch}other/main${c_reset}${c_commit})${c_reset} A1 51 51 ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset}\ 52 - On master: Changes to A.t 52 + On main: Changes to A.t 53 53 ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A 54 54 EOF 55 55
+3 -3
t/t4208-log-magic-pathspec.sh
··· 2 2 3 3 test_description='magic pathspec tests using git-log' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 29 29 ' 30 30 31 31 test_expect_success '"git log :/detached -- " should find a commit only in HEAD' ' 32 - test_when_finished "git checkout master" && 32 + test_when_finished "git checkout main" && 33 33 git checkout --detach && 34 34 # Must manually call `test_tick` instead of using `test_commit`, 35 35 # because the latter additionally creates a tag, which would make ··· 122 122 git checkout HEAD^ && 123 123 echo 2 >a && 124 124 git commit -a -m "update a to 2" && 125 - test_must_fail git merge master && 125 + test_must_fail git merge main && 126 126 git add a && 127 127 git log --merge -- a 128 128 '
+1 -1
t/t4211-line-log.sh
··· 1 1 #!/bin/sh 2 2 3 3 test_description='test log -L' 4 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 4 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 6 7 7 . ./test-lib.sh
+1 -1
t/t4211/history.export
··· 316 316 return s; 317 317 } 318 318 319 - commit refs/heads/master 319 + commit refs/heads/main 320 320 mark :19 321 321 author Thomas Rast <trast@student.ethz.ch> 1362045024 +0100 322 322 committer Thomas Rast <trast@student.ethz.ch> 1362045024 +0100
+2 -2
t/t4214-log-graph-octopus.sh
··· 2 2 3 3 test_description='git log --graph of skewed left octopus merge.' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 20 20 test_expect_success 'set up merge history' ' 21 21 test_commit initial && 22 22 for i in 1 2 3 4 ; do 23 - git checkout master -b $i || return $? 23 + git checkout main -b $i || return $? 24 24 # Make tag name different from branch name, to avoid 25 25 # ambiguity error when calling checkout. 26 26 test_commit $i $i $i tag$i || return $?
+3 -3
t/t4216-log-bloom.sh
··· 1 1 #!/bin/sh 2 2 3 3 test_description='git log for a path with Bloom filters' 4 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 4 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 6 7 7 . ./test-lib.sh ··· 24 24 test_commit c10 file_to_be_deleted && 25 25 git checkout -b side HEAD~4 && 26 26 test_commit side-1 file4 && 27 - git checkout master && 27 + git checkout main && 28 28 git merge side && 29 29 test_commit c11 file5 && 30 30 mv file5 file5_renamed && ··· 97 97 "--topo-order" \ 98 98 "--date-order" \ 99 99 "--author-date-order" \ 100 - "--ancestry-path side..master" 100 + "--ancestry-path side..main" 101 101 do 102 102 test_expect_success "git log option: $option for path: $path" ' 103 103 test_bloom_filters_used "$option -- $path" &&
+11 -11
t/t4253-am-keep-cr-dos.sh
··· 6 6 test_description='git-am mbox with dos line ending. 7 7 8 8 ' 9 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 9 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 10 10 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 11 11 12 12 . ./test-lib.sh ··· 46 46 47 47 test_expect_success 'am with dos files without --keep-cr' ' 48 48 git checkout -b dosfiles initial && 49 - git format-patch -k initial..master && 49 + git format-patch -k initial..main && 50 50 test_must_fail git am -k -3 000*.patch && 51 51 git am --abort && 52 52 rm -rf .git/rebase-apply 000*.patch ··· 54 54 55 55 test_expect_success 'am with dos files with --keep-cr' ' 56 56 git checkout -b dosfiles-keep-cr initial && 57 - git format-patch -k --stdout initial..master >output && 57 + git format-patch -k --stdout initial..main >output && 58 58 git am --keep-cr -k -3 output && 59 - git diff --exit-code master 59 + git diff --exit-code main 60 60 ' 61 61 62 62 test_expect_success 'am with dos files config am.keepcr' ' 63 63 git config am.keepcr 1 && 64 64 git checkout -b dosfiles-conf-keepcr initial && 65 - git format-patch -k --stdout initial..master >output && 65 + git format-patch -k --stdout initial..main >output && 66 66 git am -k -3 output && 67 - git diff --exit-code master 67 + git diff --exit-code main 68 68 ' 69 69 70 70 test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-cr' ' 71 71 git config am.keepcr 1 && 72 72 git checkout -b dosfiles-conf-keepcr-override initial && 73 - git format-patch -k initial..master && 73 + git format-patch -k initial..main && 74 74 test_must_fail git am -k -3 --no-keep-cr 000*.patch && 75 75 git am --abort && 76 76 rm -rf .git/rebase-apply 000*.patch ··· 78 78 79 79 test_expect_success 'am with dos files with --keep-cr continue' ' 80 80 git checkout -b dosfiles-keep-cr-continue initial && 81 - git format-patch -k initial..master && 81 + git format-patch -k initial..main && 82 82 append_cr <file1a >file && 83 83 git commit -m "different patch" file && 84 84 test_must_fail git am --keep-cr -k -3 000*.patch && 85 85 append_cr <file2 >file && 86 86 git add file && 87 87 git am -3 --resolved && 88 - git diff --exit-code master 88 + git diff --exit-code main 89 89 ' 90 90 91 91 test_expect_success 'am with unix files config am.keepcr overridden by --no-keep-cr' ' ··· 93 93 git checkout -b unixfiles-conf-keepcr-override initial && 94 94 cp -f file1 file && 95 95 git commit -m "line ending to unix" file && 96 - git format-patch -k initial..master && 96 + git format-patch -k initial..main && 97 97 git am -k -3 --no-keep-cr 000*.patch && 98 - git diff --exit-code -w master 98 + git diff --exit-code -w main 99 99 ' 100 100 101 101 test_done
+1 -1
t/t4257-am-interactive.sh
··· 10 10 git format-patch --stdout -2 >mbox && 11 11 12 12 git reset --hard unrelated && 13 - test_commit conflict-master file master base 13 + test_commit conflict-main file main base 14 14 ' 15 15 16 16 # Sanity check our setup.