pr-762/dscho/use-main-as-default-branch-name-v3
tagged this
18 Nov 23:44
This (big) patch series (almost) concludes the transition of Git's test suite to use init.defaultBranch=main that was started in js/default-branch-name-part-4-minus-1, continued in js/default-branch-name-adjust-t5411 and in js/default-branch-name-adjust-t5515. This transition prepares for changing the fall-back value of init.defaultBranch accordingly (which will be done in a different set of patch series, with an appropriate deprecation period), reflecting what many open source projects already did followed by GitHub, Azure Repos and others. Before doing anything else, the series starts out with a patch that marks all the test scripts that expect a specific default branch name and won't pass with any other name. Instead of one huge patch that reflects essentially a search-and-replace in the test suite, this patch series then splits the changes up into chunks that are intended to be smaller than 100kB so that they are not rejected by the Git mailing list. Interspersed between those changes are adjustments e.g. in alignment, to make it easier to review (or recreate) the search-and-replace patches. Note that this branch is based on next, mostly because it would otherwise conflict with en/merge-tests, jk/diff-release-filespec-fix and ds/maintenance-part-3. To avoid even more conflicts with topics that did not even make it to seen yet, this patch series specifically excludes t1309, t2106, t3040, t3404, t4013, t4015, t5310, t5526, t6300, t7064, t7817, t9902: in those test scripts, we will still use master for the time being. Once the topics in question have settled, I will send the appropriate follow-up patches to adjust them to use main instead. Note that even after this patch series, master is still found in t/, even outside of the tests we excluded specifically to avoid conflicts with other patch series that are currently in flight: t/perf/, the git p4 tests (because git p4 still uses p4/master to refer to the remote main branch), and some comments still refer to this name. I intend to address at least some of those, in patch series separate from the current one. Changes since v2: * The case statement setting the default branch name for each test script was replaced by an initial patch that sets the default branch name in those test scripts that need it (and only in those). This patch also modifies the linux-gcc job to verify that the test suite runs with overridden default branch name (which the now-marked test scripts over-override). * Four more test scripts were excluded from this patch series: t1309, t2106, t3040 and t4015. These are handled in four separate patch series, where I try to remove the requirement to hard-code the default branch name in the first place. Changes since v1: * Dropped the commit changing the default initial branch name for git init. * Adjusted the patch for t1402 to also replace naster by nain. * Excluded t5526 from the patches for now, to avoid clashing with pk/subsub-fetch-fix. Johannes Schindelin (28): tests: mark tests relying on the current default for `init.defaultBranch` t0060: preemptively adjust alignment t[01]*: adjust the references to the default branch name "main" t2*: adjust the references to the default branch name "main" t3[0-3]*: adjust the references to the default branch name "main" t3416: preemptively adjust alignment in a comment t34*: adjust the references to the default branch name "main" t3[5-9]*: adjust the references to the default branch name "main" t4*: adjust the references to the default branch name "main" t5323: prepare centered comment for `master` -> `main` t5[0-4]*: adjust the references to the default branch name "main" t5503: prepare aligned comment for replacing `master` with `main` t550*: adjust the references to the default branch name "main" t551*: adjust the references to the default branch name "main" t55[23]*: adjust the references to the default branch name "main" t55[4-9]*: adjust the references to the default branch name "main" t5[6-9]*: adjust the references to the default branch name "main" t6[0-3]*: adjust the references to the default branch name "main" t64*: preemptively adjust alignment to prepare for `master` -> `main` t6[4-9]*: adjust the references to the default branch name "main" t7[0-4]*: adjust the references to the default branch name "main" t7[5-9]*: adjust the references to the default branch name "main" t8*: adjust the references to the default branch name "main" t9[0-4]*: adjust the references to the default branch name "main" t9[5-7]*: adjust the references to the default branch name "main" tests(git-p4): transition to the default branch name `main` t99*: adjust the references to the default branch name "main" tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed ci/run-build-and-tests.sh | 2 + t/annotate-tests.sh | 8 +- t/lib-cvs.sh | 2 +- t/t0002-gitfile.sh | 9 +- t/t0020-crlf.sh | 11 +- t/t0021-conversion.sh | 43 +- t/t0027-auto-crlf.sh | 4 +- t/t0028-working-tree-encoding.sh | 7 +- t/t0041-usage.sh | 13 +- t/t0050-filesystem.sh | 9 +- t/t0060-path-utils.sh | 4 +- t/t0100-previous.sh | 21 +- t/t1004-read-tree-m-u-wf.sh | 43 +- t/t1008-read-tree-overlay.sh | 5 +- t/t1009-read-tree-new-index.sh | 7 +- t/t1011-read-tree-sparse-checkout.sh | 2 +- t/t1021-rerere-in-workdir.sh | 5 +- t/t1090-sparse-checkout-scope.sh | 13 +- t/t1091-sparse-checkout-builtin.sh | 5 +- t/t1300-config.sh | 11 +- t/t1301-shared-repo.sh | 7 +- t/t1305-config-include.sh | 2 +- t/t1400-update-ref.sh | 75 +-- t/t1402-check-ref-format.sh | 32 +- t/t1403-show-ref.sh | 21 +- t/t1405-main-ref-store.sh | 45 +- t/t1406-submodule-ref-store.sh | 33 +- t/t1407-worktree-ref-store.sh | 35 +- t/t1408-packed-refs.sh | 15 +- t/t1410-reflog.sh | 59 +- t/t1411-reflog-show.sh | 5 +- t/t1413-reflog-detach.sh | 27 +- t/t1414-reflog-walk.sh | 15 +- t/t1416-ref-transaction-hooks.sh | 13 +- t/t1430-bad-ref-name.sh | 55 +- t/t1450-fsck.sh | 2 +- t/t1500-rev-parse.sh | 7 +- t/t1503-rev-parse-verify.sh | 31 +- t/t1505-rev-parse-last.sh | 11 +- t/t1506-rev-parse-diagnosis.sh | 7 +- t/t1507-rev-parse-upstream.sh | 43 +- t/t1508-at-combinations.sh | 13 +- t/t1511-rev-parse-caret.sh | 29 +- t/t1512-rev-parse-disambiguation.sh | 5 +- t/t1513-rev-parse-prefix.sh | 7 +- t/t1514-rev-parse-push.sh | 19 +- t/t1700-split-index.sh | 5 +- t/t2007-checkout-symlink.sh | 13 +- t/t2009-checkout-statinfo.sh | 11 +- t/t2010-checkout-ambiguous.sh | 7 +- t/t2011-checkout-invalid-head.sh | 19 +- t/t2012-checkout-last.sh | 51 +- t/t2015-checkout-unborn.sh | 5 +- t/t2017-checkout-orphan.sh | 47 +- t/t2020-checkout-detach.sh | 31 +- t/t2022-checkout-paths.sh | 25 +- t/t2023-checkout-m.sh | 13 +- t/t2024-checkout-dwim.sh | 70 +-- t/t2027-checkout-track.sh | 9 +- t/t2030-unresolve-info.sh | 9 +- t/t2060-switch.sh | 33 +- t/t2070-restore.sh | 7 +- t/t2400-worktree-add.sh | 69 +-- t/t2401-worktree-prune.sh | 5 +- t/t2402-worktree-list.sh | 23 +- t/t2405-worktree-submodule.sh | 9 +- t/t3200-branch.sh | 251 ++++----- t/t3201-branch-contains.sh | 85 +-- t/t3202-show-branch-octopus.sh | 5 +- t/t3203-branch-output.sh | 43 +- t/t3204-branch-name-interpretation.sh | 9 +- t/t3205-branch-color.sh | 11 +- t/t3206-range-diff.sh | 43 +- t/t3206/history.export | 2 +- t/t3210-pack-refs.sh | 7 +- t/t3211-peel-ref.sh | 7 +- t/t3301-notes.sh | 6 +- t/t3302-notes-index-expensive.sh | 5 +- t/t3303-notes-subtrees.sh | 11 +- t/t3304-notes-mixed.sh | 11 +- t/t3308-notes-merge.sh | 2 +- t/t3320-notes-merge-worktrees.sh | 7 +- t/t3400-rebase.sh | 63 +-- t/t3402-rebase-merge.sh | 47 +- t/t3403-rebase-skip.sh | 9 +- t/t3404-rebase-interactive.sh | 3 + t/t3405-rebase-malformed.sh | 11 +- t/t3406-rebase-message.sh | 27 +- t/t3407-rebase-abort.sh | 21 +- t/t3408-rebase-multi-line.sh | 5 +- t/t3409-rebase-preserve-merges.sh | 13 +- t/t3412-rebase-root.sh | 31 +- t/t3413-rebase-hook.sh | 45 +- t/t3415-rebase-autosquash.sh | 5 +- t/t3416-rebase-onto-threedots.sh | 57 +- t/t3418-rebase-continue.sh | 27 +- t/t3419-rebase-patch-id.sh | 15 +- t/t3420-rebase-autostash.sh | 11 +- t/t3423-rebase-reword.sh | 6 +- t/t3427-rebase-subtree.sh | 23 +- t/t3430-rebase-merges.sh | 19 +- t/t3431-rebase-fork-point.sh | 35 +- t/t3432-rebase-fast-forward.sh | 37 +- t/t3434-rebase-i18n.sh | 11 +- t/t3435-rebase-gpg-sign.sh | 7 +- t/t3436-rebase-more-options.sh | 2 +- t/t3500-cherry.sh | 15 +- t/t3501-revert-cherry-pick.sh | 7 +- t/t3502-cherry-pick-merge.sh | 5 +- t/t3503-cherry-pick-root.sh | 13 +- t/t3504-cherry-pick-rerere.sh | 27 +- t/t3505-cherry-pick-empty.sh | 27 +- t/t3506-cherry-pick-ff.sh | 11 +- t/t3507-cherry-pick-conflict.sh | 5 +- t/t3508-cherry-pick-many-commits.sh | 41 +- t/t3509-cherry-pick-merge-df.sh | 5 +- t/t3512-cherry-pick-submodule.sh | 5 +- t/t3600-rm.sh | 13 +- t/t3701-add-interactive.sh | 7 +- t/t3901-i18n-patch.sh | 43 +- t/t3903-stash.sh | 35 +- t/t3910-mac-os-precompose.sh | 9 +- t/t4013-diff-various.sh | 3 + t/t4014-format-patch.sh | 179 ++++--- t/t4017-diff-retval.sh | 5 +- t/t4038-diff-combined.sh | 17 +- t/t4041-diff-submodule-option.sh | 5 +- t/t4048-diff-combined-binary.sh | 13 +- t/t4052-stat-output.sh | 7 +- t/t4056-diff-order.sh | 5 +- t/t4057-diff-combined-paths.sh | 23 +- t/t4061-diff-indent.sh | 27 +- t/t4066-diff-emit-delay.sh | 5 +- t/t4068-diff-symmetric-merge-base.sh | 51 +- t/t4103-apply-binary.sh | 39 +- t/t4108-apply-threeway.sh | 17 +- t/t4121-apply-diffs.sh | 5 +- t/t4122-apply-symlink-inside.sh | 9 +- t/t4150-am.sh | 29 +- t/t4200-rerere.sh | 23 +- t/t4201-shortlog.sh | 5 +- t/t4202-log.sh | 109 ++-- t/t4203-mailmap.sh | 5 +- t/t4204-patch-id.sh | 29 +- t/t4207-log-decoration-colors.sh | 9 +- t/t4208-log-magic-pathspec.sh | 7 +- t/t4211-line-log.sh | 3 + t/t4211/history.export | 2 +- t/t4214-log-graph-octopus.sh | 5 +- t/t4216-log-bloom.sh | 7 +- t/t4253-am-keep-cr-dos.sh | 23 +- t/t4257-am-interactive.sh | 2 +- t/t5150-request-pull.sh | 37 +- t/t5304-prune.sh | 5 +- t/t5305-include-tag.sh | 5 +- t/t5310-pack-bitmaps.sh | 3 + t/t5312-prune-corruption.sh | 19 +- t/t5317-pack-objects-filter-objects.sh | 5 +- t/t5322-pack-objects-sparse.sh | 5 +- t/t5323-pack-redundant.sh | 66 +-- t/t5400-send-pack.sh | 63 +-- t/t5401-update-hooks.sh | 24 +- t/t5402-post-merge-hook.sh | 5 +- t/t5403-post-checkout-hook.sh | 9 +- t/t5404-tracking-branches.sh | 11 +- t/t5405-send-pack-rewind.sh | 9 +- t/t5407-post-rewrite-hook.sh | 5 +- t/t5410-receive-pack-alternates.sh | 7 +- t/t5500-fetch-pack.sh | 31 +- t/t5501-fetch-push-alternates.sh | 7 +- t/t5502-quickfetch.sh | 9 +- t/t5503-tagfollow.sh | 15 +- t/t5504-fetch-receive-strict.sh | 23 +- t/t5505-remote.sh | 151 +++--- t/t5506-remote-groups.sh | 7 +- t/t5509-fetch-push-namespaces.sh | 33 +- t/t5510-fetch.sh | 165 +++--- t/t5511-refspec.sh | 12 +- t/t5512-ls-remote.sh | 29 +- t/t5514-fetch-multiple.sh | 33 +- t/t5516-fetch-push.sh | 503 +++++++++--------- t/t5517-push-mirror.sh | 127 ++--- t/t5518-fetch-exit-status.sh | 9 +- t/t5519-push-alternates.sh | 15 +- t/t5520-pull.sh | 33 +- t/t5521-pull-options.sh | 19 +- t/t5523-push-upstream.sh | 33 +- t/t5526-fetch-submodules.sh | 3 + t/t5527-fetch-odd-refs.sh | 17 +- t/t5528-push-default.sh | 101 ++-- t/t5529-push-errors.sh | 2 +- t/t5530-upload-pack-error.sh | 2 +- t/t5531-deep-submodule-push.sh | 191 +++---- t/t5533-push-cas.sh | 145 ++--- t/t5534-push-signed.sh | 7 +- t/t5537-fetch-shallow.sh | 33 +- t/t5538-push-shallow.sh | 25 +- t/t5539-fetch-http-shallow.sh | 17 +- t/t5540-http-push-webdav.sh | 11 +- t/t5541-http-push-smart.sh | 43 +- t/t5542-push-http-shallow.sh | 11 +- t/t5543-atomic-push.sh | 83 +-- t/t5545-push-options.sh | 65 +-- t/t5548-push-porcelain.sh | 64 +-- t/t5550-http-fetch-dumb.sh | 23 +- t/t5551-http-fetch-smart.sh | 23 +- t/t5552-skipping-fetch-negotiator.sh | 2 +- t/t5553-set-upstream.sh | 85 +-- t/t5560-http-backend-noserver.sh | 3 + t/t5561-http-backend.sh | 7 +- t/t556x_common | 8 +- t/t5570-git-daemon.sh | 19 +- t/t5571-pre-push-hook.sh | 7 +- t/t5572-pull-submodule.sh | 4 +- t/t5580-unc-paths.sh | 5 +- t/t5581-http-curl-verbose.sh | 5 +- t/t5582-fetch-negative-refspec.sh | 25 +- t/t5601-clone.sh | 7 +- t/t5604-clone-reference.sh | 15 +- t/t5605-clone-local.sh | 13 +- t/t5606-clone-options.sh | 11 +- t/t5607-clone-bundle.sh | 17 +- t/t5608-clone-2gb.sh | 2 +- t/t5609-clone-branch.sh | 9 +- t/t5610-clone-detached.sh | 7 +- t/t5611-clone-config.sh | 19 +- t/t5612-clone-refspec.sh | 45 +- t/t5614-clone-submodules-shallow.sh | 2 +- t/t5616-partial-clone.sh | 53 +- t/t5617-clone-submodules-remote.sh | 9 +- t/t5700-protocol-v1.sh | 19 +- t/t5701-git-serve.sh | 19 +- t/t5702-protocol-v2.sh | 53 +- t/t5703-upload-pack-ref-in-want.sh | 63 +-- t/t5801-remote-helpers.sh | 27 +- t/t6000-rev-list-misc.sh | 5 +- t/t6001-rev-list-graft.sh | 5 +- t/t6004-rev-list-path-optim.sh | 17 +- t/t6006-rev-list-format.sh | 17 +- t/t6007-rev-list-cherry-pick-file.sh | 7 +- t/t6008-rev-list-submodule.sh | 5 +- t/t6009-rev-list-parent.sh | 9 +- t/t6012-rev-list-simplify.sh | 11 +- t/t6013-rev-list-reverse-parents.sh | 13 +- t/t6016-rev-list-graph-simplify-history.sh | 5 +- t/t6017-rev-list-stdin.sh | 11 +- t/t6018-rev-list-glob.sh | 53 +- t/t6019-rev-list-ancestry-path.sh | 9 +- t/t6030-bisect-porcelain.sh | 13 +- t/t6040-tracking-info.sh | 57 +- t/t6050-replace.sh | 13 +- t/t6101-rev-parse-parents.sh | 5 +- t/t6110-rev-list-sparse.sh | 5 +- t/t6111-rev-list-treesame.sh | 9 +- t/t6112-rev-list-filters-objects.sh | 17 +- t/t6120-describe.sh | 23 +- t/t6200-fmt-merge-msg.sh | 53 +- t/t6300-for-each-ref.sh | 3 + t/t6302-for-each-ref-filter.sh | 61 ++- t/t6400-merge-df.sh | 9 +- t/t6402-merge-rename.sh | 49 +- t/t6404-recursive-merge.sh | 7 +- t/t6405-merge-symlinks.sh | 17 +- t/t6406-merge-attr.sh | 27 +- t/t6407-merge-binary.sh | 9 +- t/t6409-merge-subtree.sh | 19 +- t/t6411-merge-filemode.sh | 13 +- t/t6412-merge-large-rename.sh | 9 +- t/t6413-merge-crlf.sh | 5 +- t/t6414-merge-rename-nocruft.sh | 5 +- t/t6415-merge-dir-to-symlink.sh | 25 +- t/t6416-recursive-corner-cases.sh | 31 +- t/t6417-merge-ours-theirs.sh | 31 +- t/t6418-merge-text-auto.sh | 15 +- t/t6419-merge-ignorecase.sh | 13 +- t/t6422-merge-rename-corner-cases.sh | 15 +- t/t6425-merge-rename-delete.sh | 5 +- t/t6427-diff3-conflict-markers.sh | 17 +- t/t6430-merge-recursive.sh | 21 +- t/t6432-merge-recursive-space-options.sh | 9 +- t/t6433-merge-toplevel.sh | 11 +- t/t6434-merge-recursive-rename-options.sh | 9 +- t/t6436-merge-overwrite.sh | 5 +- t/t6437-submodule-merge.sh | 17 +- t/t6439-merge-co-error-msgs.sh | 9 +- t/t6501-freshen-objects.sh | 5 +- t/t7003-filter-branch.sh | 43 +- t/t7004-tag.sh | 11 +- t/t7030-verify-tag.sh | 5 +- t/t7060-wtstatus.sh | 29 +- t/t7063-status-untracked-cache.sh | 17 +- t/t7064-wtstatus-pv2.sh | 3 + t/t7102-reset.sh | 9 +- t/t7113-post-index-change-hook.sh | 5 +- t/t7201-co.sh | 113 ++-- t/t7400-submodule-basic.sh | 23 +- t/t7403-submodule-sync.sh | 13 +- t/t7406-submodule-update.sh | 41 +- t/t7407-submodule-foreach.sh | 27 +- t/t7409-submodule-detached-work-tree.sh | 11 +- t/t7417-submodule-path-url.sh | 5 +- t/t7501-commit-basic-functionality.sh | 5 +- t/t7502-commit-porcelain.sh | 15 +- ...3-pre-commit-and-pre-merge-commit-hooks.sh | 45 +- t/t7504-commit-msg-hook.sh | 27 +- t/t7505-prepare-commit-msg-hook.sh | 23 +- t/t7508-status.sh | 58 +- t/t7510-signed-commit.sh | 5 +- t/t7512-status-help.sh | 43 +- t/t7517-per-repo-email.sh | 15 +- t/t7600-merge.sh | 47 +- t/t7606-merge-custom.sh | 2 +- t/t7608-merge-messages.sh | 39 +- t/t7610-mergetool.sh | 177 +++--- t/t7611-merge-abort.sh | 7 +- t/t7612-merge-verify-signatures.sh | 5 +- t/t7614-merge-signoff.sh | 27 +- t/t7701-repack-unpack-unreachable.sh | 5 +- t/t7800-difftool.sh | 41 +- t/t7810-grep.sh | 31 +- t/t8001-annotate.sh | 5 +- t/t8002-blame.sh | 3 + t/t8003-blame-corner-cases.sh | 7 +- t/t8004-blame-with-conflicts.sh | 17 +- t/t8012-blame-colors.sh | 3 + t/t9001-send-email.sh | 31 +- t/t9100-git-svn-basic.sh | 5 +- t/t9145-git-svn-master-branch.sh | 9 +- t/t9151-svn-mergeinfo.sh | 5 +- t/t9155-git-svn-fetch-deleted-tag.sh | 5 +- t/t9156-git-svn-fetch-deleted-tag-2.sh | 9 +- t/t9163-git-svn-reset-clears-caches.sh | 5 +- t/t9169-git-svn-dcommit-crlf.sh | 5 +- t/t9300-fast-import.sh | 85 +-- t/t9301-fast-import-notes.sh | 17 +- t/t9302-fast-import-unpack-limit.sh | 16 +- t/t9350-fast-export.sh | 89 ++-- t/t9351-fast-export-anonymize.sh | 7 +- t/t9400-git-cvsserver-server.sh | 35 +- t/t9401-git-cvsserver-crlf.sh | 19 +- t/t9402-git-cvsserver-refs.sh | 11 +- t/t9500-gitweb-standalone-no-errors.sh | 23 +- t/t9501-gitweb-standalone-http-status.sh | 17 +- t/t9502-gitweb-standalone-parse-output.sh | 19 +- t/t9600-cvsimport.sh | 5 +- t/t9601-cvsimport-vendor-branch.sh | 19 +- t/t9602-cvsimport-branches-tags.sh | 7 +- t/t9603-cvsimport-patchsets.sh | 11 +- t/t9800-git-p4-basic.sh | 5 +- t/t9801-git-p4-branch.sh | 19 +- t/t9806-git-p4-options.sh | 21 +- t/t9807-git-p4-submit.sh | 5 +- t/t9811-git-p4-label-import.sh | 5 +- t/t9902-completion.sh | 3 + t/t9903-bash-prompt.sh | 117 ++-- 355 files changed, 4835 insertions(+), 3861 deletions(-) base-commit: aff20da3a209088e7f8f3632077fa11b86453d67 Submitted-As: https://lore.kernel.org/git/pull.762.v3.git.1605743086.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.762.git.1605221038.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.762.v2.git.1605629547.gitgitgadget@gmail.com
Assets 2
-
2020-11-18T23:44:48Z -
2020-11-18T23:44:48Z - Loading