Skip to content

Instantly share code, notes, and snippets.

@IAmJSD
Created June 16, 2020 14:45
Show Gist options
  • Save IAmJSD/9c480d52a4f19c8c13d03094e0741c14 to your computer and use it in GitHub Desktop.
Save IAmJSD/9c480d52a4f19c8c13d03094e0741c14 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
From b067cd75e453b1d70f648a0201b0261e36162526 Mon Sep 17 00:00:00 2001
From: Jake Gealer <[email protected]>
Date: Tue, 16 Jun 2020 14:49:55 +0100
Subject: [PATCH] Remove all master/slave terminology from Git
---
Documentation/Makefile | 2 +-
Documentation/MyFirstContribution.txt | 32 +-
Documentation/MyFirstObjectWalk.txt | 4 +-
Documentation/SubmittingPatches | 24 +-
Documentation/config/push.txt | 4 +-
Documentation/config/transfer.txt | 8 +-
Documentation/doc-diff | 4 +-
Documentation/git-archimport.txt | 2 +-
Documentation/git-bisect-lk2009.txt | 4 +-
Documentation/git-branch.txt | 2 +-
Documentation/git-bundle.txt | 30 +-
Documentation/git-checkout.txt | 38 +-
Documentation/git-cherry-pick.txt | 34 +-
Documentation/git-cherry.txt | 22 +-
Documentation/git-clone.txt | 4 +-
Documentation/git-config.txt | 4 +-
Documentation/git-cvsimport.txt | 6 +-
Documentation/git-cvsserver.txt | 6 +-
Documentation/git-diff.txt | 10 +-
Documentation/git-fast-export.txt | 24 +-
Documentation/git-fast-import.txt | 8 +-
Documentation/git-fetch-pack.txt | 2 +-
Documentation/git-fetch.txt | 12 +-
Documentation/git-filter-branch.txt | 2 +-
Documentation/git-fmt-merge-msg.txt | 4 +-
Documentation/git-format-patch.txt | 2 +-
Documentation/git-imap-send.txt | 2 +-
Documentation/git-init.txt | 2 +-
Documentation/git-log.txt | 6 +-
Documentation/git-ls-remote.txt | 4 +-
Documentation/git-merge-base.txt | 32 +-
Documentation/git-merge.txt | 10 +-
Documentation/git-p4.txt | 30 +-
Documentation/git-pull.txt | 16 +-
Documentation/git-push.txt | 52 +-
Documentation/git-rebase.txt | 52 +-
Documentation/git-receive-pack.txt | 12 +-
Documentation/git-reflog.txt | 4 +-
Documentation/git-remote-fd.txt | 12 +-
Documentation/git-remote.txt | 32 +-
Documentation/git-request-pull.txt | 12 +-
Documentation/git-rerere.txt | 52 +-
Documentation/git-reset.txt | 6 +-
Documentation/git-restore.txt | 6 +-
Documentation/git-rev-parse.txt | 12 +-
Documentation/git-revert.txt | 4 +-
Documentation/git-send-email.txt | 2 +-
Documentation/git-show-branch.txt | 22 +-
Documentation/git-show-ref.txt | 18 +-
Documentation/git-show.txt | 4 +-
Documentation/git-stash.txt | 4 +-
Documentation/git-submodule.txt | 6 +-
Documentation/git-svn.txt | 18 +-
Documentation/git-switch.txt | 6 +-
Documentation/git-symbolic-ref.txt | 6 +-
Documentation/git-tag.txt | 6 +-
Documentation/git-update-ref.txt | 4 +-
Documentation/git-upload-archive.txt | 2 +-
Documentation/git-worktree.txt | 10 +-
Documentation/git.txt | 2 +-
Documentation/gitcore-tutorial.txt | 138 ++---
Documentation/gitcvs-migration.txt | 10 +-
Documentation/giteveryday.txt | 60 +--
Documentation/githooks.txt | 4 +-
Documentation/gitmodules.txt | 2 +-
Documentation/gitremote-helpers.txt | 4 +-
Documentation/gitrepository-layout.txt | 2 +-
Documentation/gittutorial-2.txt | 10 +-
Documentation/gittutorial.txt | 52 +-
Documentation/gitworkflows.txt | 36 +-
Documentation/glossary-content.txt | 6 +-
.../howto/keep-canonical-history-correct.txt | 16 +-
Documentation/howto/maintain-git.txt | 92 ++--
.../howto/rebase-from-internal-branch.txt | 50 +-
.../howto/rebuild-from-update-hook.txt | 6 +-
Documentation/howto/revert-a-faulty-merge.txt | 6 +-
Documentation/howto/revert-branch-rebase.txt | 66 +--
.../howto/separating-topic-branches.txt | 24 +-
.../howto/setup-git-server-over-http.txt | 6 +-
Documentation/howto/update-hook-example.txt | 6 +-
Documentation/howto/using-merge-subtree.txt | 10 +-
Documentation/install-doc-quick.sh | 2 +-
Documentation/pretty-formats.txt | 6 +-
Documentation/revisions.txt | 34 +-
Documentation/technical/http-protocol.txt | 6 +-
Documentation/technical/pack-protocol.txt | 8 +-
.../technical/protocol-capabilities.txt | 4 +-
Documentation/technical/reftable.txt | 4 +-
.../technical/repository-version.txt | 2 +-
Documentation/urls-remotes.txt | 2 +-
Documentation/user-manual.txt | 170 +++---
README.md | 2 -
builtin/clone.c | 4 +-
builtin/fast-export.c | 6 +-
builtin/init-db.c | 4 +-
builtin/remote.c | 16 +-
builtin/submodule--helper.c | 2 +-
compat/vcbuild/README | 8 +-
connect.c | 2 +-
contrib/completion/git-prompt.sh | 2 +-
.../diff-highlight/t/t9400-diff-highlight.sh | 10 +-
contrib/emacs/git-blame.el | 2 +-
contrib/emacs/git.el | 2 +-
contrib/fast-import/import-directories.perl | 2 +-
contrib/hg-to-git/hg-to-git.py | 8 +-
contrib/hooks/multimail/CONTRIBUTING.rst | 2 +-
.../README.migrate-from-post-receive-email | 4 +-
contrib/hooks/multimail/README.rst | 22 +-
.../hooks/multimail/doc/troubleshooting.rst | 4 +-
contrib/hooks/update-paranoid | 4 +-
contrib/mw-to-git/git-remote-mediawiki.perl | 32 +-
contrib/remote-helpers/README | 4 +-
contrib/remote-helpers/git-remote-bzr | 2 +-
contrib/remote-helpers/git-remote-hg | 2 +-
contrib/stats/packinfo.pl | 4 +-
contrib/subtree/git-subtree.txt | 24 +-
contrib/subtree/t/t7900-subtree.sh | 116 ++--
contrib/svn-fe/svn-fe.c | 2 +-
fmt-merge-msg.c | 2 +-
git-cvsimport.perl | 12 +-
git-gui/README.md | 12 +-
git-gui/git-gui.sh | 2 +-
git-gui/lib/choose_repository.tcl | 6 +-
git-gui/lib/spellcheck.tcl | 4 +-
git-gui/po/README | 8 +-
git-gui/po/bg.po | 6 +-
git-gui/po/de.po | 4 +-
git-gui/po/el.po | 4 +-
git-gui/po/fr.po | 4 +-
git-gui/po/git-gui.pot | 2 +-
git-gui/po/glossary/bg.po | 6 +-
git-gui/po/glossary/de.po | 6 +-
git-gui/po/glossary/git-gui-glossary.pot | 4 +-
git-gui/po/glossary/git-gui-glossary.txt | 2 +-
git-gui/po/glossary/pt_pt.po | 4 +-
git-gui/po/hu.po | 4 +-
git-gui/po/it.po | 4 +-
git-gui/po/ja.po | 4 +-
git-gui/po/nb.po | 4 +-
git-gui/po/pt_br.po | 4 +-
git-gui/po/pt_pt.po | 4 +-
git-gui/po/ru.po | 4 +-
git-gui/po/sv.po | 4 +-
git-gui/po/vi.po | 4 +-
git-gui/po/zh_cn.po | 4 +-
git-p4.py | 42 +-
gitk-git/gitk | 2 +-
gitk-git/po/bg.po | 2 +-
gitweb/gitweb.perl | 2 +-
perl/Git.pm | 2 +-
po/bg.po | 12 +-
po/ca.po | 14 +-
po/de.po | 14 +-
po/el.po | 10 +-
po/es.po | 20 +-
po/fr.po | 14 +-
po/git.pot | 10 +-
po/it.po | 20 +-
po/ko.po | 10 +-
po/pt_PT.po | 8 +-
po/ru.po | 12 +-
po/sv.po | 18 +-
po/tr.po | 14 +-
po/vi.po | 20 +-
po/zh_CN.po | 22 +-
po/zh_TW.po | 20 +-
ref-filter.c | 4 +-
refs.c | 8 +-
refs/files-backend.c | 2 +-
refs/ref-cache.h | 2 +-
refs/refs-internal.h | 4 +-
remote-testsvn.c | 4 +-
remote.c | 18 +-
revision.c | 2 +-
send-pack.c | 2 +-
strbuf.h | 4 +-
t/README | 2 +-
t/annotate-tests.sh | 8 +-
t/helper/test-svn-fe.c | 2 +-
t/lib-cvs.sh | 2 +-
t/lib-submodule-update.sh | 2 +-
t/lib-terminal.sh | 2 +-
t/perf/p0005-status.sh | 2 +-
t/perf/p0006-read-tree-checkout.sh | 2 +-
t/perf/p1451-fsck-skip-list.sh | 2 +-
t/perf/p5303-many-packs.sh | 4 +-
t/perf/p5550-fetch-tags.sh | 2 +-
t/perf/repos/inflate-repo.sh | 2 +-
t/perf/repos/many-files.sh | 6 +-
t/t0002-gitfile.sh | 6 +-
t/t0020-crlf.sh | 8 +-
t/t0021-conversion.sh | 40 +-
t/t0027-auto-crlf.sh | 4 +-
t/t0028-working-tree-encoding.sh | 4 +-
t/t0041-usage.sh | 10 +-
t/t0050-filesystem.sh | 6 +-
t/t0060-path-utils.sh | 4 +-
t/t0100-previous.sh | 18 +-
t/t1004-read-tree-m-u-wf.sh | 40 +-
t/t1008-read-tree-overlay.sh | 2 +-
t/t1009-read-tree-new-index.sh | 4 +-
t/t1011-read-tree-sparse-checkout.sh | 2 +-
t/t1021-rerere-in-workdir.sh | 2 +-
t/t1050-large.sh | 2 +-
t/t1090-sparse-checkout-scope.sh | 10 +-
t/t1300-config.sh | 8 +-
t/t1301-shared-repo.sh | 4 +-
t/t1305-config-include.sh | 2 +-
t/t1309-early-config.sh | 4 +-
t/t1400-update-ref.sh | 68 +--
t/t1402-check-ref-format.sh | 28 +-
t/t1403-show-ref.sh | 18 +-
t/t1405-main-ref-store.sh | 40 +-
t/t1406-submodule-ref-store.sh | 30 +-
t/t1407-worktree-ref-store.sh | 32 +-
t/t1408-packed-refs.sh | 12 +-
t/t1410-reflog.sh | 56 +-
t/t1411-reflog-show.sh | 2 +-
t/t1413-reflog-detach.sh | 24 +-
t/t1414-reflog-walk.sh | 12 +-
t/t1430-bad-ref-name.sh | 52 +-
t/t1450-fsck.sh | 2 +-
t/t1500-rev-parse.sh | 4 +-
t/t1503-rev-parse-verify.sh | 28 +-
t/t1505-rev-parse-last.sh | 8 +-
t/t1506-rev-parse-diagnosis.sh | 4 +-
t/t1507-rev-parse-upstream.sh | 40 +-
t/t1508-at-combinations.sh | 10 +-
t/t1511-rev-parse-caret.sh | 26 +-
t/t1512-rev-parse-disambiguation.sh | 2 +-
t/t1513-rev-parse-prefix.sh | 4 +-
t/t1514-rev-parse-push.sh | 16 +-
t/t1700-split-index.sh | 2 +-
t/t2007-checkout-symlink.sh | 10 +-
t/t2009-checkout-statinfo.sh | 8 +-
t/t2010-checkout-ambiguous.sh | 4 +-
t/t2011-checkout-invalid-head.sh | 16 +-
t/t2012-checkout-last.sh | 48 +-
t/t2015-checkout-unborn.sh | 2 +-
t/t2017-checkout-orphan.sh | 44 +-
t/t2020-checkout-detach.sh | 28 +-
t/t2022-checkout-paths.sh | 22 +-
t/t2023-checkout-m.sh | 10 +-
t/t2024-checkout-dwim.sh | 66 +--
t/t2027-checkout-track.sh | 6 +-
t/t2030-unresolve-info.sh | 6 +-
t/t2060-switch.sh | 30 +-
t/t2070-restore.sh | 4 +-
t/t2106-update-index-assume-unchanged.sh | 2 +-
t/t2400-worktree-add.sh | 66 +--
t/t2401-worktree-prune.sh | 2 +-
t/t2402-worktree-list.sh | 16 +-
t/t2405-worktree-submodule.sh | 6 +-
t/t3030-merge-recursive.sh | 18 +-
t/t3032-merge-recursive-space-options.sh | 6 +-
t/t3033-merge-toplevel.sh | 8 +-
t/t3034-merge-recursive-rename-options.sh | 6 +-
t/t3040-subprojects-basic.sh | 2 +-
t/t3200-branch.sh | 262 ++++-----
t/t3201-branch-contains.sh | 72 +--
t/t3202-show-branch-octopus.sh | 2 +-
t/t3203-branch-output.sh | 40 +-
t/t3204-branch-name-interpretation.sh | 6 +-
t/t3205-branch-color.sh | 10 +-
t/t3206-range-diff.sh | 40 +-
t/t3206/history.export | 2 +-
t/t3210-pack-refs.sh | 4 +-
t/t3211-peel-ref.sh | 4 +-
t/t3301-notes.sh | 6 +-
t/t3302-notes-index-expensive.sh | 2 +-
t/t3303-notes-subtrees.sh | 8 +-
t/t3304-notes-mixed.sh | 8 +-
t/t3308-notes-merge.sh | 2 +-
t/t3320-notes-merge-worktrees.sh | 4 +-
t/t3400-rebase.sh | 60 +--
t/t3402-rebase-merge.sh | 44 +-
t/t3403-rebase-skip.sh | 6 +-
t/t3404-rebase-interactive.sh | 84 +--
t/t3405-rebase-malformed.sh | 8 +-
t/t3406-rebase-message.sh | 24 +-
t/t3407-rebase-abort.sh | 18 +-
t/t3408-rebase-multi-line.sh | 2 +-
t/t3409-rebase-preserve-merges.sh | 10 +-
t/t3412-rebase-root.sh | 28 +-
t/t3413-rebase-hook.sh | 42 +-
t/t3415-rebase-autosquash.sh | 2 +-
t/t3416-rebase-onto-threedots.sh | 54 +-
t/t3418-rebase-continue.sh | 24 +-
t/t3419-rebase-patch-id.sh | 12 +-
t/t3420-rebase-autostash.sh | 8 +-
t/t3423-rebase-reword.sh | 6 +-
t/t3427-rebase-subtree.sh | 60 +--
t/t3430-rebase-merges.sh | 16 +-
t/t3431-rebase-fork-point.sh | 32 +-
t/t3432-rebase-fast-forward.sh | 34 +-
t/t3434-rebase-i18n.sh | 8 +-
t/t3435-rebase-gpg-sign.sh | 4 +-
t/t3500-cherry.sh | 12 +-
t/t3501-revert-cherry-pick.sh | 4 +-
t/t3502-cherry-pick-merge.sh | 2 +-
t/t3503-cherry-pick-root.sh | 10 +-
t/t3504-cherry-pick-rerere.sh | 24 +-
t/t3505-cherry-pick-empty.sh | 24 +-
t/t3506-cherry-pick-ff.sh | 8 +-
t/t3507-cherry-pick-conflict.sh | 2 +-
t/t3508-cherry-pick-many-commits.sh | 38 +-
t/t3509-cherry-pick-merge-df.sh | 2 +-
t/t3512-cherry-pick-submodule.sh | 2 +-
t/t3600-rm.sh | 10 +-
t/t3701-add-interactive.sh | 4 +-
t/t3901-i18n-patch.sh | 40 +-
t/t3903-stash.sh | 32 +-
t/t3910-mac-os-precompose.sh | 6 +-
t/t4013-diff-various.sh | 168 +++---
...ree_--cc_--patch-with-stat_--summary_main} | 2 +-
...iff.diff-tree_--cc_--patch-with-stat_main} | 2 +-
...r => diff.diff-tree_--cc_--shortstat_main} | 2 +-
...diff.diff-tree_--cc_--stat_--summary_main} | 2 +-
...master => diff.diff-tree_--cc_--stat_main} | 2 +-
...e_--cc_master => diff.diff-tree_--cc_main} | 2 +-
...master => diff.diff-tree_-c_--abbrev_main} | 2 +-
...> diff.diff-tree_-c_--stat_--summary_main} | 2 +-
...t_master => diff.diff-tree_-c_--stat_main} | 2 +-
...-tree_-c_master => diff.diff-tree_-c_main} | 2 +-
...-p_-m_master => diff.diff-tree_-p_-m_main} | 2 +-
t/t4013/diff.diff-tree_-p_main | 2 +
t/t4013/diff.diff-tree_-p_master | 2 -
t/t4013/diff.diff-tree_main | 2 +
t/t4013/diff.diff-tree_master | 2 -
t/t4013/diff.diff_--dirstat_--cc_main~1_main | 3 +
.../diff.diff_--dirstat_--cc_master~1_master | 3 -
t/t4013/diff.diff_--dirstat_main~1_main~2 | 3 +
t/t4013/diff.diff_--dirstat_master~1_master~2 | 3 -
...ff.diff_--line-prefix=abc_main_main^_side} | 2 +-
...master^_side => diff.diff_main_main^_side} | 2 +-
...mat-patch_--attach_--stdout_initial..main} | 2 +-
...at-patch_--attach_--stdout_initial..main^} | 2 +-
...e_--stdout_--numbered-files_initial..main} | 2 +-
...t_--subject-prefix=TESTCASE_initial..main} | 2 +-
...mat-patch_--inline_--stdout_initial..main} | 2 +-
...at-patch_--inline_--stdout_initial..main^} | 2 +-
...t-patch_--inline_--stdout_initial..main^^} | 2 +-
...--stdout_--cover-letter_-n_initial..main^} | 8 +-
...atch_--stdout_--no-numbered_initial..main} | 8 +-
...t-patch_--stdout_--numbered_initial..main} | 8 +-
... diff.format-patch_--stdout_initial..main} | 8 +-
...diff.format-patch_--stdout_initial..main^} | 6 +-
t/t4013/diff.log_--decorate=full_--all | 4 +-
t/t4013/diff.log_--decorate_--all | 4 +-
..._--patch-with-stat_--summary_main_--_dir_} | 4 +-
...master => diff.log_--patch-with-stat_main} | 4 +-
...> diff.log_--patch-with-stat_main_--_dir_} | 4 +-
...oot_--cc_--patch-with-stat_--summary_main} | 4 +-
...g_--root_--patch-with-stat_--summary_main} | 4 +-
...=> diff.log_--root_--patch-with-stat_main} | 4 +-
...-root_-c_--patch-with-stat_--summary_main} | 4 +-
...root_-p_master => diff.log_--root_-p_main} | 4 +-
...log_--root_master => diff.log_--root_main} | 4 +-
...ter => diff.log_-GF_-p_--pickaxe-all_main} | 2 +-
...log_-GF_-p_master => diff.log_-GF_-p_main} | 2 +-
...{diff.log_-SF_master => diff.log_-GF_main} | 2 +-
...log_-SF_-p_master => diff.log_-SF_-p_main} | 2 +-
...{diff.log_-GF_master => diff.log_-SF_main} | 2 +-
t/t4013/diff.log_-SF_main_--max-count=0 | 2 +
...ount=2 => diff.log_-SF_main_--max-count=1} | 2 +-
t/t4013/diff.log_-SF_main_--max-count=2 | 7 +
t/t4013/diff.log_-SF_master_--max-count=0 | 2 -
t/t4013/diff.log_-SF_master_--max-count=1 | 7 -
...iff.log_-S_F_master => diff.log_-S_F_main} | 2 +-
...ter => diff.log_-m_-p_--first-parent_main} | 4 +-
...f.log_-m_-p_master => diff.log_-m_-p_main} | 4 +-
...master => diff.log_-p_--first-parent_main} | 4 +-
.../{diff.log_-p_master => diff.log_-p_main} | 4 +-
t/t4013/{diff.log_master => diff.log_main} | 4 +-
...iff.noellipses-diff-tree_-c_--abbrev_main} | 2 +-
...> diff.noellipses-whatchanged_--root_main} | 4 +-
...r => diff.noellipses-whatchanged_-SF_main} | 2 +-
...aster => diff.noellipses-whatchanged_main} | 4 +-
...t_master => diff.show_--first-parent_main} | 2 +-
...{diff.show_-c_master => diff.show_-c_main} | 2 +-
...{diff.show_-m_master => diff.show_-m_main} | 2 +-
t/t4013/{diff.show_master => diff.show_main} | 2 +-
..._--patch-with-stat_--summary_main_--_dir_} | 4 +-
...> diff.whatchanged_--patch-with-stat_main} | 4 +-
...hatchanged_--patch-with-stat_main_--_dir_} | 4 +-
...oot_--cc_--patch-with-stat_--summary_main} | 4 +-
...d_--root_--patch-with-stat_--summary_main} | 4 +-
...whatchanged_--root_--patch-with-stat_main} | 4 +-
...-root_-c_--patch-with-stat_--summary_main} | 4 +-
...master => diff.whatchanged_--root_-p_main} | 4 +-
...ot_master => diff.whatchanged_--root_main} | 4 +-
...-p_master => diff.whatchanged_-SF_-p_main} | 2 +-
...d_-SF_master => diff.whatchanged_-SF_main} | 2 +-
...ged_-p_master => diff.whatchanged_-p_main} | 4 +-
...atchanged_master => diff.whatchanged_main} | 4 +-
t/t4014-format-patch.sh | 176 +++---
t/t4015-diff-whitespace.sh | 2 +-
t/t4017-diff-retval.sh | 2 +-
t/t4038-diff-combined.sh | 14 +-
t/t4041-diff-submodule-option.sh | 2 +-
t/t4048-diff-combined-binary.sh | 10 +-
t/t4052-stat-output.sh | 4 +-
t/t4056-diff-order.sh | 2 +-
t/t4057-diff-combined-paths.sh | 20 +-
t/t4061-diff-indent.sh | 24 +-
t/t4066-diff-emit-delay.sh | 2 +-
t/t4103-apply-binary.sh | 36 +-
t/t4108-apply-threeway.sh | 14 +-
t/t4121-apply-diffs.sh | 2 +-
t/t4122-apply-symlink-inside.sh | 6 +-
t/t4150-am.sh | 34 +-
t/t4200-rerere.sh | 20 +-
t/t4201-shortlog.sh | 6 +-
t/t4202-log.sh | 106 ++--
t/t4203-mailmap.sh | 2 +-
t/t4204-patch-id.sh | 26 +-
t/t4207-log-decoration-colors.sh | 6 +-
t/t4208-log-magic-pathspec.sh | 4 +-
t/t4211/history.export | 2 +-
t/t4214-log-graph-octopus.sh | 2 +-
t/t4216-log-bloom.sh | 4 +-
t/t4253-am-keep-cr-dos.sh | 20 +-
t/t4257-am-interactive.sh | 2 +-
t/t5150-request-pull.sh | 34 +-
t/t5304-prune.sh | 2 +-
t/t5305-include-tag.sh | 2 +-
t/t5310-pack-bitmaps.sh | 12 +-
t/t5312-prune-corruption.sh | 16 +-
t/t5315-pack-objects-compression.sh | 2 +-
t/t5317-pack-objects-filter-objects.sh | 2 +-
t/t5322-pack-objects-sparse.sh | 2 +-
t/t5323-pack-redundant.sh | 66 +--
t/t5400-send-pack.sh | 60 +--
t/t5401-update-hooks.sh | 24 +-
t/t5402-post-merge-hook.sh | 2 +-
t/t5403-post-checkout-hook.sh | 6 +-
t/t5404-tracking-branches.sh | 8 +-
t/t5405-send-pack-rewind.sh | 6 +-
t/t5407-post-rewrite-hook.sh | 2 +-
t/t5410-receive-pack-alternates.sh | 4 +-
t/t5500-fetch-pack.sh | 28 +-
t/t5501-fetch-push-alternates.sh | 4 +-
t/t5502-quickfetch.sh | 6 +-
t/t5503-tagfollow.sh | 12 +-
t/t5504-fetch-receive-strict.sh | 20 +-
t/t5505-remote.sh | 160 +++---
t/t5506-remote-groups.sh | 4 +-
t/t5509-fetch-push-namespaces.sh | 30 +-
t/t5510-fetch.sh | 160 +++---
t/t5511-refspec.sh | 12 +-
t/t5512-ls-remote.sh | 26 +-
t/t5514-fetch-multiple.sh | 30 +-
t/t5515-fetch-merge-logic.sh | 24 +-
t/t5515/fetch.br-branches-default | 4 +-
t/t5515/fetch.br-branches-default-merge | 4 +-
...br-branches-default-merge_branches-default | 4 +-
t/t5515/fetch.br-branches-default-octopus | 4 +-
...-branches-default-octopus_branches-default | 4 +-
...fetch.br-branches-default_branches-default | 4 +-
t/t5515/fetch.br-branches-one | 2 +-
t/t5515/fetch.br-branches-one-merge | 2 +-
.../fetch.br-branches-one-merge_branches-one | 2 +-
t/t5515/fetch.br-branches-one-octopus | 2 +-
...fetch.br-branches-one-octopus_branches-one | 2 +-
t/t5515/fetch.br-branches-one_branches-one | 2 +-
t/t5515/fetch.br-config-explicit | 4 +-
t/t5515/fetch.br-config-explicit-merge | 4 +-
...h.br-config-explicit-merge_config-explicit | 4 +-
t/t5515/fetch.br-config-explicit-octopus | 4 +-
...br-config-explicit-octopus_config-explicit | 4 +-
.../fetch.br-config-explicit_config-explicit | 4 +-
t/t5515/fetch.br-config-glob | 4 +-
t/t5515/fetch.br-config-glob-merge | 4 +-
.../fetch.br-config-glob-merge_config-glob | 4 +-
t/t5515/fetch.br-config-glob-octopus | 4 +-
.../fetch.br-config-glob-octopus_config-glob | 4 +-
t/t5515/fetch.br-config-glob_config-glob | 4 +-
t/t5515/fetch.br-remote-explicit | 4 +-
t/t5515/fetch.br-remote-explicit-merge | 4 +-
...h.br-remote-explicit-merge_remote-explicit | 4 +-
t/t5515/fetch.br-remote-explicit-octopus | 4 +-
...br-remote-explicit-octopus_remote-explicit | 4 +-
.../fetch.br-remote-explicit_remote-explicit | 4 +-
t/t5515/fetch.br-remote-glob | 4 +-
t/t5515/fetch.br-remote-glob-merge | 4 +-
.../fetch.br-remote-glob-merge_remote-glob | 4 +-
t/t5515/fetch.br-remote-glob-octopus | 4 +-
.../fetch.br-remote-glob-octopus_remote-glob | 4 +-
t/t5515/fetch.br-remote-glob_remote-glob | 4 +-
t/t5515/fetch.br-unconfig | 4 +-
t/t5515/fetch.br-unconfig_--tags_.._.git | 2 +-
....._.git_one_tag_tag-one_tag_tag-three-file | 2 +-
...._.git_tag_tag-one-tree_tag_tag-three-file | 2 +-
...unconfig_.._.git_tag_tag-one_tag_tag-three | 2 +-
t/t5515/fetch.br-unconfig_branches-default | 4 +-
t/t5515/fetch.br-unconfig_branches-one | 2 +-
t/t5515/fetch.br-unconfig_config-explicit | 4 +-
t/t5515/fetch.br-unconfig_config-glob | 4 +-
t/t5515/fetch.br-unconfig_remote-explicit | 4 +-
t/t5515/fetch.br-unconfig_remote-glob | 4 +-
t/t5515/{fetch.master => fetch.main} | 6 +-
...tags_.._.git => fetch.main_--tags_.._.git} | 4 +-
...etch.master_.._.git => fetch.main_.._.git} | 2 +-
...ter_.._.git_one => fetch.main_.._.git_one} | 2 +-
...._.git_one_tag_tag-one_tag_tag-three-file} | 4 +-
...git_one_two => fetch.main_.._.git_one_two} | 2 +-
..._.git_tag_tag-one-tree_tag_tag-three-file} | 4 +-
...ch.main_.._.git_tag_tag-one_tag_tag-three} | 4 +-
...es-default => fetch.main_branches-default} | 6 +-
...r_branches-one => fetch.main_branches-one} | 4 +-
...ig-explicit => fetch.main_config-explicit} | 6 +-
...ter_remote-glob => fetch.main_config-glob} | 6 +-
...te-explicit => fetch.main_remote-explicit} | 6 +-
...ter_config-glob => fetch.main_remote-glob} | 6 +-
t/t5515/refs.br-branches-default | 4 +-
t/t5515/refs.br-branches-default-merge | 4 +-
...br-branches-default-merge_branches-default | 4 +-
t/t5515/refs.br-branches-default-octopus | 4 +-
...-branches-default-octopus_branches-default | 4 +-
.../refs.br-branches-default_branches-default | 4 +-
t/t5515/refs.br-branches-one | 4 +-
t/t5515/refs.br-branches-one-merge | 4 +-
.../refs.br-branches-one-merge_branches-one | 4 +-
t/t5515/refs.br-branches-one-octopus | 4 +-
.../refs.br-branches-one-octopus_branches-one | 4 +-
t/t5515/refs.br-branches-one_branches-one | 4 +-
t/t5515/refs.br-config-explicit | 6 +-
t/t5515/refs.br-config-explicit-merge | 6 +-
...s.br-config-explicit-merge_config-explicit | 6 +-
t/t5515/refs.br-config-explicit-octopus | 6 +-
...br-config-explicit-octopus_config-explicit | 6 +-
.../refs.br-config-explicit_config-explicit | 6 +-
t/t5515/refs.br-config-glob | 6 +-
t/t5515/refs.br-config-glob-merge | 6 +-
t/t5515/refs.br-config-glob-merge_config-glob | 6 +-
t/t5515/refs.br-config-glob-octopus | 6 +-
.../refs.br-config-glob-octopus_config-glob | 6 +-
t/t5515/refs.br-config-glob_config-glob | 6 +-
t/t5515/refs.br-remote-explicit | 6 +-
t/t5515/refs.br-remote-explicit-merge | 6 +-
...s.br-remote-explicit-merge_remote-explicit | 6 +-
t/t5515/refs.br-remote-explicit-octopus | 6 +-
...br-remote-explicit-octopus_remote-explicit | 6 +-
.../refs.br-remote-explicit_remote-explicit | 6 +-
t/t5515/refs.br-remote-glob | 6 +-
t/t5515/refs.br-remote-glob-merge | 6 +-
t/t5515/refs.br-remote-glob-merge_remote-glob | 6 +-
t/t5515/refs.br-remote-glob-octopus | 6 +-
.../refs.br-remote-glob-octopus_remote-glob | 6 +-
t/t5515/refs.br-remote-glob_remote-glob | 6 +-
t/t5515/refs.br-unconfig | 4 +-
t/t5515/refs.br-unconfig_--tags_.._.git | 4 +-
t/t5515/refs.br-unconfig_.._.git | 2 +-
t/t5515/refs.br-unconfig_.._.git_one | 2 +-
....._.git_one_tag_tag-one_tag_tag-three-file | 4 +-
t/t5515/refs.br-unconfig_.._.git_one_two | 2 +-
...._.git_tag_tag-one-tree_tag_tag-three-file | 4 +-
...unconfig_.._.git_tag_tag-one_tag_tag-three | 4 +-
t/t5515/refs.br-unconfig_branches-default | 4 +-
t/t5515/refs.br-unconfig_branches-one | 4 +-
t/t5515/refs.br-unconfig_config-explicit | 6 +-
t/t5515/refs.br-unconfig_config-glob | 6 +-
t/t5515/refs.br-unconfig_remote-explicit | 6 +-
t/t5515/refs.br-unconfig_remote-glob | 6 +-
t/t5515/{refs.master => refs.main} | 4 +-
...-tags_.._.git => refs.main_--tags_.._.git} | 4 +-
...{refs.master_.._.git => refs.main_.._.git} | 2 +-
...ster_.._.git_one => refs.main_.._.git_one} | 2 +-
...._.git_one_tag_tag-one_tag_tag-three-file} | 4 +-
....git_one_two => refs.main_.._.git_one_two} | 2 +-
..._.git_tag_tag-one-tree_tag_tag-three-file} | 4 +-
...efs.main_.._.git_tag_tag-one_tag_tag-three | 11 +
...hes-default => refs.main_branches-default} | 4 +-
...er_branches-one => refs.main_branches-one} | 4 +-
...fig-explicit => refs.main_config-explicit} | 6 +-
...ster_config-glob => refs.main_config-glob} | 6 +-
...ote-explicit => refs.main_remote-explicit} | 6 +-
...ster_remote-glob => refs.main_remote-glob} | 6 +-
...s.master_.._.git_tag_tag-one_tag_tag-three | 11 -
t/t5516-fetch-push.sh | 500 +++++++++---------
t/t5517-push-mirror.sh | 124 ++---
t/t5518-fetch-exit-status.sh | 6 +-
t/t5519-push-alternates.sh | 12 +-
t/t5520-pull.sh | 30 +-
t/t5521-pull-options.sh | 16 +-
t/t5523-push-upstream.sh | 50 +-
t/t5526-fetch-submodules.sh | 34 +-
t/t5527-fetch-odd-refs.sh | 14 +-
t/t5528-push-default.sh | 98 ++--
t/t5529-push-errors.sh | 2 +-
t/t5530-upload-pack-error.sh | 2 +-
t/t5531-deep-submodule-push.sh | 188 +++----
t/t5533-push-cas.sh | 88 +--
t/t5534-push-signed.sh | 4 +-
t/t5537-fetch-shallow.sh | 28 +-
t/t5538-push-shallow.sh | 22 +-
t/t5539-fetch-http-shallow.sh | 14 +-
t/t5540-http-push-webdav.sh | 8 +-
t/t5541-http-push-smart.sh | 36 +-
t/t5542-push-http-shallow.sh | 8 +-
t/t5543-atomic-push.sh | 80 +--
t/t5545-push-options.sh | 62 +--
t/t5548-push-porcelain.sh | 64 +--
t/t5550-http-fetch-dumb.sh | 20 +-
t/t5551-http-fetch-smart.sh | 20 +-
t/t5552-skipping-fetch-negotiator.sh | 2 +-
t/t5553-set-upstream.sh | 82 +--
t/t5561-http-backend.sh | 4 +-
t/t556x_common | 8 +-
t/t5570-git-daemon.sh | 16 +-
t/t5571-pre-push-hook.sh | 4 +-
t/t5572-pull-submodule.sh | 4 +-
t/t5580-unc-paths.sh | 2 +-
t/t5581-http-curl-verbose.sh | 2 +-
t/t5601-clone.sh | 4 +-
t/t5604-clone-reference.sh | 12 +-
t/t5605-clone-local.sh | 10 +-
t/t5606-clone-options.sh | 2 +-
t/t5607-clone-bundle.sh | 14 +-
t/t5608-clone-2gb.sh | 2 +-
t/t5609-clone-branch.sh | 6 +-
t/t5610-clone-detached.sh | 4 +-
t/t5611-clone-config.sh | 16 +-
t/t5612-clone-refspec.sh | 42 +-
t/t5614-clone-submodules-shallow.sh | 2 +-
t/t5616-partial-clone.sh | 50 +-
t/t5617-clone-submodules-remote.sh | 6 +-
t/t5700-protocol-v1.sh | 16 +-
t/t5701-git-serve.sh | 16 +-
t/t5702-protocol-v2.sh | 50 +-
t/t5703-upload-pack-ref-in-want.sh | 60 +--
t/t5801-remote-helpers.sh | 24 +-
t/t6000-rev-list-misc.sh | 2 +-
t/t6001-rev-list-graft.sh | 2 +-
t/t6004-rev-list-path-optim.sh | 14 +-
t/t6006-rev-list-format.sh | 14 +-
t/t6007-rev-list-cherry-pick-file.sh | 4 +-
t/t6008-rev-list-submodule.sh | 2 +-
t/t6009-rev-list-parent.sh | 6 +-
t/t6012-rev-list-simplify.sh | 16 +-
t/t6013-rev-list-reverse-parents.sh | 10 +-
t/t6016-rev-list-graph-simplify-history.sh | 2 +-
t/t6017-rev-list-stdin.sh | 8 +-
t/t6018-rev-list-glob.sh | 56 +-
t/t6019-rev-list-ancestry-path.sh | 6 +-
t/t6020-merge-df.sh | 6 +-
t/t6022-merge-rename.sh | 46 +-
t/t6024-recursive-merge.sh | 4 +-
t/t6025-merge-symlinks.sh | 14 +-
t/t6026-merge-attr.sh | 24 +-
t/t6027-merge-binary.sh | 6 +-
t/t6029-merge-subtree.sh | 30 +-
t/t6030-bisect-porcelain.sh | 10 +-
t/t6031-merge-filemode.sh | 10 +-
t/t6032-merge-large-rename.sh | 6 +-
t/t6033-merge-crlf.sh | 2 +-
t/t6034-merge-rename-nocruft.sh | 2 +-
t/t6035-merge-dir-to-symlink.sh | 22 +-
t/t6036-recursive-corner-cases.sh | 28 +-
t/t6037-merge-ours-theirs.sh | 28 +-
t/t6038-merge-text-auto.sh | 12 +-
t/t6039-merge-ignorecase.sh | 10 +-
t/t6040-tracking-info.sh | 70 +--
t/t6042-merge-rename-corner-cases.sh | 12 +-
t/t6045-merge-rename-delete.sh | 2 +-
t/t6047-diff3-conflict-markers.sh | 14 +-
t/t6050-replace.sh | 10 +-
t/t6101-rev-parse-parents.sh | 2 +-
t/t6110-rev-list-sparse.sh | 2 +-
t/t6111-rev-list-treesame.sh | 6 +-
t/t6112-rev-list-filters-objects.sh | 14 +-
t/t6120-describe.sh | 20 +-
t/t6200-fmt-merge-msg.sh | 40 +-
t/t6300-for-each-ref.sh | 166 +++---
t/t6302-for-each-ref-filter.sh | 58 +-
t/t6501-freshen-objects.sh | 2 +-
t/t7003-filter-branch.sh | 40 +-
t/t7004-tag.sh | 8 +-
t/t7030-verify-tag.sh | 2 +-
t/t7060-wtstatus.sh | 26 +-
t/t7063-status-untracked-cache.sh | 14 +-
t/t7064-wtstatus-pv2.sh | 100 ++--
t/t7102-reset.sh | 6 +-
t/t7113-post-index-change-hook.sh | 2 +-
t/t7201-co.sh | 110 ++--
t/t7400-submodule-basic.sh | 20 +-
t/t7403-submodule-sync.sh | 10 +-
t/t7405-submodule-merge.sh | 14 +-
t/t7406-submodule-update.sh | 38 +-
t/t7407-submodule-foreach.sh | 24 +-
t/t7409-submodule-detached-work-tree.sh | 8 +-
t/t7417-submodule-path-url.sh | 2 +-
t/t7501-commit-basic-functionality.sh | 2 +-
t/t7502-commit-porcelain.sh | 12 +-
...3-pre-commit-and-pre-merge-commit-hooks.sh | 42 +-
t/t7504-commit-msg-hook.sh | 24 +-
t/t7505-prepare-commit-msg-hook.sh | 20 +-
t/t7508-status.sh | 58 +-
t/t7510-signed-commit.sh | 2 +-
t/t7512-status-help.sh | 40 +-
t/t7517-per-repo-email.sh | 12 +-
t/t7600-merge.sh | 44 +-
t/t7606-merge-custom.sh | 2 +-
t/t7607-merge-overwrite.sh | 2 +-
t/t7608-merge-messages.sh | 36 +-
t/t7609-merge-co-error-msgs.sh | 6 +-
t/t7610-mergetool.sh | 170 +++---
t/t7611-merge-abort.sh | 4 +-
t/t7612-merge-verify-signatures.sh | 2 +-
t/t7614-merge-signoff.sh | 24 +-
t/t7701-repack-unpack-unreachable.sh | 2 +-
t/t7800-difftool.sh | 38 +-
t/t7810-grep.sh | 28 +-
t/t8001-annotate.sh | 2 +-
t/t8003-blame-corner-cases.sh | 4 +-
t/t8004-blame-with-conflicts.sh | 14 +-
t/t9001-send-email.sh | 28 +-
t/t9010-svn-fe.sh | 2 +-
t/t9020-remote-svn.sh | 16 +-
t/t9100-git-svn-basic.sh | 2 +-
...branch.sh => t9145-git-svn-main-branch.sh} | 6 +-
t/t9151-svn-mergeinfo.sh | 2 +-
t/t9155-git-svn-fetch-deleted-tag.sh | 2 +-
t/t9156-git-svn-fetch-deleted-tag-2.sh | 6 +-
t/t9163-git-svn-reset-clears-caches.sh | 2 +-
t/t9169-git-svn-dcommit-crlf.sh | 2 +-
t/t9300-fast-import.sh | 78 +--
t/t9301-fast-import-notes.sh | 14 +-
t/t9302-fast-import-unpack-limit.sh | 16 +-
t/t9303-fast-import-compression.sh | 2 +-
t/t9350-fast-export.sh | 86 +--
t/t9351-fast-export-anonymize.sh | 10 +-
t/t9400-git-cvsserver-server.sh | 32 +-
t/t9401-git-cvsserver-crlf.sh | 16 +-
t/t9402-git-cvsserver-refs.sh | 8 +-
t/t9500-gitweb-standalone-no-errors.sh | 20 +-
t/t9501-gitweb-standalone-http-status.sh | 14 +-
t/t9502-gitweb-standalone-parse-output.sh | 16 +-
t/t9600-cvsimport.sh | 2 +-
t/t9601-cvsimport-vendor-branch.sh | 16 +-
t/t9602-cvsimport-branches-tags.sh | 4 +-
t/t9603-cvsimport-patchsets.sh | 8 +-
t/t9800-git-p4-basic.sh | 16 +-
t/t9801-git-p4-branch.sh | 20 +-
t/t9802-git-p4-filetype.sh | 8 +-
t/t9806-git-p4-options.sh | 42 +-
t/t9807-git-p4-submit.sh | 4 +-
t/t9809-git-p4-client-view.sh | 12 +-
t/t9810-git-p4-rcs.sh | 2 +-
t/t9811-git-p4-label-import.sh | 2 +-
t/t9812-git-p4-wildcards.sh | 2 +-
t/t9813-git-p4-preserve-users.sh | 6 +-
t/t9818-git-p4-block.sh | 2 +-
t/t9823-git-p4-mock-lfs.sh | 2 +-
t/t9832-unshelve.sh | 4 +-
t/t9902-completion.sh | 124 ++---
t/t9903-bash-prompt.sh | 114 ++--
t/test-lib-functions.sh | 4 +-
t/test-terminal.perl | 32 +-
templates/hooks--pre-rebase.sample | 44 +-
transport-helper.c | 2 +-
761 files changed, 5896 insertions(+), 5896 deletions(-)
rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)
rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)
rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)
rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)
rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)
rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)
rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)
rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)
rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)
rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)
rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)
create mode 100644 t/t4013/diff.diff-tree_-p_main
delete mode 100644 t/t4013/diff.diff-tree_-p_master
create mode 100644 t/t4013/diff.diff-tree_main
delete mode 100644 t/t4013/diff.diff-tree_master
create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main
delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master
create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2
delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2
rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)
rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)
rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)
rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)
rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)
rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)
rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)
rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)
rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)
rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (95%)
rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (96%)
rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (96%)
rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)
rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (95%)
rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (95%)
rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)
rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)
rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (97%)
rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (97%)
rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)
rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)
rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)
rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)
rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)
rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)
rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)
rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)
rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)
create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0
rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)
create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2
delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0
delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1
rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)
rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)
rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)
rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (96%)
rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)
rename t/t4013/{diff.log_master => diff.log_main} (97%)
rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)
rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)
rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)
rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)
rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)
rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)
rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)
rename t/t4013/{diff.show_master => diff.show_main} (96%)
rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (93%)
rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)
rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)
rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)
rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)
rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)
rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)
rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (97%)
rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (96%)
rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)
rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)
rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (97%)
rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (96%)
rename t/t5515/{fetch.master => fetch.main} (95%)
rename t/t5515/{fetch.master_--tags_.._.git => fetch.main_--tags_.._.git} (92%)
rename t/t5515/{fetch.master_.._.git => fetch.main_.._.git} (73%)
rename t/t5515/{fetch.master_.._.git_one => fetch.main_.._.git_one} (74%)
rename t/t5515/{fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file => fetch.main_.._.git_one_tag_tag-one_tag_tag-three-file} (88%)
rename t/t5515/{fetch.master_.._.git_one_two => fetch.main_.._.git_one_two} (83%)
rename t/t5515/{fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file => fetch.main_.._.git_tag_tag-one-tree_tag_tag-three-file} (87%)
rename t/t5515/{fetch.master_.._.git_tag_tag-one_tag_tag-three => fetch.main_.._.git_tag_tag-one_tag_tag-three} (88%)
rename t/t5515/{fetch.master_branches-default => fetch.main_branches-default} (81%)
rename t/t5515/{fetch.master_branches-one => fetch.main_branches-one} (93%)
rename t/t5515/{fetch.master_config-explicit => fetch.main_config-explicit} (86%)
rename t/t5515/{fetch.master_remote-glob => fetch.main_config-glob} (93%)
rename t/t5515/{fetch.master_remote-explicit => fetch.main_remote-explicit} (86%)
rename t/t5515/{fetch.master_config-glob => fetch.main_remote-glob} (93%)
rename t/t5515/{refs.master => refs.main} (81%)
rename t/t5515/{refs.master_--tags_.._.git => refs.main_--tags_.._.git} (81%)
rename t/t5515/{refs.master_.._.git => refs.main_.._.git} (79%)
rename t/t5515/{refs.master_.._.git_one => refs.main_.._.git_one} (79%)
rename t/t5515/{refs.master_.._.git_one_tag_tag-one_tag_tag-three-file => refs.main_.._.git_one_tag_tag-one_tag_tag-three-file} (81%)
rename t/t5515/{refs.master_.._.git_one_two => refs.main_.._.git_one_two} (79%)
rename t/t5515/{refs.master_.._.git_tag_tag-one-tree_tag_tag-three-file => refs.main_.._.git_tag_tag-one-tree_tag_tag-three-file} (81%)
create mode 100644 t/t5515/refs.main_.._.git_tag_tag-one_tag_tag-three
rename t/t5515/{refs.master_branches-default => refs.main_branches-default} (83%)
rename t/t5515/{refs.master_branches-one => refs.main_branches-one} (83%)
rename t/t5515/{refs.master_config-explicit => refs.main_config-explicit} (79%)
rename t/t5515/{refs.master_config-glob => refs.main_config-glob} (79%)
rename t/t5515/{refs.master_remote-explicit => refs.main_remote-explicit} (79%)
rename t/t5515/{refs.master_remote-glob => refs.main_remote-glob} (79%)
delete mode 100644 t/t5515/refs.master_.._.git_tag_tag-one_tag_tag-three
rename t/{t9145-git-svn-master-branch.sh => t9145-git-svn-main-branch.sh} (77%)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index ecd0b340b1..615c54878c 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -49,7 +49,7 @@ endif
MAN_XML = $(patsubst %.txt,%.xml,$(MAN_TXT))
MAN_HTML = $(patsubst %.txt,%.html,$(MAN_TXT))
-GIT_MAN_REF = master
+GIT_MAN_REF = main
OBSOLETE_HTML += everyday.html
OBSOLETE_HTML += git-remote-helpers.html
diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
index 427274df4d..d752b73443 100644
--- a/Documentation/MyFirstContribution.txt
+++ b/Documentation/MyFirstContribution.txt
@@ -113,15 +113,15 @@ commands such as `sl`.)
Let's start by making a development branch to work on our changes. Per
`Documentation/SubmittingPatches`, since a brand new command is a new feature,
-it's fine to base your work on `master`. However, in the future for bugfixes,
+it's fine to base your work on `main`. However, in the future for bugfixes,
etc., you should check that document and base it on the appropriate branch.
-For the purposes of this document, we will base all our work on the `master`
+For the purposes of this document, we will base all our work on the `main`
branch of the upstream project. Create the `psuh` branch you will use for
development like so:
----
-$ git checkout -b psuh origin/master
+$ git checkout -b psuh origin/main
----
We'll make a number of commits here in order to demonstrate how to send a topic
@@ -417,7 +417,7 @@ the declarations and the logic, respectively.
...
- c = lookup_commit_reference_by_name("origin/master");
+ c = lookup_commit_reference_by_name("origin/main");
if (c != NULL) {
pp_commit_easy(CMIT_FMT_ONELINE, c, &commitline);
@@ -438,12 +438,12 @@ pretty-prints the commit according to that shorthand. These are similar to the
formats available with `--pretty=FOO` in many Git commands.
Build it and run, and if you're using the same name in the example, you should
-see the subject line of the most recent commit in `origin/master` that you know
+see the subject line of the most recent commit in `origin/main` that you know
about. Neat! Let's commit that as well.
----
$ git add builtin/psuh.c
-$ git commit -sm "psuh: display the top of origin/master"
+$ git commit -sm "psuh: display the top of origin/main"
----
[[add-documentation]]
@@ -780,13 +780,13 @@ by running `git branch`. If you didn't, now is a good time to move your new
commits to their own branch.
As mentioned briefly at the beginning of this document, we are basing our work
-on `master`, so go ahead and update as shown below, or using your preferred
+on `main`, so go ahead and update as shown below, or using your preferred
workflow.
----
-$ git checkout master
+$ git checkout main
$ git pull -r
-$ git rebase master psuh
+$ git rebase main psuh
----
Finally, you're ready to push your new topic branch! (Due to our branch and
@@ -904,7 +904,7 @@ Sending emails with Git is a two-part process; before you can prepare the emails
themselves, you'll need to prepare the patches. Luckily, this is pretty simple:
----
-$ git format-patch --cover-letter -o psuh/ master..psuh
+$ git format-patch --cover-letter -o psuh/ main..psuh
----
The `--cover-letter` parameter tells `format-patch` to create a cover letter
@@ -915,8 +915,8 @@ The `-o psuh/` parameter tells `format-patch` to place the patch files into a
directory. This is useful because `git send-email` can take a directory and
send out all the patches from there.
-`master..psuh` tells `format-patch` to generate patches for the difference
-between `master` and `psuh`. It will make one patch file per commit. After you
+`main..psuh` tells `format-patch` to generate patches for the difference
+between `main` and `psuh`. It will make one patch file per commit. After you
run, you can go have a look at each of the patches with your favorite text
editor and make sure everything looks alright; however, it's not recommended to
make code fixups via the patch file. It's a better idea to make the change the
@@ -1038,7 +1038,7 @@ similar.
First, generate your v2 patches again:
----
-$ git format-patch -v2 --cover-letter -o psuh/ master..psuh
+$ git format-patch -v2 --cover-letter -o psuh/ main..psuh
----
This will add your v2 patches, all named like `v2-000n-my-commit-subject.patch`,
@@ -1179,11 +1179,11 @@ look at the section below this one for some context.)
[[after-approval]]
=== After Review Approval
-The Git project has four integration branches: `pu`, `next`, `master`, and
+The Git project has four integration branches: `pu`, `next`, `main`, and
`maint`. Your change will be placed into `pu` fairly early on by the maintainer
while it is still in the review process; from there, when it is ready for wider
testing, it will be merged into `next`. Plenty of early testers use `next` and
-may report issues. Eventually, changes in `next` will make it to `master`,
+may report issues. Eventually, changes in `next` will make it to `main`,
which is typically considered stable. Finally, when a new release is cut,
`maint` is used to base bugfixes onto. As mentioned at the beginning of this
document, you can read `Documents/SubmittingPatches` for some more info about
@@ -1214,4 +1214,4 @@ against the appropriate GitGitGadget/Git branch.
If you're using `git send-email`, you can use it the same way as before, but you
should generate your diffs from `<topic>..<mybranch>` and base your work on
-`<topic>` instead of `master`.
+`<topic>` instead of `main`.
diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
index c3f2d1a831..3533a9e519 100644
--- a/Documentation/MyFirstObjectWalk.txt
+++ b/Documentation/MyFirstObjectWalk.txt
@@ -24,10 +24,10 @@ revision walk is used for operations like `git log`.
== Setting Up
-Create a new branch from `master`.
+Create a new branch from `main`.
----
-git checkout -b revwalk origin/master
+git checkout -b revwalk origin/main
----
We'll put our fiddling into a new command. For fun, let's name it `git walken`.
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 4515cab519..d599d6791e 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -13,23 +13,23 @@ In general, always base your work on the oldest branch that your
change is relevant to.
* A bugfix should be based on `maint` in general. If the bug is not
- present in `maint`, base it on `master`. For a bug that's not yet
- in `master`, find the topic that introduces the regression, and
+ present in `maint`, base it on `main`. For a bug that's not yet
+ in `main`, find the topic that introduces the regression, and
base your work on the tip of the topic.
-* A new feature should be based on `master` in general. If the new
- feature depends on a topic that is in `pu`, but not in `master`,
+* A new feature should be based on `main` in general. If the new
+ feature depends on a topic that is in `pu`, but not in `main`,
base your work on the tip of that topic.
-* Corrections and enhancements to a topic not yet in `master` should
+* Corrections and enhancements to a topic not yet in `main` should
be based on the tip of that topic. If the topic has not been merged
to `next`, it's alright to add a note to squash minor corrections
into the series.
* In the exceptional case that a new feature depends on several topics
- not in `master`, start working on `next` or `pu` privately and send
+ not in `main`, start working on `next` or `pu` privately and send
out patches for discussion. Before the final merge, you may have to
- wait until some of the dependent topics graduate to `master`, and
+ wait until some of the dependent topics graduate to `main`, and
rebase your work.
* Some parts of the system have dedicated maintainers with their own
@@ -37,7 +37,7 @@ change is relevant to.
these parts should be based on their trees.
To find the tip of a topic branch, run `git log --first-parent
-master..pu` and look for the merge commit. The second parent of this
+main..pu` and look for the merge commit. The second parent of this
commit is the tip of the topic branch.
[[separate-commits]]
@@ -177,7 +177,7 @@ Please make sure your patch does not add commented out debugging code,
or include any extra files which do not relate to what your patch
is trying to achieve. Make sure to review
your patch after generating it, to ensure accuracy. Before
-sending out, please make sure it cleanly applies to the `master`
+sending out, please make sure it cleanly applies to the `main`
branch head. If you are preparing a work based on "next" branch,
that is fine, but please mark it as such.
@@ -420,7 +420,7 @@ help you find out who they are.
good. Send it to the maintainer and cc the list.
. A topic branch is created with the patch and is merged to `next`,
- and cooked further and eventually graduates to `master`.
+ and cooked further and eventually graduates to `main`.
In any time between the (2)-(3) cycle, the maintainer may pick it up
from the list and queue it to `pu`, in order to make it easier for
@@ -431,11 +431,11 @@ their trees themselves.
== Know the status of your patch after submission
* You can use Git itself to find out when your patch is merged in
- master. `git pull --rebase` will automatically skip already-applied
+ main. `git pull --rebase` will automatically skip already-applied
patches, and will let you know. This works only if you rebase on top
of the branch in which your patch has been merged (i.e. it will not
tell you if your patch is merged in pu if you rebase on top of
- master).
+ main).
* Read the Git mailing list, the maintainer regularly posts messages
entitled "What's cooking in git.git" and "What's in git.git" giving
diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt
index f5e5b38c68..a074e7469b 100644
--- a/Documentation/config/push.txt
+++ b/Documentation/config/push.txt
@@ -37,9 +37,9 @@ This mode has become the default in Git 2.0.
* `matching` - push all branches having the same name on both ends.
This makes the repository you are pushing to remember the set of
branches that will be pushed out (e.g. if you always push 'maint'
- and 'master' there and no other branches, the repository you push
+ and 'main' there and no other branches, the repository you push
to will have these two branches, and your local 'maint' and
- 'master' will be pushed there).
+ 'main' will be pushed there).
+
To use this mode effectively, you have to make sure _all_ the
branches you would push out are ready to be pushed out before
diff --git a/Documentation/config/transfer.txt b/Documentation/config/transfer.txt
index f5b6245270..d5f411bccf 100644
--- a/Documentation/config/transfer.txt
+++ b/Documentation/config/transfer.txt
@@ -53,10 +53,10 @@ If you have multiple hideRefs values, later entries override earlier ones
+
If a namespace is in use, the namespace prefix is stripped from each
reference before it is matched against `transfer.hiderefs` patterns.
-For example, if `refs/heads/master` is specified in `transfer.hideRefs` and
-the current namespace is `foo`, then `refs/namespaces/foo/refs/heads/master`
-is omitted from the advertisements but `refs/heads/master` and
-`refs/namespaces/bar/refs/heads/master` are still advertised as so-called
+For example, if `refs/heads/main` is specified in `transfer.hideRefs` and
+the current namespace is `foo`, then `refs/namespaces/foo/refs/heads/main`
+is omitted from the advertisements but `refs/heads/main` and
+`refs/namespaces/bar/refs/heads/main` are still advertised as so-called
"have" lines. In order to match refs before stripping, add a `^` in front of
the ref name. If you combine `!` and `^`, `!` must be specified first.
+
diff --git a/Documentation/doc-diff b/Documentation/doc-diff
index 1694300e50..077e0668a4 100755
--- a/Documentation/doc-diff
+++ b/Documentation/doc-diff
@@ -4,9 +4,9 @@
# Compared to a source diff, this can reveal mistakes in the formatting.
# For example:
#
-# ./doc-diff origin/master HEAD
+# ./doc-diff origin/main HEAD
#
-# would show the differences introduced by a branch based on master.
+# would show the differences introduced by a branch based on main.
OPTIONS_SPEC="\
doc-diff [options] <from> <to> [-- <diff-options>]
diff --git a/Documentation/git-archimport.txt b/Documentation/git-archimport.txt
index a595a0ffee..89ce0d3117 100644
--- a/Documentation/git-archimport.txt
+++ b/Documentation/git-archimport.txt
@@ -45,7 +45,7 @@ archives that it imports, it is also possible to specify Git branch names
manually. To do so, write a Git branch name after each <archive/branch>
parameter, separated by a colon. This way, you can shorten the Arch
branch names and convert Arch jargon to Git jargon, for example mapping a
-"PROJECT{litdd}devo{litdd}VERSION" branch to "master".
+"PROJECT{litdd}devo{litdd}VERSION" branch to "main".
Associating multiple Arch branches to one Git branch is possible; the
result will make the most sense only if no commits are made to the first
diff --git a/Documentation/git-bisect-lk2009.txt b/Documentation/git-bisect-lk2009.txt
index 3ba49e85b7..b8a99878e8 100644
--- a/Documentation/git-bisect-lk2009.txt
+++ b/Documentation/git-bisect-lk2009.txt
@@ -294,7 +294,7 @@ the branch we were in before we started bisecting:
$ git bisect reset
Checking out files: 100% (21549/21549), done.
Previous HEAD position was 2ddcca3... Linux 2.6.26-rc1
-Switched to branch 'master'
+Switched to branch 'main'
-------------
Driving a bisection automatically
@@ -1229,7 +1229,7 @@ message or the author. And it can also be used instead of git "grafts"
to link a repository with another old repository.
In fact it's this last feature that "sold" it to the Git community, so
-it is now in the "master" branch of Git's Git repository and it should
+it is now in the "main" branch of Git's Git repository and it should
be released in Git 1.6.5 in October or November 2009.
One problem with "git replace" is that currently it stores all the
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 135206ff4a..b6854aca2f 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -331,7 +331,7 @@ $ git branch -D test <2>
<1> Delete the remote-tracking branches "todo", "html" and "man". The next
'fetch' or 'pull' will create them again unless you configure them not to.
See linkgit:git-fetch[1].
-<2> Delete the "test" branch even if the "master" branch (or whichever branch
+<2> Delete the "test" branch even if the "main" branch (or whichever branch
is currently checked out) does not have all commits from the test branch.
Listing branches from a specific remote::
diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index d34b0964be..2ae0838ff8 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -66,8 +66,8 @@ unbundle <file>::
A list of arguments, acceptable to 'git rev-parse' and
'git rev-list' (and containing a named ref, see SPECIFYING REFERENCES
below), that specifies the specific objects and references
- to transport. For example, `master~10..master` causes the
- current master reference to be packaged along with all objects
+ to transport. For example, `main~10..main` causes the
+ current main reference to be packaged along with all objects
added since its 10th ancestor commit. There is no explicit
limit to the number of references and objects that may be
packaged.
@@ -112,12 +112,12 @@ SPECIFYING REFERENCES
'git bundle' will only package references that are shown by
'git show-ref': this includes heads, tags, and remote heads. References
-such as `master~1` cannot be packaged, but are perfectly suitable for
+such as `main~1` cannot be packaged, but are perfectly suitable for
defining the basis. More than one reference may be packaged, and more
than one basis can be specified. The objects packaged are those not
contained in the union of the given bases. Each basis can be
-specified explicitly (e.g. `^master~10`), or implicitly (e.g.
-`master~10..master`, `--since=10.days.ago master`).
+specified explicitly (e.g. `^main~10`), or implicitly (e.g.
+`main~10..main`, `--since=10.days.ago main`).
It is very important that the basis used be held by the destination.
It is okay to err on the side of caution, causing the bundle file
@@ -139,7 +139,7 @@ Assume you want to transfer the history from a repository R1 on machine A
to another repository R2 on machine B.
For whatever reason, direct connection between A and B is not allowed,
but we can move data from A to B via some mechanism (CD, email, etc.).
-We want to update R2 with development made on the branch master in R1.
+We want to update R2 with development made on the branch main in R1.
To bootstrap the process, you can first create a bundle that does not have
any basis. You can use a tag to remember up to what commit you last
@@ -148,8 +148,8 @@ with an incremental bundle:
----------------
machineA$ cd R1
-machineA$ git bundle create file.bundle master
-machineA$ git tag -f lastR2bundle master
+machineA$ git bundle create file.bundle main
+machineA$ git tag -f lastR2bundle main
----------------
Then you transfer file.bundle to the target machine B. Because this
@@ -157,7 +157,7 @@ bundle does not require any existing object to be extracted, you can
create a new repository on machine B by cloning from it:
----------------
-machineB$ git clone -b master /home/me/tmp/file.bundle R2
+machineB$ git clone -b main /home/me/tmp/file.bundle R2
----------------
This will define a remote called "origin" in the resulting repository that
@@ -179,8 +179,8 @@ incremental bundle to update the other repository:
----------------
machineA$ cd R1
-machineA$ git bundle create file.bundle lastR2bundle..master
-machineA$ git tag -f lastR2bundle master
+machineA$ git bundle create file.bundle lastR2bundle..main
+machineA$ git tag -f lastR2bundle main
----------------
You then transfer the bundle to the other machine to replace
@@ -201,19 +201,19 @@ the linkgit:git-log[1] command. Here are more examples:
You can use a tag that is present in both:
----------------
-$ git bundle create mybundle v1.0.0..master
+$ git bundle create mybundle v1.0.0..main
----------------
You can use a basis based on time:
----------------
-$ git bundle create mybundle --since=10.days master
+$ git bundle create mybundle --since=10.days main
----------------
You can use the number of commits:
----------------
-$ git bundle create mybundle -10 master
+$ git bundle create mybundle -10 main
----------------
You can run `git-bundle verify` to see if you can extract from a bundle
@@ -231,7 +231,7 @@ regular repository which it fetches or pulls from. You can, for example, map
references when fetching:
----------------
-$ git fetch mybundle master:localRef
+$ git fetch mybundle main:localRef
----------------
You can also see what references it offers:
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 5b697eee1b..caab15de02 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -361,15 +361,15 @@ For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
DETACHED HEAD
-------------
-`HEAD` normally refers to a named branch (e.g. `master`). Meanwhile, each
+`HEAD` normally refers to a named branch (e.g. `main`). Meanwhile, each
branch refers to a specific commit. Let's look at a repo with three
-commits, one of them tagged, and with branch `master` checked out:
+commits, one of them tagged, and with branch `main` checked out:
------------
- HEAD (refers to branch 'master')
+ HEAD (refers to branch 'main')
|
v
-a---b---c branch 'master' (refers to commit 'c')
+a---b---c branch 'main' (refers to commit 'c')
^
|
tag 'v2.0' (refers to commit 'b')
@@ -377,17 +377,17 @@ a---b---c branch 'master' (refers to commit 'c')
When a commit is created in this state, the branch is updated to refer to
the new commit. Specifically, 'git commit' creates a new commit `d`, whose
-parent is commit `c`, and then updates branch `master` to refer to new
-commit `d`. `HEAD` still refers to branch `master` and so indirectly now refers
+parent is commit `c`, and then updates branch `main` to refer to new
+commit `d`. `HEAD` still refers to branch `main` and so indirectly now refers
to commit `d`:
------------
$ edit; git add; git commit
- HEAD (refers to branch 'master')
+ HEAD (refers to branch 'main')
|
v
-a---b---c---d branch 'master' (refers to commit 'd')
+a---b---c---d branch 'main' (refers to commit 'd')
^
|
tag 'v2.0' (refers to commit 'b')
@@ -400,12 +400,12 @@ checkout commit `b` (here we show two ways this may be done):
------------
$ git checkout v2.0 # or
-$ git checkout master^^
+$ git checkout main^^
HEAD (refers to commit 'b')
|
v
-a---b---c---d branch 'master' (refers to commit 'd')
+a---b---c---d branch 'main' (refers to commit 'd')
^
|
tag 'v2.0' (refers to commit 'b')
@@ -424,7 +424,7 @@ $ edit; git add; git commit
v
e
/
-a---b---c---d branch 'master' (refers to commit 'd')
+a---b---c---d branch 'main' (refers to commit 'd')
^
|
tag 'v2.0' (refers to commit 'b')
@@ -441,22 +441,22 @@ $ edit; git add; git commit
v
e---f
/
-a---b---c---d branch 'master' (refers to commit 'd')
+a---b---c---d branch 'main' (refers to commit 'd')
^
|
tag 'v2.0' (refers to commit 'b')
------------
In fact, we can perform all the normal Git operations. But, let's look
-at what happens when we then checkout `master`:
+at what happens when we then checkout `main`:
------------
-$ git checkout master
+$ git checkout main
- HEAD (refers to branch 'master')
+ HEAD (refers to branch 'main')
e---f |
/ v
-a---b---c---d branch 'master' (refers to commit 'd')
+a---b---c---d branch 'main' (refers to commit 'd')
^
|
tag 'v2.0' (refers to commit 'b')
@@ -509,13 +509,13 @@ to checkout these paths out of the index.
EXAMPLES
--------
-. The following sequence checks out the `master` branch, reverts
+. The following sequence checks out the `main` branch, reverts
the `Makefile` to two revisions back, deletes `hello.c` by
mistake, and gets it back from the index.
+
------------
-$ git checkout master <1>
-$ git checkout master~2 Makefile <2>
+$ git checkout main <1>
+$ git checkout main~2 Makefile <2>
$ rm -f hello.c
$ git checkout hello.c <3>
------------
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 75feeef08a..12efb187b3 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -48,7 +48,7 @@ OPTIONS
default, as if the `--no-walk` option was specified, see
linkgit:git-rev-list[1]. Note that specifying a range will
feed all <commit>... arguments to a single revision walk
- (see a later example that uses 'maint master..next').
+ (see a later example that uses 'maint main..next').
-e::
--edit::
@@ -167,36 +167,36 @@ include::sequencer.txt[]
EXAMPLES
--------
-`git cherry-pick master`::
+`git cherry-pick main`::
Apply the change introduced by the commit at the tip of the
- master branch and create a new commit with this change.
+ main branch and create a new commit with this change.
-`git cherry-pick ..master`::
-`git cherry-pick ^HEAD master`::
+`git cherry-pick ..main`::
+`git cherry-pick ^HEAD main`::
Apply the changes introduced by all commits that are ancestors
- of master but not of HEAD to produce new commits.
+ of main but not of HEAD to produce new commits.
-`git cherry-pick maint next ^master`::
-`git cherry-pick maint master..next`::
+`git cherry-pick maint next ^main`::
+`git cherry-pick maint main..next`::
Apply the changes introduced by all commits that are
- ancestors of maint or next, but not master or any of its
+ ancestors of maint or next, but not main or any of its
ancestors. Note that the latter does not mean `maint` and
- everything between `master` and `next`; specifically,
- `maint` will not be used if it is included in `master`.
+ everything between `main` and `next`; specifically,
+ `maint` will not be used if it is included in `main`.
-`git cherry-pick master~4 master~2`::
+`git cherry-pick main~4 main~2`::
Apply the changes introduced by the fifth and third last
- commits pointed to by master and create 2 new commits with
+ commits pointed to by main and create 2 new commits with
these changes.
-`git cherry-pick -n master~1 next`::
+`git cherry-pick -n main~1 next`::
Apply to the working tree and the index the changes introduced
- by the second last commit pointed to by master and by the last
+ by the second last commit pointed to by main and by the last
commit pointed to by next, but do not create any commit with
these changes.
@@ -208,9 +208,9 @@ EXAMPLES
are in next but not HEAD to the current branch, creating a new
commit for each new change.
-`git rev-list --reverse master -- README | git cherry-pick -n --stdin`::
+`git rev-list --reverse main -- README | git cherry-pick -n --stdin`::
- Apply the changes introduced by all commits on the master
+ Apply the changes introduced by all commits on the main
branch that touched README to the working tree and index,
so the result can be inspected and made into a single new
commit if suitable.
diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt
index 0ea921a593..aa6706cf17 100644
--- a/Documentation/git-cherry.txt
+++ b/Documentation/git-cherry.txt
@@ -51,9 +51,9 @@ applied by the upstream maintainer. In such a workflow you might
create and send a topic branch like this:
------------
-$ git checkout -b topic origin/master
+$ git checkout -b topic origin/main
# work and create some commits
-$ git format-patch origin/master
+$ git format-patch origin/main
$ git send-email ... 00*
------------
@@ -61,7 +61,7 @@ Later, you can see whether your changes have been applied by saying
(still on `topic`):
------------
-$ git fetch # update your notion of origin/master
+$ git fetch # update your notion of origin/main
$ git cherry -v
------------
@@ -72,8 +72,8 @@ In a situation where topic consisted of three commits, and the
maintainer applied two of them, the situation might look like:
------------
-$ git log --graph --oneline --decorate --boundary origin/master...topic
-* 7654321 (origin/master) upstream tip commit
+$ git log --graph --oneline --decorate --boundary origin/main...topic
+* 7654321 (origin/main) upstream tip commit
[... snip some other commits ...]
* cccc111 cherry-pick of C
* aaaa111 cherry-pick of A
@@ -89,7 +89,7 @@ In such cases, git-cherry shows a concise summary of what has yet to
be applied:
------------
-$ git cherry origin/master topic
+$ git cherry origin/main topic
- cccc000... commit C
+ bbbb000... commit B
- aaaa000... commit A
@@ -97,8 +97,8 @@ $ git cherry origin/master topic
Here, we see that the commits A and C (marked with `-`) can be
dropped from your `topic` branch when you rebase it on top of
-`origin/master`, while the commit B (marked with `+`) still needs to
-be kept so that it will be sent to be applied to `origin/master`.
+`origin/main`, while the commit B (marked with `+`) still needs to
+be kept so that it will be sent to be applied to `origin/main`.
Using a limit
@@ -109,8 +109,8 @@ other work that is not in upstream. Expanding on the previous
example, this might look like:
------------
-$ git log --graph --oneline --decorate --boundary origin/master...topic
-* 7654321 (origin/master) upstream tip commit
+$ git log --graph --oneline --decorate --boundary origin/main...topic
+* 7654321 (origin/main) upstream tip commit
[... snip some other commits ...]
* cccc111 cherry-pick of C
* aaaa111 cherry-pick of A
@@ -129,7 +129,7 @@ By specifying `base` as the limit, you can avoid listing commits
between `base` and `topic`:
------------
-$ git cherry origin/master topic base
+$ git cherry origin/main topic base
- cccc000... commit C
+ bbbb000... commit B
- aaaa000... commit A
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 08d6045c4a..40c3d9202d 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -30,8 +30,8 @@ currently active branch.
After the clone, a plain `git fetch` without arguments will update
all the remote-tracking branches, and a `git pull` without
-arguments will in addition merge the remote master branch into the
-current master branch, if any (this is untrue when "--single-branch"
+arguments will in addition merge the remote main branch into the
+current main branch, if any (this is untrue when "--single-branch"
is given; see below).
This default configuration is achieved by creating references to
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 7573160f21..c27daa0044 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -144,8 +144,8 @@ See also <<FILES>>.
--blob blob::
Similar to `--file` but use the given blob instead of a file. E.g.
- you can use 'master:.gitmodules' to read values from the file
- '.gitmodules' in the master branch. See "SPECIFYING REVISIONS"
+ you can use 'main:.gitmodules' to read values from the file
+ '.gitmodules' in the main branch. See "SPECIFYING REVISIONS"
section in linkgit:gitrevisions[7] for a more complete list of
ways to spell blob names.
diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt
index de1ebed67d..5fcc09ec58 100644
--- a/Documentation/git-cvsimport.txt
+++ b/Documentation/git-cvsimport.txt
@@ -35,7 +35,7 @@ Please see the section <<issues,ISSUES>> for further reference.
You should *never* do any work of your own on the branches that are
created by 'git cvsimport'. By default initial import will create and populate a
-"master" branch from the CVS repository's main branch which you're free
+"main" branch from the CVS repository's main branch which you're free
to work with; after that, you need to 'git merge' incremental imports, or
any CVS branches, yourself. It is advisable to specify a named remote via
-r to separate and protect the incoming branches.
@@ -78,11 +78,11 @@ OPTIONS
from CVS is imported to the 'origin' branch within the Git
repository, as `HEAD` already has a special meaning for Git.
When a remote is specified the `HEAD` branch is named
- remotes/<remote>/master mirroring 'git clone' behaviour.
+ remotes/<remote>/main mirroring 'git clone' behaviour.
Use this option if you want to import into a different
branch.
+
-Use '-o master' for continuing an import that was initially done by
+Use '-o main' for continuing an import that was initially done by
the old cvs2git tool.
-i::
diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt
index 1b1c71ad9d..9f1eeb8f9f 100644
--- a/Documentation/git-cvsserver.txt
+++ b/Documentation/git-cvsserver.txt
@@ -199,11 +199,11 @@ allowing access over SSH.
5. Clients should now be able to check out the project. Use the CVS 'module'
name to indicate what Git 'head' you want to check out. This also sets the
name of your newly checked-out directory, unless you tell it otherwise with
- `-d <dir_name>`. For example, this checks out 'master' branch to the
- `project-master` directory:
+ `-d <dir_name>`. For example, this checks out 'main' branch to the
+ `project-main` directory:
+
------
- cvs co -d project-master master
+ cvs co -d project-main main
------
[[dbbackend]]
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 37781cf175..69ee7088e8 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -154,14 +154,14 @@ $ git diff HEAD^ HEAD <3>
Comparing branches::
+
------------
-$ git diff topic master <1>
-$ git diff topic..master <2>
-$ git diff topic...master <3>
+$ git diff topic main <1>
+$ git diff topic..main <2>
+$ git diff topic...main <3>
------------
+
-<1> Changes between the tips of the topic and the master branches.
+<1> Changes between the tips of the topic and the main branches.
<2> Same as above.
-<3> Changes that occurred on the master branch since when the topic
+<3> Changes that occurred on the main branch since when the topic
branch was started off it.
Limiting the diff output::
diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt
index e8950de3ba..54df02132c 100644
--- a/Documentation/git-fast-export.txt
+++ b/Documentation/git-fast-export.txt
@@ -121,10 +121,10 @@ by keeping the marks the same across runs.
--reference-excluded-parents::
By default, running a command such as `git fast-export
- master~5..master` will not include the commit master{tilde}5
- and will make master{tilde}4 no longer have master{tilde}5 as
- a parent (though both the old master{tilde}4 and new
- master{tilde}4 will have all the same files). Use
+ main~5..main` will not include the commit main{tilde}5
+ and will make main{tilde}4 no longer have main{tilde}5 as
+ a parent (though both the old main{tilde}4 and new
+ main{tilde}4 will have all the same files). Use
--reference-excluded-parents to instead have the stream
refer to commits in the excluded range of history by their
sha1sum. Note that the resulting stream can only be used by a
@@ -152,11 +152,11 @@ by keeping the marks the same across runs.
[<git-rev-list-args>...]::
A list of arguments, acceptable to 'git rev-parse' and
'git rev-list', that specifies the specific objects and references
- to export. For example, `master~10..master` causes the
- current master reference to be exported along with all objects
+ to export. For example, `main~10..main` causes the
+ current main reference to be exported along with all objects
added since its 10th ancestor commit and (unless the
--reference-excluded-parents option is specified) all files
- common to master{tilde}9 and master{tilde}10.
+ common to main{tilde}9 and main{tilde}10.
EXAMPLES
--------
@@ -170,17 +170,17 @@ empty repository. Except for reencoding commits that are not in
UTF-8, it would be a one-to-one mirror.
-----------------------------------------------------
-$ git fast-export master~5..master |
- sed "s|refs/heads/master|refs/heads/other|" |
+$ git fast-export main~5..main |
+ sed "s|refs/heads/main|refs/heads/other|" |
git fast-import
-----------------------------------------------------
-This makes a new branch called 'other' from 'master~5..master'
-(i.e. if 'master' has linear history, it will take the last 5 commits).
+This makes a new branch called 'other' from 'main~5..main'
+(i.e. if 'main' has linear history, it will take the last 5 commits).
Note that this assumes that none of the blobs and commit messages
referenced by that revision range contains the string
-'refs/heads/master'.
+'refs/heads/main'.
ANONYMIZING
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 7d9aad2a7e..62604a117f 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -1279,7 +1279,7 @@ An example crash:
====
$ cat >in <<END_OF_INPUT
# my very first test commit
- commit refs/heads/master
+ commit refs/heads/main
committer Shawn O. Pearce <spearce> 19283 -0400
# who is that guy anyway?
data <<EOF
@@ -1307,7 +1307,7 @@ An example crash:
Most Recent Commands Before Crash
---------------------------------
# my very first test commit
- commit refs/heads/master
+ commit refs/heads/main
committer Shawn O. Pearce <spearce> 19283 -0400
# who is that guy anyway?
data <<EOF
@@ -1321,11 +1321,11 @@ An example crash:
pos clock name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 1) 0 refs/heads/master
+ 1) 0 refs/heads/main
Inactive Branches
-----------------
- refs/heads/master:
+ refs/heads/main:
status : active loaded dirty
tip commit : 0000000000000000000000000000000000000000
old tree : 0000000000000000000000000000000000000000
diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt
index c975884793..e1fb659d14 100644
--- a/Documentation/git-fetch-pack.txt
+++ b/Documentation/git-fetch-pack.txt
@@ -116,7 +116,7 @@ be in a separate packet, and the list must end with a flush packet.
<refs>...::
The remote heads to update from. This is relative to
- $GIT_DIR (e.g. "HEAD", "refs/heads/master"). When
+ $GIT_DIR (e.g. "HEAD", "refs/heads/main"). When
unspecified, update from all heads the remote side has.
+
If the remote has enabled the options `uploadpack.allowTipSHA1InWant`,
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index 5b1909fdf4..b76a8528a5 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -79,14 +79,14 @@ This configuration is used in two ways:
hierarchy.
* When `git fetch` is run with explicit branches and/or tags
- to fetch on the command line, e.g. `git fetch origin master`, the
+ to fetch on the command line, e.g. `git fetch origin main`, the
<refspec>s given on the command line determine what are to be
- fetched (e.g. `master` in the example,
- which is a short-hand for `master:`, which in turn means
- "fetch the 'master' branch but I do not explicitly say what
+ fetched (e.g. `main` in the example,
+ which is a short-hand for `main:`, which in turn means
+ "fetch the 'main' branch but I do not explicitly say what
remote-tracking branch to update with it from the command line"),
and the example command will
- fetch _only_ the 'master' branch. The `remote.<repository>.fetch`
+ fetch _only_ the 'main' branch. The `remote.<repository>.fetch`
values determine which
remote-tracking branch, if any, is updated. When used in this
way, the `remote.<repository>.fetch` values do not have any
@@ -206,7 +206,7 @@ used.
In compact output mode, specified with configuration variable
fetch.output, if either entire `<from>` or `<to>` is found in the
other string, it will be substituted with `*` in the other string. For
-example, `master -> origin/master` becomes `master -> origin/*`.
+example, `main -> origin/main` becomes `main -> origin/*`.
flag::
A single character indicating the status of the ref:
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 40ba4aa3e6..1ee95bde5a 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -533,7 +533,7 @@ an alternative to git-filter-branch which does not suffer from these
performance problems or the safety problems (mentioned below). For those
with existing tooling which relies upon git-filter-branch, 'git
repo-filter' also provides
-https://github.com/newren/git-filter-repo/blob/master/contrib/filter-repo-demos/filter-lamely[filter-lamely],
+https://github.com/newren/git-filter-repo/blob/main/contrib/filter-repo-demos/filter-lamely[filter-lamely],
a drop-in git-filter-branch replacement (with a few caveats). While
filter-lamely suffers from all the same safety issues as
git-filter-branch, it at least ameliorates the performance issues a
diff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt
index 6793d8fc05..2f60697eb0 100644
--- a/Documentation/git-fmt-merge-msg.txt
+++ b/Documentation/git-fmt-merge-msg.txt
@@ -61,11 +61,11 @@ EXAMPLES
--------
---------
-$ git fetch origin master
+$ git fetch origin main
$ git fmt-merge-msg --log <$GIT_DIR/FETCH_HEAD
---------
-Print a log message describing a merge of the "master" branch from
+Print a log message describing a merge of the "main" branch from
the "origin" remote.
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 0f81d0437b..39e30a3e47 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -460,7 +460,7 @@ One way to test if your MUA is set up correctly is:
* Apply it:
- $ git fetch <project> master:test-apply
+ $ git fetch <project> main:test-apply
$ git switch test-apply
$ git restore --source=HEAD --staged --worktree :/
$ git am a.patch
diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt
index 65b53fcc47..7a9389d016 100644
--- a/Documentation/git-imap-send.txt
+++ b/Documentation/git-imap-send.txt
@@ -112,7 +112,7 @@ that the "Folder doesn't exist".
Once the commits are ready to be sent, run the following command:
- $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
+ $ git format-patch --cover-letter -M --stdout origin/main | git imap-send
Just make sure to disable line wrapping in the email client (GMail's web
interface will wrap lines no matter what, so you need to use a real
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index adc6adfd38..5b5adbb3b6 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -20,7 +20,7 @@ DESCRIPTION
This command creates an empty Git repository - basically a `.git`
directory with subdirectories for `objects`, `refs/heads`,
`refs/tags`, and template files. An initial `HEAD` file that
-references the HEAD of the master branch is also created.
+references the HEAD of the main branch is also created.
If the `$GIT_DIR` environment variable is set then it specifies a path
to use instead of `./.git` for the base of the repository.
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 20e6d21a74..a4bc9da552 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -154,10 +154,10 @@ EXAMPLES
any of remote-tracking branches for 'origin' (what you have that
origin doesn't).
-`git log master --not --remotes=*/master`::
+`git log main --not --remotes=*/main`::
- Shows all commits that are in local master but not in any remote
- repository master branches.
+ Shows all commits that are in local main but not in any remote
+ repository main branches.
`git log -p -m --first-parent`::
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 0a5c8b7d49..91928e06bf 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -101,8 +101,8 @@ f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
0918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
-$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
-5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
+$ git ls-remote http://www.kernel.org/pub/scm/git/git.git main pu rc
+5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/main
c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu
$ git remote add korg http://www.kernel.org/pub/scm/git/git.git
$ git ls-remote --tags korg v\*
diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt
index 2d944e0851..39f124147b 100644
--- a/Documentation/git-merge-base.txt
+++ b/Documentation/git-merge-base.txt
@@ -162,33 +162,33 @@ Discussion on fork-point mode
-----------------------------
After working on the `topic` branch created with `git switch -c
-topic origin/master`, the history of remote-tracking branch
-`origin/master` may have been rewound and rebuilt, leading to a
+topic origin/main`, the history of remote-tracking branch
+`origin/main` may have been rewound and rebuilt, leading to a
history of this shape:
....
o---B2
/
----o---o---B1--o---o---o---B (origin/master)
+---o---o---B1--o---o---o---B (origin/main)
\
B0
\
D0---D1---D (topic)
....
-where `origin/master` used to point at commits B0, B1, B2 and now it
+where `origin/main` used to point at commits B0, B1, B2 and now it
points at B, and your `topic` branch was started on top of it back
-when `origin/master` was at B0, and you built three commits, D0, D1,
+when `origin/main` was at B0, and you built three commits, D0, D1,
and D, on top of it. Imagine that you now want to rebase the work
-you did on the topic on top of the updated origin/master.
+you did on the topic on top of the updated origin/main.
-In such a case, `git merge-base origin/master topic` would return the
+In such a case, `git merge-base origin/main topic` would return the
parent of B0 in the above picture, but B0^..D is *not* the range of
commits you would want to replay on top of B (it includes B0, which
is not what you wrote; it is a commit the other side discarded when
it moved its tip from B0 to B1).
-`git merge-base --fork-point origin/master topic` is designed to
+`git merge-base --fork-point origin/main topic` is designed to
help in such a case. It takes not only B but also B0, B1, and B2
(i.e. old tips of the remote-tracking branches your repository's
reflog knows about) into account to see on which commit your topic
@@ -198,11 +198,11 @@ discarded.
Hence
- $ fork_point=$(git merge-base --fork-point origin/master topic)
+ $ fork_point=$(git merge-base --fork-point origin/main topic)
will find B0, and
- $ git rebase --onto origin/master $fork_point topic
+ $ git rebase --onto origin/main $fork_point topic
will replay D0, D1 and D on top of B to create a new history of this
shape:
@@ -210,7 +210,7 @@ shape:
....
o---B2
/
----o---o---B1--o---o---o---B (origin/master)
+---o---o---B1--o---o---o---B (origin/main)
\ \
B0 D0'--D1'--D' (topic - updated)
\
@@ -219,7 +219,7 @@ shape:
A caveat is that older reflog entries in your repository may be
expired by `git gc`. If B0 no longer appears in the reflog of the
-remote-tracking branch `origin/master`, the `--fork-point` mode
+remote-tracking branch `origin/main`, the `--fork-point` mode
obviously cannot find it and fails, avoiding to give a random and
useless result (such as the parent of B0, like the same command
without the `--fork-point` option gives).
@@ -228,12 +228,12 @@ Also, the remote-tracking branch you use the `--fork-point` mode
with must be the one your topic forked from its tip. If you forked
from an older commit than the tip, this mode would not find the fork
point (imagine in the above sample history B0 did not exist,
-origin/master started at B1, moved to B2 and then B, and you forked
-your topic at origin/master^ when origin/master was B1; the shape of
+origin/main started at B1, moved to B2 and then B, and you forked
+your topic at origin/main^ when origin/main was B1; the shape of
the history would be the same as above, without B0, and the parent
-of B1 is what `git merge-base origin/master topic` correctly finds,
+of B1 is what `git merge-base origin/main topic` correctly finds,
but the `--fork-point` mode will not, because it is not one of the
-commits that used to be at the tip of origin/master).
+commits that used to be at the tip of origin/main).
See also
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 3819fadac1..6ac1fc225a 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -24,24 +24,24 @@ from another repository and can be used by hand to merge changes
from one branch into another.
Assume the following history exists and the current branch is
-"`master`":
+"`main`":
------------
A---B---C topic
/
- D---E---F---G master
+ D---E---F---G main
------------
Then "`git merge topic`" will replay the changes made on the
-`topic` branch since it diverged from `master` (i.e., `E`) until
-its current commit (`C`) on top of `master`, and record the result
+`topic` branch since it diverged from `main` (i.e., `E`) until
+its current commit (`C`) on top of `main`, and record the result
in a new commit along with the names of the two parent commits and
a log message from the user describing the changes.
------------
A---B---C topic
/ \
- D---E---F---G---H master
+ D---E---F---G---H main
------------
The second syntax ("`git merge --abort`") can only be run after the
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index dab9609013..efae3c7a89 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -12,7 +12,7 @@ SYNOPSIS
'git p4 clone' [<sync options>] [<clone options>] <p4 depot path>...
'git p4 sync' [<sync options>] [<p4 depot path>...]
'git p4 rebase'
-'git p4 submit' [<submit options>] [<master branch name>]
+'git p4 submit' [<submit options>] [<main branch name>]
DESCRIPTION
@@ -74,9 +74,9 @@ This:
1. Creates an empty Git repository in a subdirectory called 'project'.
+
2. Imports the full contents of the head revision from the given p4
- depot path into a single commit in the Git branch 'refs/remotes/p4/master'.
+ depot path into a single commit in the Git branch 'refs/remotes/p4/main'.
+
-3. Creates a local branch, 'master' from this remote and checks it out.
+3. Creates a local branch, 'main' from this remote and checks it out.
To reproduce the entire p4 history in Git, use the '@all' modifier on
the depot path:
@@ -103,7 +103,7 @@ $ git init
$ git p4 sync //path/in/your/perforce/depot
------------
This imports the specified depot into
-'refs/remotes/p4/master' in an existing Git repository. The
+'refs/remotes/p4/main' in an existing Git repository. The
`--branch` option can be used to specify a different branch to
be used for the p4 content.
@@ -139,7 +139,7 @@ variable 'git-p4.client'. The p4 client must exist, but the client root
will be created and populated if it does not already exist.
To submit all changes that are in the current Git branch but not in
-the 'p4/master' branch, use:
+the 'p4/main' branch, use:
------------
$ git p4 submit
------------
@@ -155,7 +155,7 @@ $ git p4 submit --commit <sha1>
$ git p4 submit --commit <sha1..sha1>
------------
-The upstream reference is generally 'refs/remotes/p4/master', but can
+The upstream reference is generally 'refs/remotes/p4/main', but can
be overridden using the `--origin=` command-line option.
The p4 changes will be created as the user invoking 'git p4 submit'. The
@@ -215,7 +215,7 @@ These options can be used in the initial 'clone' as well as in
subsequent 'sync' operations.
--branch <ref>::
- Import changes into <ref> instead of refs/remotes/p4/master.
+ Import changes into <ref> instead of refs/remotes/p4/main.
If <ref> starts with refs/, it is used as is. Otherwise, if
it does not start with p4/, that prefix is added.
+
@@ -223,7 +223,7 @@ By default a <ref> not starting with refs/ is treated as the
name of a remote-tracking branch (under refs/remotes/). This
behavior can be modified using the --import-local option.
+
-The default <ref> is "master".
+The default <ref> is "main".
+
This example imports a new remote "p4/proj2" into an existing
Git repository:
@@ -358,7 +358,7 @@ These options can be used to modify 'git p4 submit' behavior.
--branch <branch>::
After submitting, sync this named branch instead of the default
- p4/master. See the "Sync options" section above for more
+ p4/main. See the "Sync options" section above for more
information.
--commit <sha1>|<sha1..sha1>::
@@ -370,9 +370,9 @@ These options can be used to modify 'git p4 submit' behavior.
submitted. Can also be set with git-p4.disableRebase.
--disable-p4sync::
- Disable the automatic sync of p4/master from Perforce after commits have
+ Disable the automatic sync of p4/main from Perforce after commits have
been submitted. Implies --disable-rebase. Can also be set with
- git-p4.disableP4Sync. Sync with origin/master still goes ahead if possible.
+ git-p4.disableP4Sync. Sync with origin/main still goes ahead if possible.
Hooks for submit
----------------
@@ -435,7 +435,7 @@ Unshelve options
--origin::
Sets the git refspec against which the shelved P4 changelist is compared.
- Defaults to p4/master.
+ Defaults to p4/main.
DEPOT PATH SYNTAX
-----------------
@@ -525,7 +525,7 @@ Then this 'git p4 clone' command:
git p4 clone --detect-branches //depot@all
----
produces a separate branch in 'refs/remotes/p4/' for //depot/main,
-called 'master', and one for //depot/branch1 called 'depot/branch1'.
+called 'main', and one for //depot/branch1 called 'depot/branch1'.
However, it is not necessary to create branches in p4 to be able to use
them like branches. Because it is difficult to infer branch
@@ -745,10 +745,10 @@ git-p4.conflict::
--conflict. The default behavior is 'ask'.
git-p4.disableRebase::
- Do not rebase the tree against p4/master following a submit.
+ Do not rebase the tree against p4/main following a submit.
git-p4.disableP4Sync::
- Do not sync p4/master with Perforce following a submit. Implies git-p4.disableRebase.
+ Do not sync p4/main with Perforce following a submit. Implies git-p4.disableRebase.
IMPLEMENTATION DETAILS
----------------------
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 5c3fb67c01..0dd8b8d0ba 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -36,26 +36,26 @@ Default values for <repository> and <branch> are read from the
as set by linkgit:git-branch[1] `--track`.
Assume the following history exists and the current branch is
-"`master`":
+"`main`":
------------
- A---B---C master on origin
+ A---B---C main on origin
/
- D---E---F---G master
+ D---E---F---G main
^
- origin/master in your repository
+ origin/main in your repository
------------
Then "`git pull`" will fetch and replay the changes from the remote
-`master` branch since it diverged from the local `master` (i.e., `E`)
-until its current commit (`C`) on top of `master` and record the
+`main` branch since it diverged from the local `main` (i.e., `E`)
+until its current commit (`C`) on top of `main` and record the
result in a new commit along with the names of the two parent commits
and a log message from the user describing the changes.
------------
- A---B---C origin/master
+ A---B---C origin/main
/ \
- D---E---F---G---H master
+ D---E---F---G---H main
------------
See linkgit:git-merge[1] for details, including how conflicts
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 3b8053447e..3de94d6998 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -60,7 +60,7 @@ OPTIONS[[OPTIONS]]
by a colon `:`, followed by the destination ref <dst>.
+
The <src> is often the name of the branch you would want to push, but
-it can be any arbitrary "SHA-1 expression", such as `master~4` or
+it can be any arbitrary "SHA-1 expression", such as `main~4` or
`HEAD` (see linkgit:gitrevisions[7]).
+
The <dst> tells which ref on the remote side is updated with this
@@ -73,7 +73,7 @@ be omitted--such a push will update a ref that `<src>` normally updates
without any `<refspec>` on the command line. Otherwise, missing
`:<dst>` means to update the same ref as the `<src>`.
+
-If <dst> doesn't start with `refs/` (e.g. `refs/heads/master`) we will
+If <dst> doesn't start with `refs/` (e.g. `refs/heads/main`) we will
try to infer where in `refs/*` on the destination <repository> it
belongs based on the type of <src> being pushed and whether <dst>
is ambiguous.
@@ -310,15 +310,15 @@ is of course entirely defeated by something that runs `git fetch
--all`, in that case you'd need to either disable it or do something
more tedious like:
+
- git fetch # update 'master' from remote
- git tag base master # mark our base point
- git rebase -i master # rewrite some commits
- git push --force-with-lease=master:base master:master
+ git fetch # update 'main' from remote
+ git tag base main # mark our base point
+ git rebase -i main # rewrite some commits
+ git push --force-with-lease=main:base main:main
+
I.e. create a `base` tag for versions of the upstream code that you've
seen and are willing to overwrite, then rewrite history, and finally
-force push changes to `master` if the remote version is still at
-`base`, regardless of what your local `remotes/origin/master` has been
+force push changes to `main` if the remote version is still at
+`base`, regardless of what your local `remotes/origin/main` has been
updated to in the background.
-f::
@@ -338,7 +338,7 @@ destinations configured with `remote.*.push` may overwrite refs
other than the current branch (including local refs that are
strictly behind their remote counterpart). To force a push to only
one branch, use a `+` in front of the refspec to push (e.g `git push
-origin +master` to force a push to the `master` branch). See the
+origin +main` to force a push to the `main` branch). See the
`<refspec>...` section above for details.
--repo=<repository>::
@@ -594,21 +594,21 @@ the ones in the examples below) can be configured as the default for
<refspec> in the <<OPTIONS,OPTIONS>> section above for a
description of "matching" branches.
-`git push origin master`::
- Find a ref that matches `master` in the source repository
- (most likely, it would find `refs/heads/master`), and update
- the same ref (e.g. `refs/heads/master`) in `origin` repository
- with it. If `master` did not exist remotely, it would be
+`git push origin main`::
+ Find a ref that matches `main` in the source repository
+ (most likely, it would find `refs/heads/main`), and update
+ the same ref (e.g. `refs/heads/main`) in `origin` repository
+ with it. If `main` did not exist remotely, it would be
created.
`git push origin HEAD`::
A handy way to push the current branch to the same name on the
remote.
-`git push mothership master:satellite/master dev:satellite/dev`::
- Use the source ref that matches `master` (e.g. `refs/heads/master`)
- to update the ref that matches `satellite/master` (most probably
- `refs/remotes/satellite/master`) in the `mothership` repository;
+`git push mothership main:satellite/main dev:satellite/dev`::
+ Use the source ref that matches `main` (e.g. `refs/heads/main`)
+ to update the ref that matches `satellite/main` (most probably
+ `refs/remotes/satellite/main`) in the `mothership` repository;
do the same for `dev` and `satellite/dev`.
+
See the section describing `<refspec>...` above for a discussion of
@@ -626,14 +626,14 @@ ssh into the `mothership` and run `git merge` there to complete the
emulation of `git pull` that were run on `mothership` to pull changes
made on `satellite`.
-`git push origin HEAD:master`::
- Push the current branch to the remote ref matching `master` in the
+`git push origin HEAD:main`::
+ Push the current branch to the remote ref matching `main` in the
`origin` repository. This form is convenient to push the current
branch without thinking about its local name.
-`git push origin master:refs/heads/experimental`::
+`git push origin main:refs/heads/experimental`::
Create the branch `experimental` in the `origin` repository
- by copying the current `master` branch. This form is only
+ by copying the current `main` branch. This form is only
needed to create a new branch or tag in the remote repository when
the local name and the remote name are different; otherwise,
the ref name on its own will work.
@@ -642,14 +642,14 @@ made on `satellite`.
Find a ref that matches `experimental` in the `origin` repository
(e.g. `refs/heads/experimental`), and delete it.
-`git push origin +dev:master`::
- Update the origin repository's master branch with the dev branch,
+`git push origin +dev:main`::
+ Update the origin repository's main branch with the dev branch,
allowing non-fast-forward updates. *This can leave unreferenced
commits dangling in the origin repository.* Consider the
following situation, where a fast-forward is not possible:
+
----
- o---o---o---A---B origin/master
+ o---o---o---A---B origin/main
\
X---Y---Z dev
----
@@ -659,7 +659,7 @@ The above command would change the origin repository to
----
A---B (unnamed branch)
/
- o---o---o---X---Y---Z master
+ o---o---o---X---Y---Z main
----
+
Commits A and B would no longer belong to a branch with a symbolic name,
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 4624cfd288..97a57cfe06 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -56,37 +56,37 @@ Assume the following history exists and the current branch is "topic":
------------
A---B---C topic
/
- D---E---F---G master
+ D---E---F---G main
------------
From this point, the result of either of the following commands:
- git rebase master
- git rebase master topic
+ git rebase main
+ git rebase main topic
would be:
------------
A'--B'--C' topic
/
- D---E---F---G master
+ D---E---F---G main
------------
*NOTE:* The latter form is just a short-hand of `git checkout topic`
-followed by `git rebase master`. When rebase exits `topic` will
+followed by `git rebase main`. When rebase exits `topic` will
remain the checked-out branch.
If the upstream branch already contains a change you have made (e.g.,
because you mailed a patch which was applied upstream), then that commit
-will be skipped. For example, running `git rebase master` on the
+will be skipped. For example, running `git rebase main` on the
following history (in which `A'` and `A` introduce the same set of changes,
but have different committer information):
------------
A---B---C topic
/
- D---E---A'---F master
+ D---E---A'---F main
------------
will result in:
@@ -94,7 +94,7 @@ will result in:
------------
B'---C' topic
/
- D---E---A'---F master
+ D---E---A'---F main
------------
Here is how you would transplant a topic branch based on one
@@ -106,19 +106,19 @@ For example, a feature developed in 'topic' depends on some
functionality which is found in 'next'.
------------
- o---o---o---o---o master
+ o---o---o---o---o main
\
o---o---o---o---o next
\
o---o---o topic
------------
-We want to make 'topic' forked from branch 'master'; for example,
+We want to make 'topic' forked from branch 'main'; for example,
because the functionality on which 'topic' depends was merged into the
-more stable 'master' branch. We want our tree to look like this:
+more stable 'main' branch. We want our tree to look like this:
------------
- o---o---o---o---o master
+ o---o---o---o---o main
| \
| o'--o'--o' topic
\
@@ -127,7 +127,7 @@ more stable 'master' branch. We want our tree to look like this:
We can get this using the following command:
- git rebase --onto master next topic
+ git rebase --onto main next topic
Another example of --onto option is to rebase part of a
@@ -138,12 +138,12 @@ branch. If we have the following situation:
/
E---F---G topicA
/
- A---B---C---D master
+ A---B---C---D main
------------
then the command
- git rebase --onto master topicA topicB
+ git rebase --onto main topicA topicB
would result in:
@@ -152,7 +152,7 @@ would result in:
/
| E---F---G topicA
|/
- A---B---C---D master
+ A---B---C---D main
------------
This is useful when topicB does not depend on topicA.
@@ -994,17 +994,17 @@ on this 'subsystem'. You might end up with a history like the
following:
------------
- o---o---o---o---o---o---o---o master
+ o---o---o---o---o---o---o---o main
\
o---o---o---o---o subsystem
\
*---*---* topic
------------
-If 'subsystem' is rebased against 'master', the following happens:
+If 'subsystem' is rebased against 'main', the following happens:
------------
- o---o---o---o---o---o---o---o master
+ o---o---o---o---o---o---o---o main
\ \
o---o---o---o---o o'--o'--o'--o'--o' subsystem
\
@@ -1015,7 +1015,7 @@ If you now continue development as usual, and eventually merge 'topic'
to 'subsystem', the commits from 'subsystem' will remain duplicated forever:
------------
- o---o---o---o---o---o---o---o master
+ o---o---o---o---o---o---o---o main
\ \
o---o---o---o---o o'--o'--o'--o'--o'--M subsystem
\ /
@@ -1060,7 +1060,7 @@ changes that are already present in the new upstream (unless
------------
you will end up with the fixed history
------------
- o---o---o---o---o---o---o---o master
+ o---o---o---o---o---o---o---o main
\
o'--o'--o'--o'--o' subsystem
\
@@ -1107,8 +1107,8 @@ REBASING MERGES
The interactive rebase command was originally designed to handle
individual patch series. As such, it makes sense to exclude merge
commits from the todo list, as the developer may have merged the
-then-current `master` while working on the branch, only to rebase
-all the commits onto `master` eventually (skipping the merge
+then-current `main` while working on the branch, only to rebase
+all the commits onto `main` eventually (skipping the merge
commits).
However, there are legitimate reasons why a developer may want to
@@ -1131,11 +1131,11 @@ output of `git log --graph --format=%s -5` may look like this:
| * Extract a generic Button class from the DownloadButton one
------------
-The developer might want to rebase those commits to a newer `master`
+The developer might want to rebase those commits to a newer `main`
while keeping the branch topology, for example when the first topic
-branch is expected to be integrated into `master` much earlier than the
+branch is expected to be integrated into `main` much earlier than the
second one, say, to resolve merge conflicts with changes to the
-DownloadButton class that made it into `master`.
+DownloadButton class that made it into `main`.
This rebase can be performed using the `--rebase-merges` option.
It will generate a todo list looking like this:
diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt
index 25702ed730..ad47420a93 100644
--- a/Documentation/git-receive-pack.txt
+++ b/Documentation/git-receive-pack.txt
@@ -49,8 +49,8 @@ standard input of the hook will be one line per ref to be updated:
sha1-old SP sha1-new SP refname LF
-The refname value is relative to $GIT_DIR; e.g. for the master
-head this is "refs/heads/master". The two sha1 values before
+The refname value is relative to $GIT_DIR; e.g. for the main
+head this is "refs/heads/main". The two sha1 values before
each refname are the object names for the refname before and after
the update. Refs to be created will have sha1-old equal to 0\{40},
while refs to be deleted will have sha1-new equal to 0\{40}, otherwise
@@ -123,8 +123,8 @@ and is executable, it is invoked once per ref, with three parameters:
$GIT_DIR/hooks/update refname sha1-old sha1-new
-The refname parameter is relative to $GIT_DIR; e.g. for the master
-head this is "refs/heads/master". The two sha1 arguments are
+The refname parameter is relative to $GIT_DIR; e.g. for the main
+head this is "refs/heads/main". The two sha1 arguments are
the object names for the refname before and after the update.
Note that the hook is called before the refname is updated,
so either sha1-old is 0\{40} (meaning there is no such ref yet),
@@ -148,8 +148,8 @@ for each successfully updated ref:
sha1-old SP sha1-new SP refname LF
-The refname value is relative to $GIT_DIR; e.g. for the master
-head this is "refs/heads/master". The two sha1 values before
+The refname value is relative to $GIT_DIR; e.g. for the main
+head this is "refs/heads/main". The two sha1 values before
each refname are the object names for the refname before and after
the update. Refs that were created will have sha1-old equal to
0\{40}, while refs that were deleted will have sha1-new equal to
diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt
index ff487ff77d..0a13c13fa9 100644
--- a/Documentation/git-reflog.txt
+++ b/Documentation/git-reflog.txt
@@ -29,7 +29,7 @@ Reference logs, or "reflogs", record when the tips of branches and
other references were updated in the local repository. Reflogs are
useful in various Git commands, to specify the old value of a
reference. For example, `HEAD@{2}` means "where HEAD used to be two
-moves ago", `master@{one.week.ago}` means "where master used to point
+moves ago", `main@{one.week.ago}` means "where main used to point
to one week ago in this local repository", and so on. See
linkgit:gitrevisions[7] for more details.
@@ -50,7 +50,7 @@ linkgit:git-gc[1].
The "delete" subcommand deletes single entries from the reflog. Its
argument must be an _exact_ entry (e.g. "`git reflog delete
-master@{2}`"). This subcommand is also typically not used directly by
+main@{2}`"). This subcommand is also typically not used directly by
end users.
The "exists" subcommand checks whether a ref has a reflog. It exits
diff --git a/Documentation/git-remote-fd.txt b/Documentation/git-remote-fd.txt
index 0451ceb8a2..704b9b9a2e 100644
--- a/Documentation/git-remote-fd.txt
+++ b/Documentation/git-remote-fd.txt
@@ -35,19 +35,19 @@ GIT_TRANSLOOP_DEBUG::
EXAMPLES
--------
-`git fetch fd::17 master`::
- Fetch master, using file descriptor #17 to communicate with
+`git fetch fd::17 main`::
+ Fetch main, using file descriptor #17 to communicate with
git-upload-pack.
-`git fetch fd::17/foo master`::
+`git fetch fd::17/foo main`::
Same as above.
-`git push fd::7,8 master (as URL)`::
- Push master, using file descriptor #7 to read data from
+`git push fd::7,8 main (as URL)`::
+ Push main, using file descriptor #7 to read data from
git-receive-pack and file descriptor #8 to write data to
same service.
-`git push fd::7,8/bar master`::
+`git push fd::7,8/bar main`::
Same as above.
SEE ALSO
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 9659abbf8e..3cf9c19cb9 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git remote' [-v | --verbose]
-'git remote add' [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url>
+'git remote add' [-t <branch>] [-m <main>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url>
'git remote rename' <old> <new>
'git remote remove' <name>
'git remote set-head' <name> (-a | --auto | -d | --delete | <branch>)
@@ -68,8 +68,8 @@ the `refs/remotes/<name>/` namespace, a refspec to track only `<branch>`
is created. You can give more than one `-t <branch>` to track
multiple branches without grabbing all branches.
+
-With `-m <master>` option, a symbolic-ref `refs/remotes/<name>/HEAD` is set
-up to point at remote's `<master>` branch. See also the set-head command.
+With `-m <main>` option, a symbolic-ref `refs/remotes/<name>/HEAD` is set
+up to point at remote's `<main>` branch. See also the set-head command.
+
When a fetch mirror is created with `--mirror=fetch`, the refs will not
be stored in the 'refs/remotes/' namespace, but rather everything in
@@ -102,8 +102,8 @@ symbolic-ref `refs/remotes/<name>/HEAD`) for
the named remote. Having a default branch for a remote is not required,
but allows the name of the remote to be specified in lieu of a specific
branch. For example, if the default branch for `origin` is set to
-`master`, then `origin` may be specified wherever you would normally
-specify `origin/master`.
+`main`, then `origin` may be specified wherever you would normally
+specify `origin/main`.
+
With `-d` or `--delete`, the symbolic ref `refs/remotes/<name>/HEAD` is deleted.
+
@@ -115,9 +115,9 @@ only work if `refs/remotes/origin/next` already exists; if not it must be
fetched first.
+
Use `<branch>` to set the symbolic-ref `refs/remotes/<name>/HEAD` explicitly. e.g., "git
-remote set-head origin master" will set the symbolic-ref `refs/remotes/origin/HEAD` to
-`refs/remotes/origin/master`. This will only work if
-`refs/remotes/origin/master` already exists; if not it must be fetched first.
+remote set-head origin main" will set the symbolic-ref `refs/remotes/origin/HEAD` to
+`refs/remotes/origin/main`. This will only work if
+`refs/remotes/origin/main` already exists; if not it must be fetched first.
+
'set-branches'::
@@ -212,8 +212,8 @@ EXAMPLES
$ git remote
origin
$ git branch -r
- origin/HEAD -> origin/master
- origin/master
+ origin/HEAD -> origin/main
+ origin/main
$ git remote add staging git://git.kernel.org/.../gregkh/staging.git
$ git remote
origin
@@ -221,16 +221,16 @@ staging
$ git fetch staging
...
From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
- * [new branch] master -> staging/master
+ * [new branch] main -> staging/main
* [new branch] staging-linus -> staging/staging-linus
* [new branch] staging-next -> staging/staging-next
$ git branch -r
- origin/HEAD -> origin/master
- origin/master
- staging/master
+ origin/HEAD -> origin/main
+ origin/main
+ staging/main
staging/staging-linus
staging/staging-next
-$ git switch -c staging staging/master
+$ git switch -c staging staging/main
...
------------
@@ -240,7 +240,7 @@ $ git switch -c staging staging/master
$ mkdir project.git
$ cd project.git
$ git init
-$ git remote add -f -t master -m master origin git://example.com/git.git/
+$ git remote add -f -t main -m main origin git://example.com/git.git/
$ git merge origin
------------
diff --git a/Documentation/git-request-pull.txt b/Documentation/git-request-pull.txt
index 4d4392d0f8..439aae730e 100644
--- a/Documentation/git-request-pull.txt
+++ b/Documentation/git-request-pull.txt
@@ -49,29 +49,29 @@ its remote name.
EXAMPLES
--------
-Imagine that you built your work on your `master` branch on top of
+Imagine that you built your work on your `main` branch on top of
the `v1.0` release, and want it to be integrated to the project.
First you push that change to your public repository for others to
see:
- git push https://git.ko.xz/project master
+ git push https://git.ko.xz/project main
Then, you run this command:
- git request-pull v1.0 https://git.ko.xz/project master
+ git request-pull v1.0 https://git.ko.xz/project main
which will produce a request to the upstream, summarizing the
-changes between the `v1.0` release and your `master`, to pull it
+changes between the `v1.0` release and your `main`, to pull it
from your public repository.
If you pushed your change to a branch whose name is different from
the one you have locally, e.g.
- git push https://git.ko.xz/project master:for-linus
+ git push https://git.ko.xz/project main:for-linus
then you can ask that to be pulled with
- git request-pull v1.0 https://git.ko.xz/project master:for-linus
+ git request-pull v1.0 https://git.ko.xz/project main:for-linus
GIT
diff --git a/Documentation/git-rerere.txt b/Documentation/git-rerere.txt
index 4cfc883378..1ff7a17aa5 100644
--- a/Documentation/git-rerere.txt
+++ b/Documentation/git-rerere.txt
@@ -77,55 +77,55 @@ DISCUSSION
----------
When your topic branch modifies an overlapping area that your
-master branch (or upstream) touched since your topic branch
-forked from it, you may want to test it with the latest master,
+main branch (or upstream) touched since your topic branch
+forked from it, you may want to test it with the latest main,
even before your topic branch is ready to be pushed upstream:
------------
o---*---o topic
/
- o---o---o---*---o---o master
+ o---o---o---*---o---o main
------------
-For such a test, you need to merge master and topic somehow.
-One way to do it is to pull master into the topic branch:
+For such a test, you need to merge main and topic somehow.
+One way to do it is to pull main into the topic branch:
------------
$ git switch topic
- $ git merge master
+ $ git merge main
o---*---o---+ topic
/ /
- o---o---o---*---o---o master
+ o---o---o---*---o---o main
------------
The commits marked with `*` touch the same area in the same
file; you need to resolve the conflicts when creating the commit
marked with `+`. Then you can test the result to make sure your
-work-in-progress still works with what is in the latest master.
+work-in-progress still works with what is in the latest main.
After this test merge, there are two ways to continue your work
on the topic. The easiest is to build on top of the test merge
commit `+`, and when your work in the topic branch is finally
-ready, pull the topic branch into master, and/or ask the
-upstream to pull from you. By that time, however, the master or
+ready, pull the topic branch into main, and/or ask the
+upstream to pull from you. By that time, however, the main or
the upstream might have been advanced since the test merge `+`,
in which case the final commit graph would look like this:
------------
$ git switch topic
- $ git merge master
- $ ... work on both topic and master branches
- $ git switch master
+ $ git merge main
+ $ ... work on both topic and main branches
+ $ git switch main
$ git merge topic
o---*---o---+---o---o topic
/ / \
- o---o---o---*---o---o---o---o---+ master
+ o---o---o---*---o---o---o---o---+ main
------------
When your topic branch is long-lived, however, your topic branch
-would end up having many such "Merge from master" commits on it,
+would end up having many such "Merge from main" commits on it,
which would unnecessarily clutter the development history.
Readers of the Linux kernel mailing list may remember that Linus
complained about such too frequent test merges when a subsystem
@@ -137,19 +137,19 @@ top of the tip before the test merge:
------------
$ git switch topic
- $ git merge master
+ $ git merge main
$ git reset --hard HEAD^ ;# rewind the test merge
- $ ... work on both topic and master branches
- $ git switch master
+ $ ... work on both topic and main branches
+ $ git switch main
$ git merge topic
o---*---o-------o---o topic
/ \
- o---o---o---*---o---o---o---o---+ master
+ o---o---o---*---o---o---o---o---+ main
------------
This would leave only one merge commit when your topic branch is
-finally ready and merged into the master branch. This merge
+finally ready and merged into the main branch. This merge
would require you to resolve the conflict, introduced by the
commits marked with `*`. However, this conflict is often the
same conflict you resolved when you created the test merge you
@@ -163,7 +163,7 @@ usual conflict markers `<<<<<<<`, `=======`, and `>>>>>>>` in
them. Later, after you are done resolving the conflicts,
running 'git rerere' again will record the resolved state of these
files. Suppose you did this when you created the test merge of
-master into the topic branch.
+main into the topic branch.
Next time, after seeing the same conflicted automerge,
running 'git rerere' will perform a three-way merge between the
@@ -185,7 +185,7 @@ the rerere.enabled config variable).
In our example, when you do the test merge, the manual
resolution is recorded, and it will be reused when you do the
-actual merge later with the updated master and topic branch, as long
+actual merge later with the updated main and topic branch, as long
as the recorded resolution is still applicable.
The information 'git rerere' records is also used when running
@@ -195,16 +195,16 @@ development on the topic branch:
------------
o---*---o-------o---o topic
/
- o---o---o---*---o---o---o---o master
+ o---o---o---*---o---o---o---o main
- $ git rebase master topic
+ $ git rebase main topic
o---*---o-------o---o topic
/
- o---o---o---*---o---o---o---o master
+ o---o---o---*---o---o---o---o main
------------
-you could run `git rebase master topic`, to bring yourself
+you could run `git rebase main topic`, to bring yourself
up to date before your topic is ready to be sent upstream.
This would result in falling back to a three-way merge, and it
would conflict the same way as the test merge you resolved earlier.
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 252e2d4e47..ca77f000a6 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -184,10 +184,10 @@ $ git switch topic/wip <3>
------------
+
<1> You have made some commits, but realize they were premature
- to be in the `master` branch. You want to continue polishing
+ to be in the `main` branch. You want to continue polishing
them in a topic branch, so create `topic/wip` branch off of the
current `HEAD`.
-<2> Rewind the master branch to get rid of those three commits.
+<2> Rewind the main branch to get rid of those three commits.
<3> Switch to `topic/wip` branch and keep working.
Undo commits permanently::
@@ -264,7 +264,7 @@ need to get to the other branch for a quick bugfix.
$ git switch feature ;# you were working in "feature" branch and
$ work work work ;# got interrupted
$ git commit -a -m "snapshot WIP" <1>
-$ git switch master
+$ git switch main
$ fix fix fix
$ git commit ;# commit with real log
$ git switch feature
diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt
index 84c6c40010..f1357709d3 100644
--- a/Documentation/git-restore.txt
+++ b/Documentation/git-restore.txt
@@ -146,13 +146,13 @@ For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
EXAMPLES
--------
-The following sequence switches to the `master` branch, reverts the
+The following sequence switches to the `main` branch, reverts the
`Makefile` to two revisions back, deletes hello.c by mistake, and gets
it back from the index.
------------
-$ git switch master
-$ git restore --source master~2 Makefile <1>
+$ git switch main
+$ git restore --source main~2 Makefile <1>
$ rm -f hello.c
$ git restore hello.c <2>
------------
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 19b12b6d43..e8c25070e1 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -150,10 +150,10 @@ can be used.
--symbolic-full-name::
This is similar to --symbolic, but it omits input that
are not refs (i.e. branch or tag names; or more
- explicitly disambiguating "heads/master" form, when you
- want to name the "master" branch when there is an
- unfortunately named tag "master"), and show them as full
- refnames (e.g. "refs/heads/master").
+ explicitly disambiguating "heads/main" form, when you
+ want to name the "main" branch when there is an
+ unfortunately named tag "main"), and show them as full
+ refnames (e.g. "refs/heads/main").
Options for Objects
~~~~~~~~~~~~~~~~~~~
@@ -454,10 +454,10 @@ This will error out if $REV is empty or not a valid revision.
* Similar to above:
+
------------
-$ git rev-parse --default master --verify $REV
+$ git rev-parse --default main --verify $REV
------------
+
-but if $REV is empty, the commit object name from master will be printed.
+but if $REV is empty, the commit object name from main will be printed.
GIT
---
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index 044276e9da..29aa8ca21b 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -128,10 +128,10 @@ EXAMPLES
Revert the changes specified by the fourth last commit in HEAD
and create a new commit with the reverted changes.
-`git revert -n master~5..master~2`::
+`git revert -n main~5..main~2`::
Revert the changes done by commits from the fifth last commit
- in master (included) to the third last commit in master
+ in main (included) to the third last commit in main
(included), but do not create any commit with the reverted
changes. The revert only modifies the working tree and the
index.
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 0a69810147..5b536d0459 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -501,7 +501,7 @@ https://security.google.com/settings/security/apppasswords to create it.
Once your commits are ready to be sent to the mailing list, run the
following commands:
- $ git format-patch --cover-letter -M origin/master -o outgoing/
+ $ git format-patch --cover-letter -M origin/main -o outgoing/
$ edit outgoing/0000-*
$ git send-email outgoing/*
diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt
index 5cc2fcefba..a1a8b3f72e 100644
--- a/Documentation/git-show-branch.txt
+++ b/Documentation/git-show-branch.txt
@@ -96,16 +96,16 @@ OPTIONS
--sha1-name::
Instead of naming the commits using the path to reach
- them from heads (e.g. "master~2" to mean the grandparent
- of "master"), name them with the unique prefix of their
+ them from heads (e.g. "main~2" to mean the grandparent
+ of "main"), name them with the unique prefix of their
object names.
--topics::
Shows only commits that are NOT on the first branch given.
This helps track topic branches by hiding any commit that
is already in the main line of development. When given
- "git show-branch --topics master topic1 topic2", this
- will show the revisions given by "git rev-list {caret}master
+ "git show-branch --topics main topic1 topic2", this
+ will show the revisions given by "git rev-list {caret}main
topic1 topic2"
-g::
@@ -144,12 +144,12 @@ otherwise it shows a space. Merge commits are denoted by
a `-` sign. Each commit shows a short name that
can be used as an extended SHA-1 to name that commit.
-The following example shows three branches, "master", "fixes"
+The following example shows three branches, "main", "fixes"
and "mhf":
------------------------------------------------
-$ git show-branch master fixes mhf
-* [master] Add 'git show-branch'.
+$ git show-branch main fixes mhf
+* [main] Add 'git show-branch'.
! [fixes] Introduce "reset type" flag to "git reset"
! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
---
@@ -163,14 +163,14 @@ $ git show-branch master fixes mhf
+ [mhf~6] Retire git-parse-remote.
+ [mhf~7] Multi-head fetch.
+ [mhf~8] Start adding the $GIT_DIR/remotes/ support.
-*++ [master] Add 'git show-branch'.
+*++ [main] Add 'git show-branch'.
------------------------------------------------
-These three branches all forked from a common commit, [master],
+These three branches all forked from a common commit, [main],
whose commit message is "Add \'git show-branch'".
The "fixes" branch adds one commit "Introduce "reset type" flag to
"git reset"". The "mhf" branch adds many other commits.
-The current branch is "master".
+The current branch is "main".
EXAMPLES
@@ -192,7 +192,7 @@ only the primary branches. In addition, if you happen to be on
your topic branch, it is shown as well.
------------
-$ git show-branch --reflog="10,1 hour ago" --list master
+$ git show-branch --reflog="10,1 hour ago" --list main
------------
shows 10 reflog entries going back from the tip as of 1 hour ago.
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index ab4d271925..61ecf2d5b1 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -89,9 +89,9 @@ OPTIONS
Show references matching one or more patterns. Patterns are matched from
the end of the full name, and only complete parts are matched, e.g.
- 'master' matches 'refs/heads/master', 'refs/remotes/origin/master',
- 'refs/tags/jedi/master' but not 'refs/heads/mymaster' or
- 'refs/remotes/master/jedi'.
+ 'main' matches 'refs/heads/main', 'refs/remotes/origin/main',
+ 'refs/tags/jedi/main' but not 'refs/heads/mymain' or
+ 'refs/remotes/main/jedi'.
OUTPUT
------
@@ -101,7 +101,7 @@ The output is in the format: '<SHA-1 ID>' '<space>' '<reference name>'.
-----------------------------------------------------------------------------
$ git show-ref --head --dereference
832e76a9899f560a90ffd62ae2ce83bbeff58f54 HEAD
-832e76a9899f560a90ffd62ae2ce83bbeff58f54 refs/heads/master
+832e76a9899f560a90ffd62ae2ce83bbeff58f54 refs/heads/main
832e76a9899f560a90ffd62ae2ce83bbeff58f54 refs/heads/origin
3521017556c5de4159da4615a39fa4d5d2c279b5 refs/tags/v0.99.9c
6ddc0964034342519a87fe013781abf31c6db6ad refs/tags/v0.99.9c^{}
@@ -123,24 +123,24 @@ $ git show-ref --heads --hash
EXAMPLES
--------
-To show all references called "master", whether tags or heads or anything
+To show all references called "main", whether tags or heads or anything
else, and regardless of how deep in the reference naming hierarchy they are,
use:
-----------------------------------------------------------------------------
- git show-ref master
+ git show-ref main
-----------------------------------------------------------------------------
-This will show "refs/heads/master" but also "refs/remote/other-repo/master",
+This will show "refs/heads/main" but also "refs/remote/other-repo/main",
if such references exists.
When using the `--verify` flag, the command requires an exact path:
-----------------------------------------------------------------------------
- git show-ref --verify refs/heads/master
+ git show-ref --verify refs/heads/main
-----------------------------------------------------------------------------
-will only match the exact branch called "master".
+will only match the exact branch called "main".
If nothing matches, 'git show-ref' will return an error code of 1,
and in the case of verification, it will show an error message.
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index fcf528c1b3..68d0346eef 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -73,9 +73,9 @@ EXAMPLES
they were current in the 10th last commit of the branch
`next`.
-`git show master:Makefile master:t/Makefile`::
+`git show main:Makefile main:t/Makefile`::
Concatenates the contents of said Makefiles in the head
- of the branch `master`.
+ of the branch `main`.
DISCUSSION
----------
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 31f1beb65b..2d46bb2d72 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -77,7 +77,7 @@ list [<options>]::
+
----------------------------------------------------------------
stash@{0}: WIP on submit: 6ebd0e2... Update git-stash documentation
-stash@{1}: On master: 9cc0589... Add git-stash
+stash@{1}: On main: 9cc0589... Add git-stash
----------------------------------------------------------------
+
The command takes options applicable to the 'git log'
@@ -294,7 +294,7 @@ return to your original branch to make the emergency fix, like this:
# ... hack hack hack ...
$ git switch -c my_wip
$ git commit -a -m "WIP"
-$ git switch master
+$ git switch main
$ edit emergency fix
$ git commit -a -m "Fix in a hurry"
$ git switch my_wip
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index c9ed2bf3d5..a392c56f6d 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -183,7 +183,7 @@ set-branch (-d|--default) [--] <path>::
Sets the default remote tracking branch for the submodule. The
`--branch` option allows the remote branch to be specified. The
`--default` option removes the submodule.<name>.branch configuration
- key, which causes the tracking branch to default to 'master'.
+ key, which causes the tracking branch to default to 'main'.
set-url [--] <path> <newurl>::
Sets the URL of the specified submodule to <newurl>. Then, it will
@@ -284,7 +284,7 @@ OPTIONS
`.gitmodules` for `update --remote`. A special value of `.` is used to
indicate that the name of the branch in the submodule should be the
same name as the current branch in the current repository. If the
- option is not specified, it defaults to 'master'.
+ option is not specified, it defaults to 'main'.
-f::
--force::
@@ -322,7 +322,7 @@ OPTIONS
the superproject's recorded SHA-1 to update the submodule, use the
status of the submodule's remote-tracking branch. The remote used
is branch's remote (`branch.<name>.remote`), defaulting to `origin`.
- The remote branch used defaults to `master`, but the branch name may
+ The remote branch used defaults to `main`, but the branch name may
be overridden by setting the `submodule.<name>.branch` option in
either `.gitmodules` or `.git/config` (with `.git/config` taking
precedence).
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 6624a14fbd..db281339ca 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -537,12 +537,12 @@ move local branches onto the new tree.
Discard the specified revision as well, keeping the nearest
parent instead.
Example:;;
-Assume you have local changes in "master", but you need to refetch "r2".
+Assume you have local changes in "main", but you need to refetch "r2".
+
------------
r1---r2---r3 remotes/git-svn
\
- A---B master
+ A---B main
------------
+
Fix the ignore-paths or SVN permissions problem that caused "r2" to
@@ -555,20 +555,20 @@ git svn fetch
------------
r1---r2'--r3' remotes/git-svn
\
- r2---r3---A---B master
+ r2---r3---A---B main
------------
+
-Then fixup "master" with 'git rebase'.
+Then fixup "main" with 'git rebase'.
Do NOT use 'git merge' or your history will not be compatible with a
future 'dcommit'!
+
[verse]
-git rebase --onto remotes/git-svn A^ master
+git rebase --onto remotes/git-svn A^ main
+
------------
r1---r2'--r3' remotes/git-svn
\
- A'--B' master
+ A'--B' main
------------
OPTIONS
@@ -862,7 +862,7 @@ Tracking and contributing to the trunk of a Subversion-managed project
git svn clone http://svn.example.com/project/trunk
# Enter the newly cloned directory:
cd trunk
-# You should be on master branch, double-check with 'git branch'
+# You should be on main branch, double-check with 'git branch'
git branch
# Do some work and commit locally to Git:
git commit ...
@@ -888,7 +888,7 @@ Tracking and contributing to an entire Subversion-managed project
git branch -r
# Create a new branch in SVN
git svn branch waldo
-# Reset your master to trunk (or any other branch, replacing 'trunk'
+# Reset your main to trunk (or any other branch, replacing 'trunk'
# with the appropriate name):
git reset --hard svn/trunk
# You may only dcommit to one branch/tag/trunk at a time. The usage
@@ -916,7 +916,7 @@ have each person clone that repository with 'git clone':
# we only want to use git svn for future updates
git config --remove-section remote.origin
# Create a local branch from one of the branches just fetched
- git checkout -b master FETCH_HEAD
+ git checkout -b main FETCH_HEAD
# Initialize 'git svn' locally (be sure to use the same URL and
# --stdlayout/-T/-b/-t/--prefix options as were used on server)
git svn init http://svn.example.com/project [options...]
diff --git a/Documentation/git-switch.txt b/Documentation/git-switch.txt
index 3759c3a265..202cf71b71 100644
--- a/Documentation/git-switch.txt
+++ b/Documentation/git-switch.txt
@@ -190,10 +190,10 @@ name, the guessing is aborted. You can explicitly give a name with
EXAMPLES
--------
-The following command switches to the "master" branch:
+The following command switches to the "main" branch:
------------
-$ git switch master
+$ git switch main
------------
After working in the wrong branch, switching to the correct branch
@@ -225,7 +225,7 @@ registered in your index file, so `git diff` would show you what
changes you made since the tip of the new branch.
To switch back to the previous branch before we switched to mytopic
-(i.e. "master" branch):
+(i.e. "main" branch):
------------
$ git switch -
diff --git a/Documentation/git-symbolic-ref.txt b/Documentation/git-symbolic-ref.txt
index ef68ad2b71..cc71cec770 100644
--- a/Documentation/git-symbolic-ref.txt
+++ b/Documentation/git-symbolic-ref.txt
@@ -27,7 +27,7 @@ symbolic ref.
A symbolic ref is a regular file that stores a string that
begins with `ref: refs/`. For example, your `.git/HEAD` is
-a regular file whose contents is `ref: refs/heads/master`.
+a regular file whose contents is `ref: refs/heads/main`.
OPTIONS
-------
@@ -44,7 +44,7 @@ OPTIONS
--short::
When showing the value of <name> as a symbolic ref, try to shorten the
- value, e.g. from `refs/heads/master` to `master`.
+ value, e.g. from `refs/heads/main` to `main`.
-m::
Update the reflog for <name> with <reason>. This is valid only
@@ -53,7 +53,7 @@ OPTIONS
NOTES
-----
In the past, `.git/HEAD` was a symbolic link pointing at
-`refs/heads/master`. When we wanted to switch to another branch,
+`refs/heads/main`. When we wanted to switch to another branch,
we did `ln -sf refs/heads/newbranch .git/HEAD`, and when we wanted
to find out which branch we are on, we did `readlink .git/HEAD`.
But symbolic links are not entirely portable, so they are now
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index f6d9791780..f32b839dcb 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -297,7 +297,7 @@ On Automatic following
~~~~~~~~~~~~~~~~~~~~~~
If you are following somebody else's tree, you are most likely
-using remote-tracking branches (eg. `refs/remotes/origin/master`).
+using remote-tracking branches (eg. `refs/remotes/origin/main`).
You usually want the tags from the other end.
On the other hand, if you are fetching because you would want a
@@ -315,7 +315,7 @@ command line:
------------
Linus, please pull from
- git://git..../proj.git master
+ git://git..../proj.git main
to get the following updates...
------------
@@ -323,7 +323,7 @@ to get the following updates...
becomes:
------------
-$ git pull git://git..../proj.git master
+$ git pull git://git..../proj.git main
------------
In such a case, you do not want to automatically follow the other
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index 3e737c2360..8f2c15df5c 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -19,8 +19,8 @@ dereferencing the symbolic refs. E.g. `git update-ref HEAD
Given three arguments, stores the <newvalue> in the <ref>,
possibly dereferencing the symbolic refs, after verifying that
the current value of the <ref> matches <oldvalue>.
-E.g. `git update-ref refs/heads/master <newvalue> <oldvalue>`
-updates the master branch head to <newvalue> only if its current
+E.g. `git update-ref refs/heads/main <newvalue> <oldvalue>`
+updates the main branch head to <newvalue> only if its current
value is <oldvalue>. You can specify 40 "0" or an empty string
as <oldvalue> to make sure that the ref you are creating does
not exist.
diff --git a/Documentation/git-upload-archive.txt b/Documentation/git-upload-archive.txt
index fba0f1c1b2..31014b2dd9 100644
--- a/Documentation/git-upload-archive.txt
+++ b/Documentation/git-upload-archive.txt
@@ -37,7 +37,7 @@ but easier-to-check set of rules:
`ref:path` syntax. E.g., `git archive --remote=origin v1.0:Documentation`.
3. Clients may _not_ use other sha1 expressions, even if the end
- result is reachable. E.g., neither a relative commit like `master^`
+ result is reachable. E.g., neither a relative commit like `main^`
nor a literal sha1 like `abcd1234` is allowed, even if the result
is reachable from the refs.
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 85d92c9761..34c22082e4 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -285,8 +285,8 @@ $GIT_DIR or $GIT_COMMON_DIR depending on the path. For example, in the
linked working tree `git rev-parse --git-path HEAD` returns
`/path/main/.git/worktrees/test-next/HEAD` (not
`/path/other/test-next/.git/HEAD` or `/path/main/.git/HEAD`) while `git
-rev-parse --git-path refs/heads/master` uses
-$GIT_COMMON_DIR and returns `/path/main/.git/refs/heads/master`,
+rev-parse --git-path refs/heads/main` uses
+$GIT_COMMON_DIR and returns `/path/main/.git/refs/heads/main`,
since refs are shared across all working trees, except refs/bisect and
refs/worktree.
@@ -324,7 +324,7 @@ details on a single line with columns. For example:
------------
$ git worktree list
/path/to/bare-source (bare)
-/path/to/linked-worktree abcd1234 [master]
+/path/to/linked-worktree abcd1234 [main]
/path/to/other-linked-worktree 1234abc (detached HEAD)
------------
@@ -343,7 +343,7 @@ bare
worktree /path/to/linked-worktree
HEAD abcd1234abcd1234abcd1234abcd1234abcd1234
-branch refs/heads/master
+branch refs/heads/main
worktree /path/to/other-linked-worktree
HEAD 1234abc1234abc1234abc1234abc1234abc1234a
@@ -363,7 +363,7 @@ make the emergency fix, remove it when done, and then resume your earlier
refactoring session.
------------
-$ git worktree add -b emergency-fix ../temp master
+$ git worktree add -b emergency-fix ../temp main
$ pushd ../temp
# ... hack hack hack ...
$ git commit -a -m 'emergency fix for boss'
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 40bd32f590..f4c97ca1be 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -27,7 +27,7 @@ linkgit:giteveryday[7] for a useful minimum set of
commands. The link:user-manual.html[Git User's Manual] has a more
in-depth introduction.
-After you mastered the basic concepts, you can come back to this
+After you mained the basic concepts, you can come back to this
page to learn what commands Git offers. You can learn more about
individual Git commands with "git help command". linkgit:gitcli[7]
manual page gives you an overview of the command-line command syntax.
diff --git a/Documentation/gitcore-tutorial.txt b/Documentation/gitcore-tutorial.txt
index c0b95256cc..fb62592ba7 100644
--- a/Documentation/gitcore-tutorial.txt
+++ b/Documentation/gitcore-tutorial.txt
@@ -72,9 +72,9 @@ your new project. You will now have a `.git` directory, and you can
inspect that with 'ls'. For your new empty project, it should show you
three entries, among other things:
- - a file called `HEAD`, that has `ref: refs/heads/master` in it.
+ - a file called `HEAD`, that has `ref: refs/heads/main` in it.
This is similar to a symbolic link and points at
- `refs/heads/master` relative to the `HEAD` file.
+ `refs/heads/main` relative to the `HEAD` file.
+
Don't worry about the fact that the file that the `HEAD` link points to
doesn't even exist yet -- you haven't created the commit that will
@@ -94,14 +94,14 @@ of different 'heads' of development (aka 'branches'), and to any
'tags' that you have created to name specific versions in your
repository.
-One note: the special `master` head is the default branch, which is
+One note: the special `main` head is the default branch, which is
why the `.git/HEAD` file was created points to it even if it
doesn't yet exist. Basically, the `HEAD` link is supposed to always
point to the branch you are working on right now, and you always
-start out expecting to work on the `master` branch.
+start out expecting to work on the `main` branch.
However, this is only a convention, and you can name your branches
-anything you want, and don't have to ever even 'have' a `master`
+anything you want, and don't have to ever even 'have' a `main`
branch. A number of the Git tools will assume that `.git/HEAD` is
valid, though.
@@ -328,9 +328,9 @@ the object name of the tree. However, 'git commit-tree' also wants to get a
commit message on its standard input, and it will write out the resulting
object name for the commit to its standard output.
-And this is where we create the `.git/refs/heads/master` file
+And this is where we create the `.git/refs/heads/main` file
which is pointed at by `HEAD`. This file is supposed to contain
-the reference to the top-of-tree of the master branch, and since
+the reference to the top-of-tree of the main branch, and since
that's exactly what 'git commit-tree' spits out, we can do this
all with a sequence of simple shell commands:
@@ -733,7 +733,7 @@ You can at any time create a new branch by just picking an arbitrary
point in the project history, and just writing the SHA-1 name of that
object into a file under `.git/refs/heads/`. You can use any filename you
want (and indeed, subdirectories), but the convention is that the
-"normal" branch is called `master`. That's just a convention, though,
+"normal" branch is called `main`. That's just a convention, though,
and nothing enforces it.
To show that as an example, let's go back to the git-tutorial repository we
@@ -762,10 +762,10 @@ and it would create the new branch `mybranch` at the earlier commit,
and check out the state at that time.
================================================
-You can always just jump back to your original `master` branch by doing
+You can always just jump back to your original `main` branch by doing
------------
-$ git switch master
+$ git switch main
------------
(or any other branch-name, for that matter) and if you forget which
@@ -804,7 +804,7 @@ Merging two branches
One of the ideas of having a branch is that you do some (possibly
experimental) work in it, and eventually merge it back to the main
branch. So assuming you created the above `mybranch` that started out
-being the same as the original `master` branch, let's make sure we're in
+being the same as the original `main` branch, let's make sure we're in
that branch, and do some work there.
------------------------------------------------
@@ -822,15 +822,15 @@ commit log message from the command line.
Now, to make it a bit more interesting, let's assume that somebody else
does some work in the original branch, and simulate that by going back
-to the master branch, and editing the same file differently there:
+to the main branch, and editing the same file differently there:
------------
-$ git switch master
+$ git switch main
------------
Here, take a moment to look at the contents of `hello`, and notice how they
don't contain the work we just did in `mybranch` -- because that work
-hasn't happened in the `master` branch at all. Then do
+hasn't happened in the `main` branch at all. Then do
------------
$ echo "Play, play, play" >>hello
@@ -838,7 +838,7 @@ $ echo "Lots of fun" >>example
$ git commit -m "Some fun." -i hello example
------------
-since the master branch is obviously in a much better mood.
+since the main branch is obviously in a much better mood.
Now, you've got two branches, and you decide that you want to merge the
work done. Before we do that, let's introduce a cool graphical tool that
@@ -854,7 +854,7 @@ histories. You can also see exactly how they came to be from a common
source.
Anyway, let's exit 'gitk' (`^Q` or the File menu), and decide that we want
-to merge the work we did on the `mybranch` branch into the `master`
+to merge the work we did on the `mybranch` branch into the `main`
branch (which is currently our `HEAD` too). To do that, there's a nice
script called 'git merge', which wants to know which branches you want
to resolve and what the merge is all about:
@@ -906,60 +906,60 @@ After you're done, start up `gitk --all` to see graphically what the
history looks like. Notice that `mybranch` still exists, and you can
switch to it, and continue to work with it if you want to. The
`mybranch` branch will not contain the merge, but next time you merge it
-from the `master` branch, Git will know how you merged it, so you'll not
+from the `main` branch, Git will know how you merged it, so you'll not
have to do _that_ merge again.
Another useful tool, especially if you do not always work in X-Window
environment, is `git show-branch`.
------------------------------------------------
-$ git show-branch --topo-order --more=1 master mybranch
-* [master] Merge work in mybranch
+$ git show-branch --topo-order --more=1 main mybranch
+* [main] Merge work in mybranch
! [mybranch] Some work.
--
-- [master] Merge work in mybranch
+- [main] Merge work in mybranch
*+ [mybranch] Some work.
-* [master^] Some fun.
+* [main^] Some fun.
------------------------------------------------
The first two lines indicate that it is showing the two branches
with the titles of their top-of-the-tree commits, you are currently on
-`master` branch (notice the asterisk `*` character), and the first
+`main` branch (notice the asterisk `*` character), and the first
column for the later output lines is used to show commits contained in the
-`master` branch, and the second column for the `mybranch`
+`main` branch, and the second column for the `mybranch`
branch. Three commits are shown along with their titles.
All of them have non blank characters in the first column (`*`
shows an ordinary commit on the current branch, `-` is a merge commit), which
-means they are now part of the `master` branch. Only the "Some
+means they are now part of the `main` branch. Only the "Some
work" commit has the plus `+` character in the second column,
because `mybranch` has not been merged to incorporate these
-commits from the master branch. The string inside brackets
+commits from the main branch. The string inside brackets
before the commit log message is a short name you can use to
-name the commit. In the above example, 'master' and 'mybranch'
-are branch heads. 'master^' is the first parent of 'master'
+name the commit. In the above example, 'main' and 'mybranch'
+are branch heads. 'main^' is the first parent of 'main'
branch head. Please see linkgit:gitrevisions[7] if you want to
see more complex cases.
[NOTE]
Without the '--more=1' option, 'git show-branch' would not output the
-'[master^]' commit, as '[mybranch]' commit is a common ancestor of
-both 'master' and 'mybranch' tips. Please see linkgit:git-show-branch[1]
+'[main^]' commit, as '[mybranch]' commit is a common ancestor of
+both 'main' and 'mybranch' tips. Please see linkgit:git-show-branch[1]
for details.
[NOTE]
-If there were more commits on the 'master' branch after the merge, the
+If there were more commits on the 'main' branch after the merge, the
merge commit itself would not be shown by 'git show-branch' by
default. You would need to provide `--sparse` option to make the
merge commit visible in this case.
Now, let's pretend you are the one who did all the work in
`mybranch`, and the fruit of your hard work has finally been merged
-to the `master` branch. Let's go back to `mybranch`, and run
+to the `main` branch. Let's go back to `mybranch`, and run
'git merge' to get the "upstream changes" back to your branch.
------------
$ git switch mybranch
-$ git merge -m "Merge upstream changes." master
+$ git merge -m "Merge upstream changes." main
------------
This outputs something like this (the actual commit object names
@@ -974,20 +974,20 @@ Fast-forward (no commit created; -m option ignored)
----------------
Because your branch did not contain anything more than what had
-already been merged into the `master` branch, the merge operation did
+already been merged into the `main` branch, the merge operation did
not actually do a merge. Instead, it just updated the top of
-the tree of your branch to that of the `master` branch. This is
+the tree of your branch to that of the `main` branch. This is
often called 'fast-forward' merge.
You can run `gitk --all` again to see how the commit ancestry
looks like, or run 'show-branch', which tells you this.
------------------------------------------------
-$ git show-branch master mybranch
-! [master] Merge work in mybranch
+$ git show-branch main mybranch
+! [main] Merge work in mybranch
* [mybranch] Merge work in mybranch
--
--- [master] Merge work in mybranch
+-- [main] Merge work in mybranch
------------------------------------------------
@@ -1119,35 +1119,35 @@ back to the earlier repository with "hello" and "example" file,
and bring ourselves back to the pre-merge state:
------------
-$ git show-branch --more=2 master mybranch
-! [master] Merge work in mybranch
+$ git show-branch --more=2 main mybranch
+! [main] Merge work in mybranch
* [mybranch] Merge work in mybranch
--
--- [master] Merge work in mybranch
-+* [master^2] Some work.
-+* [master^] Some fun.
+-- [main] Merge work in mybranch
++* [main^2] Some work.
++* [main^] Some fun.
------------
-Remember, before running 'git merge', our `master` head was at
+Remember, before running 'git merge', our `main` head was at
"Some fun." commit, while our `mybranch` head was at "Some
work." commit.
------------
-$ git switch -C mybranch master^2
-$ git switch master
-$ git reset --hard master^
+$ git switch -C mybranch main^2
+$ git switch main
+$ git reset --hard main^
------------
After rewinding, the commit structure should look like this:
------------
$ git show-branch
-* [master] Some fun.
+* [main] Some fun.
! [mybranch] Some work.
--
-* [master] Some fun.
+* [main] Some fun.
+ [mybranch] Some work.
-*+ [master^] Initial commit
+*+ [main^] Initial commit
------------
Now we are ready to experiment with the merge by hand.
@@ -1334,11 +1334,11 @@ Come back to the machine you have your private repository. From
there, run this command:
------------
-$ git push <public-host>:/path/to/my-git.git master
+$ git push <public-host>:/path/to/my-git.git main
------------
This synchronizes your public repository to match the named
-branch head (i.e. `master` in this case) and objects reachable
+branch head (i.e. `main` in this case) and objects reachable
from them in your current repository.
As a real example, this is how I update my public Git
@@ -1346,7 +1346,7 @@ repository. Kernel.org mirror network takes care of the
propagation to other publicly visible machines:
------------
-$ git push master.kernel.org:/pub/scm/git/git.git/
+$ git push main.kernel.org:/pub/scm/git/git.git/
------------
@@ -1523,12 +1523,12 @@ like this:
the initial cloning is stored in the remote.origin.url
configuration variable.
-2. Do your work in your repository on 'master' branch.
+2. Do your work in your repository on 'main' branch.
3. Run `git fetch origin` from the public repository of your
upstream every once in a while. This does only the first
half of `git pull` but does not merge. The head of the
- public repository is stored in `.git/refs/remotes/origin/master`.
+ public repository is stored in `.git/refs/remotes/origin/main`.
4. Use `git cherry origin` to see which ones of your patches
were accepted, and/or use `git rebase origin` to port your
@@ -1559,7 +1559,7 @@ using branches with Git.
We have already seen how branches work previously,
with "fun and work" example using two branches. The idea is the
same if there are more than two branches. Let's say you started
-out from "master" head, and have some new code in the "master"
+out from "main" head, and have some new code in the "main"
branch, and two independent fixes in the "commit-fix" and
"diff-fix" branches:
@@ -1567,12 +1567,12 @@ branch, and two independent fixes in the "commit-fix" and
$ git show-branch
! [commit-fix] Fix commit message normalization.
! [diff-fix] Fix rename detection.
- * [master] Release candidate #1
+ * [main] Release candidate #1
---
+ [diff-fix] Fix rename detection.
+ [diff-fix~1] Better common substring algorithm.
+ [commit-fix] Fix commit message normalization.
- * [master] Release candidate #1
+ * [main] Release candidate #1
++* [diff-fix~2] Pretty-print messages.
------------
@@ -1591,15 +1591,15 @@ Which would result in:
$ git show-branch
! [commit-fix] Fix commit message normalization.
! [diff-fix] Fix rename detection.
- * [master] Merge fix in commit-fix
+ * [main] Merge fix in commit-fix
---
- - [master] Merge fix in commit-fix
+ - [main] Merge fix in commit-fix
+ * [commit-fix] Fix commit message normalization.
- - [master~1] Merge fix in diff-fix
+ - [main~1] Merge fix in diff-fix
+* [diff-fix] Fix rename detection.
+* [diff-fix~1] Better common substring algorithm.
- * [master~2] Release candidate #1
-++* [master~3] Pretty-print messages.
+ * [main~2] Release candidate #1
+++* [main~3] Pretty-print messages.
------------
However, there is no particular reason to merge in one branch
@@ -1607,11 +1607,11 @@ first and the other next, when what you have are a set of truly
independent changes (if the order mattered, then they are not
independent by definition). You could instead merge those two
branches into the current branch at once. First let's undo what
-we just did and start over. We would want to get the master
-branch before these two merges by resetting it to 'master~2':
+we just did and start over. We would want to get the main
+branch before these two merges by resetting it to 'main~2':
------------
-$ git reset --hard master~2
+$ git reset --hard main~2
------------
You can make sure `git show-branch` matches the state before
@@ -1624,14 +1624,14 @@ $ git merge commit-fix diff-fix
$ git show-branch
! [commit-fix] Fix commit message normalization.
! [diff-fix] Fix rename detection.
- * [master] Octopus merge of branches 'diff-fix' and 'commit-fix'
+ * [main] Octopus merge of branches 'diff-fix' and 'commit-fix'
---
- - [master] Octopus merge of branches 'diff-fix' and 'commit-fix'
+ - [main] Octopus merge of branches 'diff-fix' and 'commit-fix'
+ * [commit-fix] Fix commit message normalization.
+* [diff-fix] Fix rename detection.
+* [diff-fix~1] Better common substring algorithm.
- * [master~1] Release candidate #1
-++* [master~2] Pretty-print messages.
+ * [main~1] Release candidate #1
+++* [main~2] Pretty-print messages.
------------
Note that you should not do Octopus just because you can. An octopus
diff --git a/Documentation/gitcvs-migration.txt b/Documentation/gitcvs-migration.txt
index 1cd1283d0f..191680a4b0 100644
--- a/Documentation/gitcvs-migration.txt
+++ b/Documentation/gitcvs-migration.txt
@@ -57,7 +57,7 @@ You can update the shared repository with your changes by first committing
your changes, and then using the 'git push' command:
------------------------------------------------
-$ git push origin master
+$ git push origin main
------------------------------------------------
to "push" those commits to the shared repository. If someone else has
@@ -66,7 +66,7 @@ complain, in which case you must pull any changes before attempting the
push again.
In the 'git push' command above we specify the name of the remote branch
-to update (`master`). If we leave that out, 'git push' tries to update
+to update (`main`). If we leave that out, 'git push' tries to update
any branches in the remote repository that have the same name as a branch
in the local repository. So the last 'push' can be done with either of:
@@ -76,7 +76,7 @@ $ git push foo.com:/pub/project.git/
------------
as long as the shared repository does not have any branches
-other than `master`.
+other than `main`.
Setting Up a Shared Repository
------------------------------
@@ -94,7 +94,7 @@ it:
$ mkdir /pub/my-repo.git
$ cd /pub/my-repo.git
$ git --bare init --shared
-$ git --bare fetch /home/alice/myproject master:master
+$ git --bare fetch /home/alice/myproject main:main
------------------------------------------------
Next, give every team member read/write access to this repository. One
@@ -139,7 +139,7 @@ Larger projects or remote repositories may take longer.
The main trunk is stored in the Git branch named `origin`, and additional
CVS branches are stored in Git branches with the same names. The most
-recent version of the main trunk is also left checked out on the `master`
+recent version of the main trunk is also left checked out on the `main`
branch, so you can start adding your own changes right away.
The import is incremental, so if you call it again next month it will
diff --git a/Documentation/giteveryday.txt b/Documentation/giteveryday.txt
index 1bd919f92b..2196976ec1 100644
--- a/Documentation/giteveryday.txt
+++ b/Documentation/giteveryday.txt
@@ -89,7 +89,7 @@ $ git commit -a -s <5>
$ edit/compile/test
$ git diff HEAD^ <6>
$ git commit -a --amend <7>
-$ git switch master <8>
+$ git switch main <8>
$ git merge alsa-audio <9>
$ git log --since='3 days ago' <10>
$ git log v2.43.. curses/ <11>
@@ -104,8 +104,8 @@ modification will be caught if you do `git commit -a` later.
<6> look at all your changes including the previous commit.
<7> amend the previous commit, adding all your new changes,
using your original message.
-<8> switch to the master branch.
-<9> merge a topic branch into your master branch.
+<8> switch to the main branch.
+<9> merge a topic branch into your main branch.
<10> review commit logs; other forms to limit output can be
combined and include `-10` (to show up to 10 commits),
`--until=2005-12-10`, etc.
@@ -147,11 +147,11 @@ Clone the upstream and work on it. Feed changes to upstream.::
------------
$ git clone git://git.kernel.org/pub/scm/.../torvalds/linux-2.6 my2.6
$ cd my2.6
-$ git switch -c mine master <1>
+$ git switch -c mine main <1>
$ edit/compile/test; git commit -a -s <2>
-$ git format-patch master <3>
+$ git format-patch main <3>
$ git send-email --to="person <[email protected]>" 00*.patch <4>
-$ git switch master <5>
+$ git switch main <5>
$ git pull <6>
$ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <7>
$ git ls-remote --heads http://git.kernel.org/.../jgarzik/libata-dev.git <8>
@@ -160,11 +160,11 @@ $ git reset --hard ORIG_HEAD <10>
$ git gc <11>
------------
+
-<1> checkout a new branch `mine` from master.
+<1> checkout a new branch `mine` from main.
<2> repeat as needed.
-<3> extract patches from your branch, relative to master,
+<3> extract patches from your branch, relative to main,
<4> and email them.
-<5> return to `master`, ready to see what's new
+<5> return to `main`, ready to see what's new
<6> `git pull` fetches from `origin` by default and merges into the
current branch.
<7> immediately after pulling, look at the changes done upstream
@@ -185,16 +185,16 @@ satellite$ cd frotz
satellite$ git config --get-regexp '^(remote|branch)\.' <2>
remote.origin.url mothership:frotz
remote.origin.fetch refs/heads/*:refs/remotes/origin/*
-branch.master.remote origin
-branch.master.merge refs/heads/master
+branch.main.remote origin
+branch.main.merge refs/heads/main
satellite$ git config remote.origin.push \
+refs/heads/*:refs/remotes/satellite/* <3>
satellite$ edit/compile/test/commit
satellite$ git push origin <4>
mothership$ cd frotz
-mothership$ git switch master
-mothership$ git merge satellite/master <5>
+mothership$ git switch main
+mothership$ git merge satellite/main <5>
------------
+
<1> mothership machine has a frotz repository under your home
@@ -210,20 +210,20 @@ remote-tracking branches on the mothership machine. You could use this
as a back-up method. Likewise, you can pretend that mothership
"fetched" from you (useful when access is one sided).
<5> on mothership machine, merge the work done on the satellite
-machine into the master branch.
+machine into the main branch.
Branch off of a specific tag.::
+
------------
$ git switch -c private2.6.14 v2.6.14 <1>
$ edit/compile/test; git commit -a
-$ git checkout master
+$ git checkout main
$ git cherry-pick v2.6.14..private2.6.14 <2>
------------
+
<1> create a private branch based on a well known (but somewhat behind)
tag.
-<2> forward port all changes in `private2.6.14` branch to `master` branch
+<2> forward port all changes in `private2.6.14` branch to `main` branch
without a formal "merging". Or longhand +
`git format-patch -k -m --stdout v2.6.14..private2.6.14 |
git am -3 -k`
@@ -268,23 +268,23 @@ A typical integrator's Git day.::
+
------------
$ git status <1>
-$ git branch --no-merged master <2>
+$ git branch --no-merged main <2>
$ mailx <3>
& s 2 3 4 5 ./+to-apply
& s 7 8 ./+hold-linus
& q
-$ git switch -c topic/one master
+$ git switch -c topic/one main
$ git am -3 -i -s ./+to-apply <4>
$ compile/test
$ git switch -c hold/linus && git am -3 -i -s ./+hold-linus <5>
-$ git switch topic/one && git rebase master <6>
+$ git switch topic/one && git rebase main <6>
$ git switch -C pu next <7>
$ git merge topic/one topic/two && git merge hold/linus <8>
$ git switch maint
-$ git cherry-pick master~4 <9>
+$ git cherry-pick main~4 <9>
$ compile/test
$ git tag -s -m "GIT 0.99.9x" v0.99.9x <10>
-$ git fetch ko && for branch in master maint next pu <11>
+$ git fetch ko && for branch in main maint next pu <11>
do
git show-branch ko/$branch $branch <12>
done
@@ -292,7 +292,7 @@ $ git push --follow-tags ko <13>
------------
+
<1> see what you were in the middle of doing, if anything.
-<2> see which branches haven't been merged into `master` yet.
+<2> see which branches haven't been merged into `main` yet.
Likewise for any other integration branches e.g. `maint`, `next`
and `pu` (potential updates).
<3> read mails, save ones that are applicable, and save others
@@ -300,15 +300,15 @@ that are not quite ready (other mail readers are available).
<4> apply them, interactively, with your sign-offs.
<5> create topic branch as needed and apply, again with sign-offs.
<6> rebase internal topic branch that has not been merged to the
-master or exposed as a part of a stable branch.
+main or exposed as a part of a stable branch.
<7> restart `pu` every time from the next.
<8> and bundle topic branches still cooking.
<9> backport a critical fix.
<10> create a signed tag.
-<11> make sure master was not accidentally rewound beyond that
+<11> make sure main was not accidentally rewound beyond that
already pushed out.
-<12> In the output from `git show-branch`, `master` should have
-everything `ko/master` has, and `next` should have
+<12> In the output from `git show-branch`, `main` should have
+everything `ko/main` has, and `next` should have
everything `ko/next` has, etc.
<13> push out the bleeding edge, together with new tags that point
into the pushed history.
@@ -321,7 +321,7 @@ repository at kernel.org, and looks like this:
[remote "ko"]
url = kernel.org:/pub/scm/git/git.git
fetch = refs/heads/*:refs/remotes/ko/*
- push = refs/heads/master
+ push = refs/heads/main
push = refs/heads/next
push = +refs/heads/pu
push = refs/heads/maint
@@ -424,7 +424,7 @@ $ grep git /etc/group <1>
git:x:9418:alice,bob,cindy,david
$ cd /home/devo.git
$ ls -l <2>
- lrwxrwxrwx 1 david git 17 Dec 4 22:40 HEAD -> refs/heads/master
+ lrwxrwxrwx 1 david git 17 Dec 4 22:40 HEAD -> refs/heads/main
drwxrwsr-x 2 david git 4096 Dec 4 22:40 branches
-rw-rw-r-- 1 david git 84 Dec 4 22:40 config
-rw-rw-r-- 1 david git 58 Dec 4 22:40 description
@@ -437,7 +437,7 @@ $ ls -l <2>
$ ls -l hooks/update <3>
-r-xr-xr-x 1 david git 3536 Dec 4 22:40 update
$ cat info/allowed-users <4>
-refs/heads/master alice\|cindy
+refs/heads/main alice\|cindy
refs/heads/doc-update bob
refs/tags/v[0-9]* david
------------
@@ -446,7 +446,7 @@ refs/tags/v[0-9]* david
<2> and make the shared repository writable by the group.
<3> use update-hook example by Carl from Documentation/howto/
for branch policy control.
-<4> alice and cindy can push into master, only bob can push into doc-update.
+<4> alice and cindy can push into main, only bob can push into doc-update.
david is the release manager and is the only person who can
create and push version tags.
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 81f2a87e88..80d03bfe0b 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -231,10 +231,10 @@ input with lines of the form:
<local ref> SP <local sha1> SP <remote ref> SP <remote sha1> LF
-For instance, if the command +git push origin master:foreign+ were run the
+For instance, if the command +git push origin main:foreign+ were run the
hook would receive a line like the following:
- refs/heads/master 67890 refs/heads/foreign 12345
+ refs/heads/main 67890 refs/heads/foreign 12345
although the full, 40-character SHA-1s would be supplied. If the foreign ref
does not yet exist the `<remote SHA-1>` will be 40 `0`. If a ref is to be
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index 67275fd187..729ef988e1 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -49,7 +49,7 @@ submodule.<name>.update::
submodule.<name>.branch::
A remote branch name for tracking updates in the upstream submodule.
- If the option is not specified, it defaults to 'master'. A special
+ If the option is not specified, it defaults to 'main'. A special
value of `.` is used to indicate that the name of the branch in the
submodule should be the same name as the current branch in the
current repository. See the `--remote` documentation in
diff --git a/Documentation/gitremote-helpers.txt b/Documentation/gitremote-helpers.txt
index 93baeeb029..ca7a2c2e21 100644
--- a/Documentation/gitremote-helpers.txt
+++ b/Documentation/gitremote-helpers.txt
@@ -317,13 +317,13 @@ Supported if the helper has the "fetch" capability.
(if there is only one reference to push, a single 'push' command
is followed by a blank line). For example, the following would
be two batches of 'push', the first asking the remote-helper
- to push the local ref 'master' to the remote ref 'master' and
+ to push the local ref 'main' to the remote ref 'main' and
the local `HEAD` to the remote 'branch', and the second
asking to push ref 'foo' to ref 'bar' (forced update requested
by the '+').
+
------------
-push refs/heads/master:refs/heads/master
+push refs/heads/main:refs/heads/main
push HEAD:refs/heads/branch
\n
push +refs/heads/foo:refs/heads/bar
diff --git a/Documentation/gitrepository-layout.txt b/Documentation/gitrepository-layout.txt
index 1a2ef4c150..646b53d82c 100644
--- a/Documentation/gitrepository-layout.txt
+++ b/Documentation/gitrepository-layout.txt
@@ -130,7 +130,7 @@ HEAD::
(i.e. a 'bare' repository), but a valid Git repository
*must* have the HEAD file; some porcelains may use it to
guess the designated "default" branch of the repository
- (usually 'master'). It is legal if the named branch
+ (usually 'main'). It is legal if the named branch
'name' does not (yet) exist. In some legacy setups, it is
a symbolic link instead of a symref that points at the current
branch.
diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt
index 8bdb7d0bd3..f3c49b23f5 100644
--- a/Documentation/gittutorial-2.txt
+++ b/Documentation/gittutorial-2.txt
@@ -33,12 +33,12 @@ Initialized empty Git repository in .git/
$ echo 'hello world' > file.txt
$ git add .
$ git commit -a -m "initial commit"
-[master (root-commit) 54196cc] initial commit
+[main (root-commit) 54196cc] initial commit
1 file changed, 1 insertion(+)
create mode 100644 file.txt
$ echo 'hello world!' >file.txt
$ git commit -a -m "add emphasis"
-[master c4d59f3] add emphasis
+[main c4d59f3] add emphasis
1 file changed, 1 insertion(+), 1 deletion(-)
------------------------------------------------
@@ -137,7 +137,7 @@ from .git/HEAD:
------------------------------------------------
$ cat .git/HEAD
-ref: refs/heads/master
+ref: refs/heads/main
------------------------------------------------
As you can see, this tells us which branch we're currently on, and it
@@ -146,7 +146,7 @@ contains a SHA-1 name referring to a commit object, which we can
examine with cat-file:
------------------------------------------------
-$ cat .git/refs/heads/master
+$ cat .git/refs/heads/main
c4d59f390b9cfd4318117afde11d601c1085f241
$ git cat-file -t c4d59f39
commit
@@ -368,7 +368,7 @@ situation:
------------------------------------------------
$ git status
-On branch master
+On branch main
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index 59ef5cef1f..aadc24c1cb 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -107,9 +107,9 @@ summary of the situation with 'git status':
------------------------------------------------
$ git status
-On branch master
+On branch main
Changes to be committed:
-Your branch is up to date with 'origin/master'.
+Your branch is up to date with 'origin/main'.
(use "git restore --staged <file>..." to unstage)
modified: file1
@@ -198,11 +198,11 @@ you'll get a list of all existing branches:
------------------------------------------------
experimental
-* master
+* main
------------------------------------------------
The "experimental" branch is the one you just created, and the
-"master" branch is a default branch that was created for you
+"main" branch is a default branch that was created for you
automatically. The asterisk marks the branch you are currently on;
type
@@ -211,18 +211,18 @@ $ git switch experimental
------------------------------------------------
to switch to the experimental branch. Now edit a file, commit the
-change, and switch back to the master branch:
+change, and switch back to the main branch:
------------------------------------------------
(edit file)
$ git commit -a
-$ git switch master
+$ git switch main
------------------------------------------------
Check that the change you made is no longer visible, since it was
-made on the experimental branch and you're back on the master branch.
+made on the experimental branch and you're back on the main branch.
-You can make a different change on the master branch:
+You can make a different change on the main branch:
------------------------------------------------
(edit file)
@@ -230,7 +230,7 @@ $ git commit -a
------------------------------------------------
at this point the two branches have diverged, with different changes
-made in each. To merge the changes made in experimental into master, run
+made in each. To merge the changes made in experimental into main, run
------------------------------------------------
$ git merge experimental
@@ -307,10 +307,10 @@ at /home/bob/myrepo. She does this with:
------------------------------------------------
alice$ cd /home/alice/project
-alice$ git pull /home/bob/myrepo master
+alice$ git pull /home/bob/myrepo main
------------------------------------------------
-This merges the changes from Bob's "master" branch into Alice's
+This merges the changes from Bob's "main" branch into Alice's
current branch. If Alice has made her own changes in the meantime,
then she may need to manually fix any conflicts.
@@ -331,7 +331,7 @@ symbol "FETCH_HEAD", in order to determine if he has anything worth
pulling, like this:
------------------------------------------------
-alice$ git fetch /home/bob/myrepo master
+alice$ git fetch /home/bob/myrepo main
alice$ git log -p HEAD..FETCH_HEAD
------------------------------------------------
@@ -390,27 +390,27 @@ alice$ git fetch bob
Unlike the longhand form, when Alice fetches from Bob using a
remote repository shorthand set up with 'git remote', what was
fetched is stored in a remote-tracking branch, in this case
-`bob/master`. So after this:
+`bob/main`. So after this:
-------------------------------------
-alice$ git log -p master..bob/master
+alice$ git log -p main..bob/main
-------------------------------------
shows a list of all the changes that Bob made since he branched from
-Alice's master branch.
+Alice's main branch.
After examining those changes, Alice
-could merge the changes into her master branch:
+could merge the changes into her main branch:
-------------------------------------
-alice$ git merge bob/master
+alice$ git merge bob/main
-------------------------------------
This `merge` can also be done by 'pulling from her own remote-tracking
branch', like this:
-------------------------------------
-alice$ git pull . remotes/bob/master
+alice$ git pull . remotes/bob/main
-------------------------------------
Note that git pull always merges into the current branch,
@@ -436,12 +436,12 @@ bob$ git config --get remote.origin.url
`git config -l`, and the linkgit:git-config[1] man page
explains the meaning of each option.)
-Git also keeps a pristine copy of Alice's master branch under the
-name "origin/master":
+Git also keeps a pristine copy of Alice's main branch under the
+name "origin/main":
-------------------------------------
bob$ git branch -r
- origin/master
+ origin/main
-------------------------------------
If Bob later decides to work from a different host, he can still
@@ -570,22 +570,22 @@ $ git log v2.5.. Makefile # commits since v2.5 which modify
You can also give 'git log' a "range" of commits where the first is not
necessarily an ancestor of the second; for example, if the tips of
-the branches "stable" and "master" diverged from a common
+the branches "stable" and "main" diverged from a common
commit some time ago, then
-------------------------------------
-$ git log stable..master
+$ git log stable..main
-------------------------------------
-will list commits made in the master branch but not in the
+will list commits made in the main branch but not in the
stable branch, while
-------------------------------------
-$ git log master..stable
+$ git log main..stable
-------------------------------------
will show the list of commits made on the stable branch but not
-the master branch.
+the main branch.
The 'git log' command has a weakness: it must present commits in a
list. When the history has lines of development that diverged and
diff --git a/Documentation/gitworkflows.txt b/Documentation/gitworkflows.txt
index abc0dc6bc7..9b2bb8cef7 100644
--- a/Documentation/gitworkflows.txt
+++ b/Documentation/gitworkflows.txt
@@ -78,10 +78,10 @@ As a given feature goes from experimental to stable, it also
* 'maint' tracks the commits that should go into the next "maintenance
release", i.e., update of the last released stable version;
-* 'master' tracks the commits that should go into the next release;
+* 'main' tracks the commits that should go into the next release;
* 'next' is intended as a testing branch for topics being tested for
- stability for master.
+ stability for main.
There is a fourth official branch that is used slightly differently:
@@ -93,7 +93,7 @@ Each of the four branches is usually a direct descendant of the one
above it.
Conceptually, the feature enters at an unstable branch (usually 'next'
-or 'pu'), and "graduates" to 'master' for the next release once it is
+or 'pu'), and "graduates" to 'main' for the next release once it is
considered stable enough.
@@ -113,7 +113,7 @@ other.
=====================================
This gives a very controlled flow of fixes. If you notice that you
-have applied a fix to e.g. 'master' that is also required in 'maint',
+have applied a fix to e.g. 'main' that is also required in 'maint',
you will need to cherry-pick it (using linkgit:git-cherry-pick[1])
downwards. This will happen a few times and is nothing to worry about
unless you do it very frequently.
@@ -217,32 +217,34 @@ Assuming you are using the merge approach discussed above, when you
are releasing your project you will need to do some additional branch
management work.
-A feature release is created from the 'master' branch, since 'master'
+A feature release is created from the 'main' branch, since 'main'
tracks the commits that should go into the next feature release.
-The 'master' branch is supposed to be a superset of 'maint'. If this
+The 'main' branch is supposed to be a superset of 'maint'. If this
condition does not hold, then 'maint' contains some commits that
-are not included on 'master'. The fixes represented by those commits
+are not included on 'main'. The fixes represented by those commits
will therefore not be included in your feature release.
-To verify that 'master' is indeed a superset of 'maint', use git log:
+To verify that 'main' is indeed a superset of 'maint', use git log:
-.Verify 'master' is a superset of 'maint'
+.Verify 'main' is a superset of 'maint'
[caption="Recipe: "]
=====================================
-`git log master..maint`
+`git log main..maint`
=====================================
This command should not list any commits. Otherwise, check out
-'master' and merge 'maint' into it.
+'main' and merge 'maint' into it.
Now you can proceed with the creation of the feature release. Apply a
-tag to the tip of 'master' indicating the release version:
+tag to the tip of 'main' indicating the release version:
.Release tagging
[caption="Recipe: "]
=====================================
-`git tag -s -m "Git X.Y.Z" vX.Y.Z master`
+
+`git tag -s -m "Git X.Y.Z" vX.Y.Z main`
+
=====================================
You need to push the new tag to a public Git server (see
@@ -253,7 +255,7 @@ release tarballs and preformatted documentation pages.
Similarly, for a maintenance release, 'maint' is tracking the commits
to be released. Therefore, in the steps above simply tag and push
-'maint' rather than 'master'.
+'maint' rather than 'main'.
Maintenance branch management after a feature release
@@ -282,7 +284,7 @@ code so that maintenance fixes can be tracked for the current release:
[caption="Recipe: "]
=====================================
* `git checkout maint`
-* `git merge --ff-only master`
+* `git merge --ff-only main`
=====================================
If the merge fails because it is not a fast-forward, then it is
@@ -295,13 +297,13 @@ Branch management for next and pu after a feature release
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After a feature release, the integration branch 'next' may optionally be
-rewound and rebuilt from the tip of 'master' using the surviving
+rewound and rebuilt from the tip of 'main' using the surviving
topics on 'next':
.Rewind and rebuild next
[caption="Recipe: "]
=====================================
-* `git switch -C next master`
+* `git switch -C next main`
* `git merge ai/topic_in_next1`
* `git merge ai/topic_in_next2`
* ...
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 090c888335..1f77ab3f90 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -224,10 +224,10 @@ for a more flexible and robust system to do the same thing.
<<def_merge,merge>> was started, but not yet finished (i.e. if
the index contains multiple versions of that file).
-[[def_master]]master::
+[[def_main]]main::
The default development <<def_branch,branch>>. Whenever you
create a Git <<def_repository,repository>>, a branch named
- "master" is created, and becomes the active branch. In most
+ "main" is created, and becomes the active branch. In most
cases, this contains the local development, though that is
purely by convention and is not required.
@@ -499,7 +499,7 @@ exclude;;
to the result.
[[def_ref]]ref::
- A name that begins with `refs/` (e.g. `refs/heads/master`)
+ A name that begins with `refs/` (e.g. `refs/heads/main`)
that points to an <<def_object_name,object name>> or another
ref (the latter is called a <<def_symref,symbolic ref>>).
For convenience, a ref can sometimes be abbreviated when used
diff --git a/Documentation/howto/keep-canonical-history-correct.txt b/Documentation/howto/keep-canonical-history-correct.txt
index 35d48ef714..61ef162c65 100644
--- a/Documentation/howto/keep-canonical-history-correct.txt
+++ b/Documentation/howto/keep-canonical-history-correct.txt
@@ -136,7 +136,7 @@ this:
------------
C0--C1--C2 topic-c
/
- ---o---o---A master
+ ---o---o---A main
\
B0--B1--B2 topic-b
------------
@@ -146,26 +146,26 @@ so:
------------
$ git clone $URL work && cd work
- $ git checkout -b topic-b master
+ $ git checkout -b topic-b main
$ ... work to create B0, B1 and B2 to complete one theme
- $ git checkout -b topic-c master
+ $ git checkout -b topic-c main
$ ... same for the theme of topic-c
------------
And then
------------
- $ git checkout master
+ $ git checkout main
$ git pull --ff-only
------------
-would grab `X`, `Y` and `Z` from the upstream and advance your master
+would grab `X`, `Y` and `Z` from the upstream and advance your main
branch:
------------
C0--C1--C2 topic-c
/
- ---o---o---A---X---Y---Z master
+ ---o---o---A---X---Y---Z main
\
B0--B1--B2 topic-b
------------
@@ -194,10 +194,10 @@ topic-c, somebody again advanced the history in the central repository
to put `W` on top of `Z`, and make your `git push` fail.
In such a case, you would rewind to discard `M` and `N`, update the
-tip of your 'master' again and redo the two merges:
+tip of your 'main' again and redo the two merges:
------------
- $ git reset --hard origin/master
+ $ git reset --hard origin/main
$ git pull --ff-only
$ git merge topic-b
$ git merge topic-c
diff --git a/Documentation/howto/maintain-git.txt b/Documentation/howto/maintain-git.txt
index 73be8b49f8..f2f355b4b2 100644
--- a/Documentation/howto/maintain-git.txt
+++ b/Documentation/howto/maintain-git.txt
@@ -50,8 +50,8 @@ this mailing list after each feature release is made.
to contain only bugfixes for the corresponding vX.Y.0 feature
release and earlier maintenance releases vX.Y.W (W < Z).
- - 'master' branch is used to prepare for the next feature
- release. In other words, at some point, the tip of 'master'
+ - 'main' branch is used to prepare for the next feature
+ release. In other words, at some point, the tip of 'main'
branch is tagged with vX.Y.0.
- 'maint' branch is used to prepare for the next maintenance
@@ -64,27 +64,27 @@ this mailing list after each feature release is made.
and fixes) that (1) have worthwhile goal, (2) are in a fairly
good shape suitable for everyday use, (3) but have not yet
demonstrated to be regression free. New changes are tested
- in 'next' before merged to 'master'.
+ in 'next' before merged to 'main'.
- 'pu' branch is used to publish other proposed changes that do
not yet pass the criteria set for 'next'.
- - The tips of 'master' and 'maint' branches will not be rewound to
+ - The tips of 'main' and 'maint' branches will not be rewound to
allow people to build their own customization on top of them.
Early in a new development cycle, 'next' is rewound to the tip of
- 'master' once, but otherwise it will not be rewound until the end
+ 'main' once, but otherwise it will not be rewound until the end
of the cycle.
- - Usually 'master' contains all of 'maint' and 'next' contains all
- of 'master'. 'pu' contains all the topics merged to 'next', but
- is rebuilt directly on 'master'.
+ - Usually 'main' contains all of 'maint' and 'next' contains all
+ of 'main'. 'pu' contains all the topics merged to 'next', but
+ is rebuilt directly on 'main'.
- - The tip of 'master' is meant to be more stable than any
+ - The tip of 'main' is meant to be more stable than any
tagged releases, and the users are encouraged to follow it.
- The 'next' branch is where new action takes place, and the
users are encouraged to test it so that regressions and bugs
- are found before new topics are merged to 'master'.
+ are found before new topics are merged to 'main'.
Note that before v1.9.0 release, the version numbers used to be
structured slightly differently. vX.Y.Z were feature releases while
@@ -113,28 +113,28 @@ by doing the following:
collected from the list. Edit patch to incorporate "Oops,
that should have been like this" fixes from the discussion.
- - Classify the collected patches and handle 'master' and
+ - Classify the collected patches and handle 'main' and
'maint' updates:
- Obviously correct fixes that pertain to the tip of 'maint'
are directly applied to 'maint'.
- - Obviously correct fixes that pertain to the tip of 'master'
- are directly applied to 'master'.
+ - Obviously correct fixes that pertain to the tip of 'main'
+ are directly applied to 'main'.
- Other topics are not handled in this step.
This step is done with "git am".
- $ git checkout master ;# or "git checkout maint"
+ $ git checkout main ;# or "git checkout maint"
$ git am -sc3 mailbox
$ make test
- In practice, almost no patch directly goes to 'master' or
+ In practice, almost no patch directly goes to 'main' or
'maint'.
- Review the last issue of "What's cooking" message, review the
- topics ready for merging (topic->master and topic->maint). Use
+ topics ready for merging (topic->main and topic->maint). Use
"Meta/cook -w" script (where Meta/ contains a checkout of the
'todo' branch) to aid this step.
@@ -143,7 +143,7 @@ by doing the following:
$ Meta/cook -w last-issue-of-whats-cooking.mbox
- $ git checkout master ;# or "git checkout maint"
+ $ git checkout main ;# or "git checkout maint"
$ echo ai/topic | Meta/Reintegrate -e ;# "git merge ai/topic"
$ git log -p ORIG_HEAD.. ;# final review
$ git diff ORIG_HEAD.. ;# final review
@@ -151,12 +151,12 @@ by doing the following:
- Handle the remaining patches:
- - Anything unobvious that is applicable to 'master' (in other
+ - Anything unobvious that is applicable to 'main' (in other
words, does not depend on anything that is still in 'next'
- and not in 'master') is applied to a new topic branch that
- is forked from the tip of 'master' (or the last feature release,
- which is a bit older than 'master'). This includes both
- enhancements and unobvious fixes to 'master'. A topic
+ and not in 'main') is applied to a new topic branch that
+ is forked from the tip of 'main' (or the last feature release,
+ which is a bit older than 'main'). This includes both
+ enhancements and unobvious fixes to 'main'. A topic
branch is named as ai/topic where "ai" is two-letter string
named after author's initial and "topic" is a descriptive name
of the topic (in other words, "what's the series is about").
@@ -178,12 +178,12 @@ by doing the following:
The initial round is done with:
- $ git checkout ai/topic ;# or "git checkout -b ai/topic master"
+ $ git checkout ai/topic ;# or "git checkout -b ai/topic main"
$ git am -sc3 mailbox
and replacing an existing topic with subsequent round is done with:
- $ git checkout master...ai/topic ;# try to reapply to the same base
+ $ git checkout main...ai/topic ;# try to reapply to the same base
$ git am -sc3 mailbox
to prepare the new round on a detached HEAD, and then
@@ -211,16 +211,16 @@ by doing the following:
"SQUASH???" commit), so that they can be removed easily as needed.
- - Merge maint to master as needed:
+ - Merge maint to main as needed:
- $ git checkout master
+ $ git checkout main
$ git merge maint
$ make test
- - Merge master to next as needed:
+ - Merge main to next as needed:
$ git checkout next
- $ git merge master
+ $ git merge main
$ make test
- Review the last issue of "What's cooking" again and see if topics
@@ -229,9 +229,9 @@ by doing the following:
series?)
- Prepare 'jch' branch, which is used to represent somewhere
- between 'master' and 'pu' and often is slightly ahead of 'next'.
+ between 'main' and 'pu' and often is slightly ahead of 'next'.
- $ Meta/Reintegrate master..pu >Meta/redo-jch.sh
+ $ Meta/Reintegrate main..pu >Meta/redo-jch.sh
The result is a script that lists topics to be merged in order to
rebuild 'pu' as the input to Meta/Reintegrate script. Remove
@@ -255,7 +255,7 @@ by doing the following:
touch the line. If a topic that was not in 'next' should be
merged to 'next', add it at the end of the list. Then:
- $ git checkout -B jch master
+ $ git checkout -B jch main
$ Meta/redo-jch.sh -c1
to rebuild the 'jch' branch from scratch. "-c1" tells the script
@@ -267,7 +267,7 @@ by doing the following:
reference to the variable under its old name), in which case
prepare an appropriate merge-fix first (see appendix), and
rebuild the 'jch' branch from scratch, starting at the tip of
- 'master'.
+ 'main'.
Then do the same to 'next'
@@ -277,7 +277,7 @@ by doing the following:
The "-e" option allows the merge message that comes from the
history of the topic and the comments in the "What's cooking" to
be edited. The resulting tree should match 'jch' as the same set
- of topics are merged on 'master'; otherwise there is a mismerge.
+ of topics are merged on 'main'; otherwise there is a mismerge.
Investigate why and do not proceed until the mismerge is found
and rectified.
@@ -288,12 +288,12 @@ by doing the following:
$ sh Meta/redo-jch.sh -u
This removes topics listed in the script that have already been
- merged to 'master'. This may lose '### match next' marker;
+ merged to 'main'. This may lose '### match next' marker;
add it again to the appropriate place when it happens.
- Rebuild 'pu'.
- $ Meta/Reintegrate master..pu >Meta/redo-pu.sh
+ $ Meta/Reintegrate main..pu >Meta/redo-pu.sh
Edit the result by adding new topics that are not still in 'pu'
in the script. Then
@@ -323,13 +323,13 @@ by doing the following:
$ Meta/cook
- This script inspects the history between master..pu, finds tips
+ This script inspects the history between main..pu, finds tips
of topic branches, compares what it found with the current
contents in Meta/whats-cooking.txt, and updates that file.
- Topics not listed in the file but are found in master..pu are
+ Topics not listed in the file but are found in main..pu are
added to the "New topics" section, topics listed in the file that
- are no longer found in master..pu are moved to the "Graduated to
- master" section, and topics whose commits changed their states
+ are no longer found in main..pu are moved to the "Graduated to
+ main" section, and topics whose commits changed their states
(e.g. used to be only in 'pu', now merged to 'next') are updated
with change markers "<<" and ">>".
@@ -348,7 +348,7 @@ by doing the following:
- Compile, test and install all four (five) integration branches;
Meta/Dothem script may aid this step.
- - Format documentation if the 'master' branch was updated;
+ - Format documentation if the 'main' branch was updated;
Meta/dodoc.sh script may aid this step.
- Push the integration branches out to public places; Meta/pushall
@@ -361,7 +361,7 @@ Some observations to be made.
* Each topic is tested individually, and also together with other
topics cooking first in 'pu', then in 'jch' and then in 'next'.
- Until it matures, no part of it is merged to 'master'.
+ Until it matures, no part of it is merged to 'main'.
* A topic already in 'next' can get fixes while still in
'next'. Such a topic will have many merges to 'next' (in
@@ -369,15 +369,15 @@ Some observations to be made.
"Merge branch 'ai/topic' to next" for the same topic.
* An unobvious fix for 'maint' is cooked in 'next' and then
- merged to 'master' to make extra sure it is Ok and then
+ merged to 'main' to make extra sure it is Ok and then
merged to 'maint'.
* Even when 'next' becomes empty (in other words, all topics
- prove stable and are merged to 'master' and "git diff master
+ prove stable and are merged to 'main' and "git diff main
next" shows empty), it has tons of merge commits that will
- never be in 'master'.
+ never be in 'main'.
- * In principle, "git log --first-parent master..next" should
+ * In principle, "git log --first-parent main..next" should
show nothing but merges (in practice, there are fixup commits
and reverts that are not merges).
@@ -387,7 +387,7 @@ Some observations to be made.
* Being in the 'next' branch is not a guarantee for a topic to
be included in the next feature release. Being in the
- 'master' branch typically is.
+ 'main' branch typically is.
* Due to the nature of "SQUASH???" fix-ups, if the original author
agrees with the suggested changes, it is OK to squash them to
diff --git a/Documentation/howto/rebase-from-internal-branch.txt b/Documentation/howto/rebase-from-internal-branch.txt
index 02cb5f758d..50cec1c56d 100644
--- a/Documentation/howto/rebase-from-internal-branch.txt
+++ b/Documentation/howto/rebase-from-internal-branch.txt
@@ -5,7 +5,7 @@ Subject: Re: sending changesets from the middle of a git tree
Date: Sun, 14 Aug 2005 18:37:39 -0700
Abstract: In this article, JC talks about how he rebases the
public "pu" branch using the core Git tools when he updates
- the "master" branch, and how "rebase" works. Also discussed
+ the "main" branch, and how "rebase" works. Also discussed
is how this applies to individual developers who sends patches
upstream.
Content-type: text/asciidoc
@@ -33,17 +33,17 @@ the kind of task StGIT is designed to do.
I just have done a simpler one, this time using only the core
Git tools.
-I had a handful of commits that were ahead of master in pu, and I
+I had a handful of commits that were ahead of main in pu, and I
wanted to add some documentation bypassing my usual habit of
placing new things in pu first. At the beginning, the commit
ancestry graph looked like this:
*"pu" head
- master --> #1 --> #2 --> #3
+ main --> #1 --> #2 --> #3
-So I started from master, made a bunch of edits, and committed:
+So I started from main, made a bunch of edits, and committed:
- $ git checkout master
+ $ git checkout main
$ cd Documentation; ed git.txt ...
$ cd ..; git add Documentation/*.txt
$ git commit -s
@@ -51,41 +51,41 @@ So I started from master, made a bunch of edits, and committed:
After the commit, the ancestry graph would look like this:
*"pu" head
- master^ --> #1 --> #2 --> #3
+ main^ --> #1 --> #2 --> #3
\
- \---> master
+ \---> main
-The old master is now master^ (the first parent of the master).
-The new master commit holds my documentation updates.
+The old main is now main^ (the first parent of the main).
+The new main commit holds my documentation updates.
Now I have to deal with "pu" branch.
This is the kind of situation I used to have all the time when
Linus was the maintainer and I was a contributor, when you look
-at "master" branch being the "maintainer" branch, and "pu"
+at "main" branch being the "maintainer" branch, and "pu"
branch being the "contributor" branch. Your work started at the
tip of the "maintainer" branch some time ago, you made a lot of
progress in the meantime, and now the maintainer branch has some
other commits you do not have yet. And "git rebase" was written
with the explicit purpose of helping to maintain branches like
-"pu". You _could_ merge master to pu and keep going, but if you
+"pu". You _could_ merge main to pu and keep going, but if you
eventually want to cherrypick and merge some but not necessarily
-all changes back to the master branch, it often makes later
+all changes back to the main branch, it often makes later
operations for _you_ easier if you rebase (i.e. carry forward
your changes) "pu" rather than merge. So I ran "git rebase":
$ git checkout pu
- $ git rebase master pu
+ $ git rebase main pu
What this does is to pick all the commits since the current
branch (note that I now am on "pu" branch) forked from the
-master branch, and forward port these changes.
+main branch, and forward port these changes.
- master^ --> #1 --> #2 --> #3
+ main^ --> #1 --> #2 --> #3
\ *"pu" head
- \---> master --> #1' --> #2' --> #3'
+ \---> main --> #1' --> #2' --> #3'
-The diff between master^ and #1 is applied to master and
+The diff between main^ and #1 is applied to main and
committed to create #1' commit with the commit information (log,
author and date) taken from commit #1. On top of that #2' and #3'
commits are made similarly out of #2 and #3 commits.
@@ -103,14 +103,14 @@ Let's go back to the earlier picture, with different labels.
You, as an individual developer, cloned upstream repository and
made a couple of commits on top of it.
- *your "master" head
+ *your "main" head
upstream --> #1 --> #2 --> #3
You would want changes #2 and #3 incorporated in the upstream,
while you feel that #1 may need further improvements. So you
prepare #2 and #3 for e-mail submission.
- $ git format-patch master^^ master
+ $ git format-patch main^^ main
This creates two files, 0001-XXXX.patch and 0002-XXXX.patch. Send
them out "To: " your project maintainer and "Cc: " your mailing
@@ -122,7 +122,7 @@ patch.
Then you would wait, and you find out that the upstream picked
up your changes, along with other changes.
- where *your "master" head
+ where *your "main" head
upstream --> #1 --> #2 --> #3
used \
to be \--> #A --> #2' --> #3' --> #B --> #C
@@ -139,10 +139,10 @@ You fetch from upstream, but not merge.
$ git fetch upstream
This leaves the updated upstream head in .git/FETCH_HEAD but
-does not touch your .git/HEAD or .git/refs/heads/master.
+does not touch your .git/HEAD or .git/refs/heads/main.
You run "git rebase" now.
- $ git rebase FETCH_HEAD master
+ $ git rebase FETCH_HEAD main
Earlier, I said that rebase applies all the commits from your
branch on top of the upstream head. Well, I lied. "git rebase"
@@ -150,15 +150,15 @@ is a bit smarter than that and notices that #2 and #3 need not
be applied, so it only applies #1. The commit ancestry graph
becomes something like this:
- where *your old "master" head
+ where *your old "main" head
upstream --> #1 --> #2 --> #3
- used \ your new "master" head*
+ used \ your new "main" head*
to be \--> #A --> #2' --> #3' --> #B --> #C --> #1'
*upstream
head
Again, "git prune" would discard the disused commits #1-#3 and
-you continue on starting from the new "master" head, which is
+you continue on starting from the new "main" head, which is
the #1' commit.
-jc
diff --git a/Documentation/howto/rebuild-from-update-hook.txt b/Documentation/howto/rebuild-from-update-hook.txt
index db219f5c07..d13a8dd6a7 100644
--- a/Documentation/howto/rebuild-from-update-hook.txt
+++ b/Documentation/howto/rebuild-from-update-hook.txt
@@ -40,7 +40,7 @@ script:
unset GIT_DIR
- git pull /pub/scm/git/git.git/ master &&
+ git pull /pub/scm/git/git.git/ main &&
cd Documentation &&
make install-webdoc
EOF
@@ -59,7 +59,7 @@ like this:
# To enable this hook, make this file executable by "chmod +x post-update".
case " $* " in
- *' refs/heads/master '*)
+ *' refs/heads/main '*)
echo $HOME/doc-git/dododoc.sh | at now
;;
esac
@@ -72,7 +72,7 @@ There are four things worth mentioning:
- The update-hook is run after the repository accepts a "git
push", under my user privilege. It is given the full names
of refs that have been updated as arguments. My post-update
- runs the dododoc.sh script only when the master head is
+ runs the dododoc.sh script only when the main head is
updated.
- When update-hook is run, GIT_DIR is set to '.' by the calling
diff --git a/Documentation/howto/revert-a-faulty-merge.txt b/Documentation/howto/revert-a-faulty-merge.txt
index 19f59cc888..1a6a0b360e 100644
--- a/Documentation/howto/revert-a-faulty-merge.txt
+++ b/Documentation/howto/revert-a-faulty-merge.txt
@@ -14,14 +14,14 @@ How to revert a faulty merge
Alan <[email protected]> said:
- I have a master branch. We have a branch off of that that some
+ I have a main branch. We have a branch off of that that some
developers are doing work on. They claim it is ready. We merge it
- into the master branch. It breaks something so we revert the merge.
+ into the main branch. It breaks something so we revert the merge.
They make changes to the code. they get it to a point where they say
it is ok and we merge again.
When examined, we find that code changes made before the revert are
- not in the master branch, but code changes after are in the master
+ not in the main branch, but code changes after are in the main
branch.
and asked for help recovering from this situation.
diff --git a/Documentation/howto/revert-branch-rebase.txt b/Documentation/howto/revert-branch-rebase.txt
index 149508e13b..ec9b568979 100644
--- a/Documentation/howto/revert-branch-rebase.txt
+++ b/Documentation/howto/revert-branch-rebase.txt
@@ -11,37 +11,37 @@ Message-ID: <[email protected]>
How to revert an existing commit
================================
-One of the changes I pulled into the 'master' branch turns out to
+One of the changes I pulled into the 'main' branch turns out to
break building Git with GCC 2.95. While they were well-intentioned
portability fixes, keeping things working with gcc-2.95 was also
-important. Here is what I did to revert the change in the 'master'
+important. Here is what I did to revert the change in the 'main'
branch and to adjust the 'pu' branch, using core Git tools and
barebone Porcelain.
First, prepare a throw-away branch in case I screw things up.
------------------------------------------------
-$ git checkout -b revert-c99 master
+$ git checkout -b revert-c99 main
------------------------------------------------
Now I am on the 'revert-c99' branch. Let's figure out which commit to
-revert. I happen to know that the top of the 'master' branch is a
+revert. I happen to know that the top of the 'main' branch is a
merge, and its second parent (i.e. foreign commit I merged from) has
the change I would want to undo. Further I happen to know that that
merge introduced 5 commits or so:
------------------------------------------------
-$ git show-branch --more=4 master master^2 | head
-* [master] Merge refs/heads/portable from http://www.cs.berkeley....
- ! [master^2] Replace C99 array initializers with code.
+$ git show-branch --more=4 main main^2 | head
+* [main] Merge refs/heads/portable from http://www.cs.berkeley....
+ ! [main^2] Replace C99 array initializers with code.
--
-- [master] Merge refs/heads/portable from http://www.cs.berkeley....
-*+ [master^2] Replace C99 array initializers with code.
-*+ [master^2~1] Replace unsetenv() and setenv() with older putenv().
-*+ [master^2~2] Include sys/time.h in daemon.c.
-*+ [master^2~3] Fix ?: statements.
-*+ [master^2~4] Replace zero-length array decls with [].
-* [master~1] tutorial note about git branch
+- [main] Merge refs/heads/portable from http://www.cs.berkeley....
+*+ [main^2] Replace C99 array initializers with code.
+*+ [main^2~1] Replace unsetenv() and setenv() with older putenv().
+*+ [main^2~2] Include sys/time.h in daemon.c.
+*+ [main^2~3] Fix ?: statements.
+*+ [main^2~4] Replace zero-length array decls with [].
+* [main~1] tutorial note about git branch
------------------------------------------------
The '--more=4' above means "after we reach the merge base of refs,
@@ -51,15 +51,15 @@ git.git repository, so this would show everything on both branches
since then. I just limited the output to the first handful using
'head'.
-Now I know 'master^2~4' (pronounce it as "find the second parent of
-the 'master', and then go four generations back following the first
+Now I know 'main^2~4' (pronounce it as "find the second parent of
+the 'main', and then go four generations back following the first
parent") is the one I would want to revert. Since I also want to say
why I am reverting it, the '-n' flag is given to 'git revert'. This
prevents it from actually making a commit, and instead 'git revert'
leaves the commit log message it wanted to use in '.msg' file:
------------------------------------------------
-$ git revert -n master^2~4
+$ git revert -n main^2~4
$ cat .msg
Revert "Replace zero-length array decls with []."
@@ -79,12 +79,12 @@ $ git commit -a -s ;# read .msg into the log,
------------------------------------------------
I could have screwed up in any of the above steps, but in the worst
-case I could just have done 'git checkout master' to start over.
+case I could just have done 'git checkout main' to start over.
Fortunately I did not have to; what I have in the current branch
-'revert-c99' is what I want. So merge that back into 'master':
+'revert-c99' is what I want. So merge that back into 'main':
------------------------------------------------
-$ git checkout master
+$ git checkout main
$ git merge revert-c99 ;# this should be a fast-forward
Updating from 10d781b9caa4f71495c7b34963bef137216f86a8 to e3a693c...
cache.h | 8 ++++----
@@ -96,10 +96,10 @@ Updating from 10d781b9caa4f71495c7b34963bef137216f86a8 to e3a693c...
------------------------------------------------
There is no need to redo the test at this point. We fast-forwarded
-and we know 'master' matches 'revert-c99' exactly. In fact:
+and we know 'main' matches 'revert-c99' exactly. In fact:
------------------------------------------------
-$ git diff master..revert-c99
+$ git diff main..revert-c99
------------------------------------------------
says nothing.
@@ -109,7 +109,7 @@ Then we rebase the 'pu' branch as usual.
------------------------------------------------
$ git checkout pu
$ git tag pu-anchor pu
-$ git rebase master
+$ git rebase main
* Applying: Redo "revert" using three-way merge machinery.
First trying simple merge strategy to cherry-pick.
* Applying: Remove git-apply-patch-script.
@@ -131,7 +131,7 @@ The temporary tag 'pu-anchor' is me just being careful, in case 'git
rebase' screws up. After this, I can do these for sanity check:
------------------------------------------------
-$ git diff pu-anchor..pu ;# make sure we got the master fix.
+$ git diff pu-anchor..pu ;# make sure we got the main fix.
$ make CC=gcc-2.95 clean test ;# make sure it fixed the breakage.
$ make clean test ;# make sure it did not cause other breakage.
------------------------------------------------
@@ -150,11 +150,11 @@ be some days off:
------------------------------------------------
$ git checkout rc
-$ git pull . master
+$ git pull . main
Packing 0 objects
Unpacking 0 objects
-* commit-ish: e3a693c... refs/heads/master from .
+* commit-ish: e3a693c... refs/heads/main from .
Trying to merge e3a693c... into 8c1f5f0... using 10d781b...
Committed merge 7fb9b7262a1d1e0a47bbfdcbbcf50ce0635d3f8f
cache.h | 8 ++++----
@@ -168,10 +168,10 @@ Committed merge 7fb9b7262a1d1e0a47bbfdcbbcf50ce0635d3f8f
And the final repository status looks like this:
------------------------------------------------
-$ git show-branch --more=1 master pu rc
-! [master] Revert "Replace zero-length array decls with []."
+$ git show-branch --more=1 main pu rc
+! [main] Revert "Replace zero-length array decls with []."
! [pu] git-repack: Add option to repack all objects.
- * [rc] Merge refs/heads/master from .
+ * [rc] Merge refs/heads/main from .
---
+ [pu] git-repack: Add option to repack all objects.
+ [pu~1] More documentation updates.
@@ -180,8 +180,8 @@ $ git show-branch --more=1 master pu rc
+ [pu~4] Document "git cherry-pick" and "git revert"
+ [pu~5] Remove git-apply-patch-script.
+ [pu~6] Redo "revert" using three-way merge machinery.
- - [rc] Merge refs/heads/master from .
-++* [master] Revert "Replace zero-length array decls with []."
- - [rc~1] Merge refs/heads/master from .
-... [master~1] Merge refs/heads/portable from http://www.cs.berkeley....
+ - [rc] Merge refs/heads/main from .
+++* [main] Revert "Replace zero-length array decls with []."
+ - [rc~1] Merge refs/heads/main from .
+... [main~1] Merge refs/heads/portable from http://www.cs.berkeley....
------------------------------------------------
diff --git a/Documentation/howto/separating-topic-branches.txt b/Documentation/howto/separating-topic-branches.txt
index 81be0d6115..ae1efba52b 100644
--- a/Documentation/howto/separating-topic-branches.txt
+++ b/Documentation/howto/separating-topic-branches.txt
@@ -14,7 +14,7 @@ than HEAD] while rewriting messy development history. For example, I
start doing some work without knowing exactly where it leads, and end
up with a history like this:
- "master"
+ "main"
o---o
\ "topic"
o---o---o---o---o---o
@@ -25,35 +25,35 @@ And often, one topic component is larger than the other. It may
contain more than two topics.
In order to rewrite this mess to be more manageable, I would first do
-"diff master..topic", to extract the changes into a single patch, start
+"diff main..topic", to extract the changes into a single patch, start
picking pieces from it to get logically self-contained units, and
-start building on top of "master":
+start building on top of "main":
- $ git diff master..topic >P.diff
- $ git checkout -b topicA master
+ $ git diff main..topic >P.diff
+ $ git checkout -b topicA main
... pick and apply pieces from P.diff to build
... commits on topicA branch.
o---o---o
/ "topicA"
- o---o"master"
+ o---o"main"
\ "topic"
o---o---o---o---o---o
Before doing each commit on "topicA" HEAD, I run "diff HEAD"
before update-index the affected paths, or "diff --cached HEAD"
-after. Also I would run "diff --cached master" to make sure
+after. Also I would run "diff --cached main" to make sure
that the changes are only the ones related to "topicA". Usually
I do this for smaller topics first.
After that, I'd do the remainder of the original "topic", but
for that, I do not start from the patchfile I extracted by
-comparing "master" and "topic" I used initially. Still on
+comparing "main" and "topic" I used initially. Still on
"topicA", I extract "diff topic", and use it to rebuild the
other topic:
$ git diff -R topic >P.diff ;# --cached also would work fine
- $ git checkout -b topicB master
+ $ git checkout -b topicB main
... pick and apply pieces from P.diff to build
... commits on topicB branch.
@@ -62,7 +62,7 @@ other topic:
/
/o---o---o
|/ "topicA"
- o---o"master"
+ o---o"main"
\ "topic"
o---o---o---o---o---o
@@ -76,7 +76,7 @@ After I am done, I'd try a pretend-merge between "topicA" and
/ /
/o---o---o----------'
|/ "topicA"
- o---o"master"
+ o---o"main"
\ "topic"
o---o---o---o---o---o
@@ -91,4 +91,4 @@ for cruft. Then I can finally clean things up:
/
/o---o---o
|/ "topicA"
- o---o"master"
+ o---o"main"
diff --git a/Documentation/howto/setup-git-server-over-http.txt b/Documentation/howto/setup-git-server-over-http.txt
index bfe6f9b500..3d2fdcb971 100644
--- a/Documentation/howto/setup-git-server-over-http.txt
+++ b/Documentation/howto/setup-git-server-over-http.txt
@@ -214,7 +214,7 @@ To check whether all is OK, do:
curl --netrc --location -v http://<username>@<servername>/my-new-repo.git/HEAD
-...this should give something like 'ref: refs/heads/master', which is
+...this should give something like 'ref: refs/heads/main', which is
the content of the file HEAD on the server.
Now, add the remote in your existing repository which contains the project
@@ -233,9 +233,9 @@ Step 4: make the initial push
From your client repository, do
- $ git push upload master
+ $ git push upload main
-This pushes branch 'master' (which is assumed to be the branch you
+This pushes branch 'main' (which is assumed to be the branch you
want to export) to repository called 'upload', which we previously
defined with git-config.
diff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt
index 89821ec74f..5d55c63e97 100644
--- a/Documentation/howto/update-hook-example.txt
+++ b/Documentation/howto/update-hook-example.txt
@@ -21,7 +21,7 @@ section of the documentation:
$GIT_DIR/hooks/update refname sha1-old sha1-new
The refname parameter is relative to $GIT_DIR; e.g. for the
- master head this is "refs/heads/master". Two sha1 are the
+ main head this is "refs/heads/main". Two sha1 are the
object names for the refname before and after the update. Note
that the hook is called before the refname is updated, so either
sha1-old is 0{40} (meaning there is no such ref yet), or it
@@ -178,7 +178,7 @@ This uses two files, $GIT_DIR/info/allowed-users and
allowed-groups, to describe which heads can be pushed into by
whom. The format of each file would look like this:
- refs/heads/master junio
+ refs/heads/main junio
+refs/heads/pu junio
refs/heads/cogito$ pasky
refs/heads/bw/.* linus
@@ -187,6 +187,6 @@ whom. The format of each file would look like this:
With this, Linus can push or create "bw/penguin" or "bw/zebra"
or "bw/panda" branches, Pasky can do only "cogito", and JC can
-do master and pu branches and make versioned tags. And anybody
+do main and pu branches and make versioned tags. And anybody
can do tmp/blah branches. The '+' sign at the pu record means
that JC can make non-fast-forward pushes on it.
diff --git a/Documentation/howto/using-merge-subtree.txt b/Documentation/howto/using-merge-subtree.txt
index a499a94ac2..db651f3962 100644
--- a/Documentation/howto/using-merge-subtree.txt
+++ b/Documentation/howto/using-merge-subtree.txt
@@ -25,7 +25,7 @@ What you want is the 'subtree' merge strategy, which helps you in such a
situation.
In this example, let's say you have the repository at `/path/to/B` (but
-it can be a URL as well, if you want). You want to merge the 'master'
+it can be a URL as well, if you want). You want to merge the 'main'
branch of that repository to the `dir-B` subdirectory in your current
branch.
@@ -33,15 +33,15 @@ Here is the command sequence you need:
----------------
$ git remote add -f Bproject /path/to/B <1>
-$ git merge -s ours --no-commit --allow-unrelated-histories Bproject/master <2>
-$ git read-tree --prefix=dir-B/ -u Bproject/master <3>
+$ git merge -s ours --no-commit --allow-unrelated-histories Bproject/main <2>
+$ git read-tree --prefix=dir-B/ -u Bproject/main <3>
$ git commit -m "Merge B project as our subdirectory" <4>
-$ git pull -s subtree Bproject master <5>
+$ git pull -s subtree Bproject main <5>
----------------
<1> name the other project "Bproject", and fetch.
<2> prepare for the later step to record the result as a merge.
-<3> read "master" branch of Bproject to the subdirectory "dir-B".
+<3> read "main" branch of Bproject to the subdirectory "dir-B".
<4> record the merge result.
<5> maintain the result with subsequent merges using "subtree"
diff --git a/Documentation/install-doc-quick.sh b/Documentation/install-doc-quick.sh
index 17231d8e59..d9a20538ed 100755
--- a/Documentation/install-doc-quick.sh
+++ b/Documentation/install-doc-quick.sh
@@ -3,7 +3,7 @@
repository=${1?repository}
destdir=${2?destination}
-GIT_MAN_REF=${3?master}
+GIT_MAN_REF=${3?main}
GIT_DIR=
for d in "$repository/.git" "$repository"
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 547a552463..1816bfa9f3 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -236,11 +236,11 @@ endif::git-rev-list[]
'%gD':: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
minutes ago}`; the format follows the rules described for the
`-g` option. The portion before the `@` is the refname as
- given on the command line (so `git log -g refs/heads/master`
- would yield `refs/heads/master@{0}`).
+ given on the command line (so `git log -g refs/heads/main`
+ would yield `refs/heads/main@{0}`).
'%gd':: shortened reflog selector; same as `%gD`, but the refname
portion is shortened for human readability (so
- `refs/heads/master` becomes just `master`).
+ `refs/heads/main` becomes just `main`).
'%gn':: reflog identity name
'%gN':: reflog identity name (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 1ad95065c1..a85a054371 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -23,11 +23,11 @@ characters and to avoid word splitting.
followed by a dash and a number of commits, followed by a dash, a
'g', and an abbreviated object name.
-'<refname>', e.g. 'master', 'heads/master', 'refs/heads/master'::
- A symbolic ref name. E.g. 'master' typically means the commit
- object referenced by 'refs/heads/master'. If you
- happen to have both 'heads/master' and 'tags/master', you can
- explicitly say 'heads/master' to tell Git which one you mean.
+'<refname>', e.g. 'main', 'heads/main', 'refs/heads/main'::
+ A symbolic ref name. E.g. 'main' typically means the commit
+ object referenced by 'refs/heads/main'. If you
+ happen to have both 'heads/main' and 'tags/main', you can
+ explicitly say 'heads/main' to tell Git which one you mean.
When ambiguous, a '<refname>' is disambiguated by taking the
first match in the following rules:
@@ -65,7 +65,7 @@ some output processing may assume ref names in UTF-8.
'@'::
'@' alone is a shortcut for `HEAD`.
-'[<refname>]@{<date>}', e.g. 'master@\{yesterday\}', 'HEAD@{5 minutes ago}'::
+'[<refname>]@{<date>}', e.g. 'main@\{yesterday\}', 'HEAD@{5 minutes ago}'::
A ref followed by the suffix '@' with a date specification
enclosed in a brace
pair (e.g. '\{yesterday\}', '{1 month 2 weeks 3 days 1 hour 1
@@ -74,15 +74,15 @@ some output processing may assume ref names in UTF-8.
used immediately following a ref name and the ref must have an
existing log ('$GIT_DIR/logs/<ref>'). Note that this looks up the state
of your *local* ref at a given time; e.g., what was in your local
- 'master' branch last week. If you want to look at commits made during
+ 'main' branch last week. If you want to look at commits made during
certain times, see `--since` and `--until`.
-'<refname>@{<n>}', e.g. 'master@\{1\}'::
+'<refname>@{<n>}', e.g. 'main@\{1\}'::
A ref followed by the suffix '@' with an ordinal specification
enclosed in a brace pair (e.g. '\{1\}', '\{15\}') specifies
- the n-th prior value of that ref. For example 'master@\{1\}'
- is the immediate prior value of 'master' while 'master@\{5\}'
- is the 5th prior value of 'master'. This suffix may only be used
+ the n-th prior value of that ref. For example 'main@\{1\}'
+ is the immediate prior value of 'main' while 'main@\{5\}'
+ is the 5th prior value of 'main'. This suffix may only be used
immediately following a ref name and the ref must have an existing
log ('$GIT_DIR/logs/<refname>').
@@ -95,7 +95,7 @@ some output processing may assume ref names in UTF-8.
The construct '@{-<n>}' means the <n>th branch/commit checked out
before the current one.
-'[<branchname>]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
+'[<branchname>]@\{upstream\}', e.g. 'main@\{upstream\}', '@\{u\}'::
The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
refers to the branch that the branch specified by branchname is set to build on
top of (configured with `branch.<name>.remote` and
@@ -103,7 +103,7 @@ some output processing may assume ref names in UTF-8.
current one. These suffixes are also accepted when spelled in uppercase, and
they mean the same thing no matter the case.
-'[<branchname>]@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
+'[<branchname>]@\{push\}', e.g. 'main@\{push\}', '@\{push\}'::
The suffix '@\{push}' reports the branch "where we would push to" if
`git push` were run while `branchname` was checked out (or the current
`HEAD` if no branchname is specified). Since our push destination is
@@ -115,10 +115,10 @@ Here's an example to make it more clear:
------------------------------
$ git config push.default current
$ git config remote.pushdefault myfork
-$ git switch -c mybranch origin/master
+$ git switch -c mybranch origin/main
$ git rev-parse --symbolic-full-name @{upstream}
-refs/remotes/origin/master
+refs/remotes/origin/main
$ git rev-parse --symbolic-full-name @{push}
refs/remotes/myfork/mybranch
@@ -139,7 +139,7 @@ thing no matter the case.
'<rev>{caret}0' means the commit itself and is used when '<rev>' is the
object name of a tag object that refers to a commit object.
-'<rev>{tilde}[<n>]', e.g. 'HEAD{tilde}, master{tilde}3'::
+'<rev>{tilde}[<n>]', e.g. 'HEAD{tilde}, main{tilde}3'::
A suffix '{tilde}' to a revision parameter means the first parent of
that commit object.
A suffix '{tilde}<n>' to a revision parameter means the commit
@@ -196,7 +196,7 @@ existing tag object.
Depending on the given text, the shell's word splitting rules might
require additional quoting.
-'<rev>:<path>', e.g. 'HEAD:README', 'master:./README'::
+'<rev>:<path>', e.g. 'HEAD:README', 'main:./README'::
A suffix ':' followed by a path names the blob or tree
at the given path in the tree-ish object named by the part
before the colon.
diff --git a/Documentation/technical/http-protocol.txt b/Documentation/technical/http-protocol.txt
index 51a79e63de..fae9811cc5 100644
--- a/Documentation/technical/http-protocol.txt
+++ b/Documentation/technical/http-protocol.txt
@@ -156,7 +156,7 @@ without any search/query parameters.
S: 200 OK
S:
S: 95dcfa3633004da0049d3d0fa03f80589cbcaf31 refs/heads/maint
- S: d049f6c27a2244e12041955e262a404c7faba355 refs/heads/master
+ S: d049f6c27a2244e12041955e262a404c7faba355 refs/heads/main
S: 2cb58b79488a98d2721cea644875a8dd0026b115 refs/tags/v1.0
S: a3c2e2402b99163d1d59756e5f207ae21cccba4c refs/tags/v1.0^{}
@@ -203,7 +203,7 @@ dumb server reply:
S: 200 OK
S:
S: 95dcfa3633004da0049d3d0fa03f80589cbcaf31 refs/heads/maint
- S: d049f6c27a2244e12041955e262a404c7faba355 refs/heads/master
+ S: d049f6c27a2244e12041955e262a404c7faba355 refs/heads/main
S: 2cb58b79488a98d2721cea644875a8dd0026b115 refs/tags/v1.0
S: a3c2e2402b99163d1d59756e5f207ae21cccba4c refs/tags/v1.0^{}
@@ -216,7 +216,7 @@ smart server reply:
S: 001e# service=git-upload-pack\n
S: 0000
S: 004895dcfa3633004da0049d3d0fa03f80589cbcaf31 refs/heads/maint\0multi_ack\n
- S: 003fd049f6c27a2244e12041955e262a404c7faba355 refs/heads/master\n
+ S: 003fd049f6c27a2244e12041955e262a404c7faba355 refs/heads/main\n
S: 003c2cb58b79488a98d2721cea644875a8dd0026b115 refs/tags/v1.0\n
S: 003fa3c2e2402b99163d1d59756e5f207ae21cccba4c refs/tags/v1.0^{}\n
S: 0000
diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt
index a4573d12ce..26bc88d670 100644
--- a/Documentation/technical/pack-protocol.txt
+++ b/Documentation/technical/pack-protocol.txt
@@ -177,7 +177,7 @@ with the object name that each reference currently points to.
00887217a7c7e582c46cec22a130adf4b9d7d950fba0 HEAD\0multi_ack thin-pack
side-band side-band-64k ofs-delta shallow no-progress include-tag
00441d3fcd5ced445d1abc402225c0b8a1299641f497 refs/heads/integration
- 003f7217a7c7e582c46cec22a130adf4b9d7d950fba0 refs/heads/master
+ 003f7217a7c7e582c46cec22a130adf4b9d7d950fba0 refs/heads/main
003cb88d2441cac0977faf98efc80305012112238d9d refs/tags/v0.9
003c525128480b96c89e6418b1e40909bf6c5b2d580f refs/tags/v1.0
003fe92df48743b7bc7d26bcaabfddde0a1e20cae47c refs/tags/v1.0^{}
@@ -659,16 +659,16 @@ An example client/server communication might look like this:
----
S: 006274730d410fcb6603ace96f1dc55ea6196122532d refs/heads/local\0report-status delete-refs ofs-delta\n
S: 003e7d1665144a3a975c05f1f43902ddaf084e784dbe refs/heads/debug\n
- S: 003f74730d410fcb6603ace96f1dc55ea6196122532d refs/heads/master\n
+ S: 003f74730d410fcb6603ace96f1dc55ea6196122532d refs/heads/main\n
S: 003d74730d410fcb6603ace96f1dc55ea6196122532d refs/heads/team\n
S: 0000
C: 00677d1665144a3a975c05f1f43902ddaf084e784dbe 74730d410fcb6603ace96f1dc55ea6196122532d refs/heads/debug\n
- C: 006874730d410fcb6603ace96f1dc55ea6196122532d 5a3f6be755bbb7deae50065988cbfa1ffa9ab68a refs/heads/master\n
+ C: 006874730d410fcb6603ace96f1dc55ea6196122532d 5a3f6be755bbb7deae50065988cbfa1ffa9ab68a refs/heads/main\n
C: 0000
C: [PACKDATA]
S: 000eunpack ok\n
S: 0018ok refs/heads/debug\n
- S: 002ang refs/heads/master non-fast-forward\n
+ S: 002ang refs/heads/main non-fast-forward\n
----
diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt
index 2b267c0da6..f11c31ca18 100644
--- a/Documentation/technical/protocol-capabilities.txt
+++ b/Documentation/technical/protocol-capabilities.txt
@@ -180,8 +180,8 @@ symref
------
This parameterized capability is used to inform the receiver which symbolic ref
-points to which ref; for example, "symref=HEAD:refs/heads/master" tells the
-receiver that HEAD points to master. This capability can be repeated to
+points to which ref; for example, "symref=HEAD:refs/heads/main" tells the
+receiver that HEAD points to main. This capability can be repeated to
represent multiple symrefs.
Servers SHOULD include this capability for the HEAD symref if it is one of the
diff --git a/Documentation/technical/reftable.txt b/Documentation/technical/reftable.txt
index 2951840e9c..41c474d1ab 100644
--- a/Documentation/technical/reftable.txt
+++ b/Documentation/technical/reftable.txt
@@ -850,8 +850,8 @@ be isolated into log-only files.
Logs are read backwards
^^^^^^^^^^^^^^^^^^^^^^^
-Logs are frequently accessed backwards (most recent N records for master
-to answer `master@{4}`), so log records are grouped by reference, and
+Logs are frequently accessed backwards (most recent N records for main
+to answer `main@{4}`), so log records are grouped by reference, and
sorted descending by update index.
Repository format
diff --git a/Documentation/technical/repository-version.txt b/Documentation/technical/repository-version.txt
index 7844ef30ff..97d1518da5 100644
--- a/Documentation/technical/repository-version.txt
+++ b/Documentation/technical/repository-version.txt
@@ -65,7 +65,7 @@ Note that if no extensions are specified in the config file, then
provides no benefit, and makes the repository incompatible with older
implementations of git).
-This document will serve as the master list for extensions. Any
+This document will serve as the main list for extensions. Any
implementation wishing to define a new extension should make a note of
it here, in order to claim the name.
diff --git a/Documentation/urls-remotes.txt b/Documentation/urls-remotes.txt
index bd184cd653..9fcfb70bc0 100644
--- a/Documentation/urls-remotes.txt
+++ b/Documentation/urls-remotes.txt
@@ -75,7 +75,7 @@ This file should have the following format:
Depending on the operation, git will use one of the following
refspecs, if you don't provide one on the command line.
`<branch>` is the name of this file in `$GIT_DIR/branches` and
-`<head>` defaults to `master`.
+`<head>` defaults to `main`.
git fetch uses:
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 833652983f..6bb8122e01 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -89,11 +89,11 @@ you the list of branch heads:
------------------------------------------------
$ git branch
-* master
+* main
------------------------------------------------
A freshly cloned repository contains a single branch head, by default
-named "master", with the working directory initialized to the state of
+named "main", with the working directory initialized to the state of
the project referred to by that branch head.
Most projects also use <<def_tag,tags>>. Tags, like heads, are
@@ -130,7 +130,7 @@ branches, with an asterisk marking the currently checked-out branch:
------------------------------------------------
$ git branch
- master
+ main
* new
------------------------------------------------
@@ -168,13 +168,13 @@ index 65898fa..b002dc6 100644
--- a/init-db.c
+++ b/init-db.c
@@ -7,7 +7,7 @@
-
+
int main(int argc, char **argv)
{
- char *sha1_dir = getenv(DB_ENVIRONMENT), *path;
+ char *sha1_dir, *path;
int len, i;
-
+
if (mkdir(".git", 0755) < 0) {
------------------------------------------------
@@ -231,7 +231,7 @@ lines drawn with - / and \. Time goes left to right:
................................................
o--o--o <-- Branch A
/
- o--o--o <-- master
+ o--o--o <-- main
\
o--o--o <-- Branch B
................................................
@@ -286,7 +286,7 @@ to remember which branch is current:
------------------------------------------------
$ cat .git/HEAD
-ref: refs/heads/master
+ref: refs/heads/main
------------------------------------------------
[[detached-head]]
@@ -320,7 +320,7 @@ $ cat .git/HEAD
427abfa28afedffadfca9dd8b067eb6d36bac53f
$ git branch
* (detached from v2.6.17)
- master
+ main
------------------------------------------------
In this case we say that the HEAD is "detached".
@@ -332,7 +332,7 @@ make up a name for the new branch. You can still create a new branch
[[examining-remote-branches]]
=== Examining branches from a remote repository
-The "master" branch that was created at the time you cloned is a copy
+The "main" branch that was created at the time you cloned is a copy
of the HEAD in the repository that you cloned from. That repository
may also have had other branches, though, and your local repository
keeps branches which track each of those remote branches, called
@@ -345,7 +345,7 @@ $ git branch -r
origin/html
origin/maint
origin/man
- origin/master
+ origin/main
origin/next
origin/pu
origin/todo
@@ -381,7 +381,7 @@ shorthand:
- The branch `test` is short for `refs/heads/test`.
- The tag `v2.6.18` is short for `refs/tags/v2.6.18`.
- - `origin/master` is short for `refs/remotes/origin/master`.
+ - `origin/main` is short for `refs/remotes/origin/main`.
The full name is occasionally useful if, for example, there ever
exists a tag and a branch with the same name.
@@ -409,7 +409,7 @@ may wish to check the original repository for updates.
The `git-fetch` command, with no arguments, will update all of the
remote-tracking branches to the latest version found in the original
repository. It will not touch any of your own branches--not even the
-"master" branch that was created for you on clone.
+"main" branch that was created for you on clone.
[[fetching-branches]]
=== Fetching branches from other repositories
@@ -422,7 +422,7 @@ $ git remote add staging git://git.kernel.org/.../gregkh/staging.git
$ git fetch staging
...
From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
- * [new branch] master -> staging/master
+ * [new branch] main -> staging/main
* [new branch] staging-linus -> staging/staging-linus
* [new branch] staging-next -> staging/staging-next
-------------------------------------------------
@@ -432,9 +432,9 @@ that you gave `git remote add`, in this case `staging`:
-------------------------------------------------
$ git branch -r
- origin/HEAD -> origin/master
- origin/master
- staging/master
+ origin/HEAD -> origin/main
+ origin/main
+ staging/main
staging/staging-linus
staging/staging-next
-------------------------------------------------
@@ -477,7 +477,7 @@ commit that introduced a bug into a project.
=== How to use bisect to find a regression
Suppose version 2.6.18 of your project worked, but the version at
-"master" crashes. Sometimes the best way to find the cause of such a
+"main" crashes. Sometimes the best way to find the cause of such a
regression is to perform a brute-force search through the project's
history to find the particular commit that caused the problem. The
linkgit:git-bisect[1] command can help you do this:
@@ -485,7 +485,7 @@ linkgit:git-bisect[1] command can help you do this:
-------------------------------------------------
$ git bisect start
$ git bisect good v2.6.18
-$ git bisect bad master
+$ git bisect bad main
Bisecting: 3537 revisions left to test after this
[65934a9a028b88e83e2b0f8b36618fe503349f8e] BLOCK: Make USB storage depend on SCSI rather than selecting it [try #6]
-------------------------------------------------
@@ -493,7 +493,7 @@ Bisecting: 3537 revisions left to test after this
If you run `git branch` at this point, you'll see that Git has
temporarily moved you in "(no branch)". HEAD is now detached from any
branch and points directly to a commit (with commit id 65934) that
-is reachable from "master" but not from v2.6.18. Compile and test it,
+is reachable from "main" but not from v2.6.18. Compile and test it,
and see whether it crashes. Assume it does crash. Then:
-------------------------------------------------
@@ -645,9 +645,9 @@ can also make more specific requests:
-------------------------------------------------
$ git log v2.5.. # commits since (not reachable from) v2.5
-$ git log test..master # commits reachable from master but not test
-$ git log master..test # ...reachable from test but not master
-$ git log master...test # ...reachable from either test or master,
+$ git log test..main # commits reachable from main but not test
+$ git log main..test # ...reachable from test but not main
+$ git log main...test # ...reachable from either test or main,
# but not both
$ git log --since="2 weeks ago" # commits from the last 2 weeks
$ git log Makefile # commits which modify Makefile
@@ -684,7 +684,7 @@ You can generate diffs between any two versions using
linkgit:git-diff[1]:
-------------------------------------------------
-$ git diff master..test
+$ git diff main..test
-------------------------------------------------
That will produce the diff between the tips of the two branches. If
@@ -692,18 +692,18 @@ you'd prefer to find the diff from their common ancestor to test, you
can use three dots instead of two:
-------------------------------------------------
-$ git diff master...test
+$ git diff main...test
-------------------------------------------------
Sometimes what you want instead is a set of patches; for this you can
use linkgit:git-format-patch[1]:
-------------------------------------------------
-$ git format-patch master..test
+$ git format-patch main..test
-------------------------------------------------
will generate a file with a patch for each commit reachable from test
-but not from master.
+but not from main.
[[viewing-old-file-versions]]
=== Viewing old file versions
@@ -748,7 +748,7 @@ Suppose you want to check whether two branches point at the same point
in history.
-------------------------------------------------
-$ git diff origin..master
+$ git diff origin..main
-------------------------------------------------
will tell you whether the contents of the project are the same at the
@@ -759,7 +759,7 @@ routes. You could compare the object names:
-------------------------------------------------
$ git rev-list origin
e05db0fd4f31dde7005f075a84f96b360d05984b
-$ git rev-list master
+$ git rev-list main
e05db0fd4f31dde7005f075a84f96b360d05984b
-------------------------------------------------
@@ -768,7 +768,7 @@ reachable from either one reference or the other but not
both; so
-------------------------------------------------
-$ git log origin...master
+$ git log origin...main
-------------------------------------------------
will return no commits when the two branches are equal.
@@ -861,7 +861,7 @@ and from v1.5.0-rc2, and not from v1.5.0-rc0.
==== Showing commits unique to a given branch
Suppose you would like to see all the commits reachable from the branch
-head named `master` but not from any other head in your repository.
+head named `main` but not from any other head in your repository.
We can list all the heads in this repository with
linkgit:git-show-ref[1]:
@@ -870,28 +870,28 @@ linkgit:git-show-ref[1]:
$ git show-ref --heads
bf62196b5e363d73353a9dcf094c59595f3153b7 refs/heads/core-tutorial
db768d5504c1bb46f63ee9d6e1772bd047e05bf9 refs/heads/maint
-a07157ac624b2524a059a3414e99f6f44bebc1e7 refs/heads/master
+a07157ac624b2524a059a3414e99f6f44bebc1e7 refs/heads/main
24dbc180ea14dc1aebe09f14c8ecf32010690627 refs/heads/tutorial-2
1e87486ae06626c2f31eaa63d26fc0fd646c8af2 refs/heads/tutorial-fixes
-------------------------------------------------
-We can get just the branch-head names, and remove `master`, with
+We can get just the branch-head names, and remove `main`, with
the help of the standard utilities cut and grep:
-------------------------------------------------
-$ git show-ref --heads | cut -d' ' -f2 | grep -v '^refs/heads/master'
+$ git show-ref --heads | cut -d' ' -f2 | grep -v '^refs/heads/main'
refs/heads/core-tutorial
refs/heads/maint
refs/heads/tutorial-2
refs/heads/tutorial-fixes
-------------------------------------------------
-And then we can ask to see all the commits reachable from master
+And then we can ask to see all the commits reachable from main
but not from these other heads:
-------------------------------------------------
-$ gitk master --not $( git show-ref --heads | cut -d' ' -f2 |
- grep -v '^refs/heads/master' )
+$ gitk main --not $( git show-ref --heads | cut -d' ' -f2 |
+ grep -v '^refs/heads/main' )
-------------------------------------------------
Obviously, endless variations are possible; for example, to see all
@@ -1585,19 +1585,19 @@ previous values of each branch. So in this case you can still find the
old history using, for example,
-------------------------------------------------
-$ git log master@{1}
+$ git log main@{1}
-------------------------------------------------
This lists the commits reachable from the previous version of the
-`master` branch head. This syntax can be used with any Git command
+`main` branch head. This syntax can be used with any Git command
that accepts a commit, not just with `git log`. Some other examples:
-------------------------------------------------
-$ git show master@{2} # See where the branch pointed 2,
-$ git show master@{3} # 3, ... changes ago.
-$ gitk master@{yesterday} # See where it pointed yesterday,
-$ gitk master@{"1 week ago"} # ... or last week
-$ git log --walk-reflogs master # show reflog entries for master
+$ git show main@{2} # See where the branch pointed 2,
+$ git show main@{3} # 3, ... changes ago.
+$ gitk main@{yesterday} # See where it pointed yesterday,
+$ gitk main@{"1 week ago"} # ... or last week
+$ git log --walk-reflogs main # show reflog entries for main
-------------------------------------------------
A separate reflog is kept for the HEAD, so
@@ -1677,21 +1677,21 @@ into your own work.
We have already seen <<Updating-a-repository-With-git-fetch,how to
keep remote-tracking branches up to date>> with linkgit:git-fetch[1],
and how to merge two branches. So you can merge in changes from the
-original repository's master branch with:
+original repository's main branch with:
-------------------------------------------------
$ git fetch
-$ git merge origin/master
+$ git merge origin/main
-------------------------------------------------
However, the linkgit:git-pull[1] command provides a way to do this in
one step:
-------------------------------------------------
-$ git pull origin master
+$ git pull origin main
-------------------------------------------------
-In fact, if you have `master` checked out, then this branch has been
+In fact, if you have `main` checked out, then this branch has been
configured by `git clone` to get changes from the HEAD branch of the
origin repository. So often you can
accomplish the above with just a simple
@@ -1928,17 +1928,17 @@ access, which you will need to update the public repository with the
latest changes created in your private repository.
The simplest way to do this is using linkgit:git-push[1] and ssh; to
-update the remote branch named `master` with the latest state of your
-branch named `master`, run
+update the remote branch named `main` with the latest state of your
+branch named `main`, run
-------------------------------------------------
-$ git push ssh://yourserver.com/~you/proj.git master:master
+$ git push ssh://yourserver.com/~you/proj.git main:main
-------------------------------------------------
or just
-------------------------------------------------
-$ git push ssh://yourserver.com/~you/proj.git master
+$ git push ssh://yourserver.com/~you/proj.git main
-------------------------------------------------
As with `git fetch`, `git push` will complain if this does not result in a
@@ -1970,7 +1970,7 @@ adds the following to `.git/config`:
which lets you do the same push with just
-------------------------------------------------
-$ git push public-repo master
+$ git push public-repo main
-------------------------------------------------
See the explanations of the `remote.<name>.url`,
@@ -1984,7 +1984,7 @@ If a push would not result in a <<fast-forwards,fast-forward>> of the
remote branch, then it will fail with an error like:
-------------------------------------------------
- ! [rejected] master -> master (non-fast-forward)
+ ! [rejected] main -> main (non-fast-forward)
error: failed to push some refs to '...'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
@@ -2004,14 +2004,14 @@ You may force `git push` to perform the update anyway by preceding the
branch name with a plus sign:
-------------------------------------------------
-$ git push ssh://yourserver.com/~you/proj.git +master
+$ git push ssh://yourserver.com/~you/proj.git +main
-------------------------------------------------
Note the addition of the `+` sign. Alternatively, you can use the
`-f` flag to force the remote update, as in:
-------------------------------------------------
-$ git push -f ssh://yourserver.com/~you/proj.git master
+$ git push -f ssh://yourserver.com/~you/proj.git main
-------------------------------------------------
Normally whenever a branch head in a public repository is modified, it
@@ -2127,20 +2127,20 @@ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git wor
$ cd work
-------------------------------------------------
-Linus's tree will be stored in the remote-tracking branch named origin/master,
+Linus's tree will be stored in the remote-tracking branch named origin/main,
and can be updated using linkgit:git-fetch[1]; you can track other
public trees using linkgit:git-remote[1] to set up a "remote" and
linkgit:git-fetch[1] to keep them up to date; see
<<repositories-and-branches>>.
Now create the branches in which you are going to work; these start out
-at the current tip of origin/master branch, and should be set up (using
+at the current tip of origin/main branch, and should be set up (using
the `--track` option to linkgit:git-branch[1]) to merge changes in from
Linus by default.
-------------------------------------------------
-$ git branch --track test origin/master
-$ git branch --track release origin/master
+$ git branch --track test origin/main
+$ git branch --track release origin/main
-------------------------------------------------
These can be easily kept up to date using linkgit:git-pull[1].
@@ -2165,7 +2165,7 @@ make it easy to push both branches to your public tree. (See
-------------------------------------------------
$ cat >> .git/config <<EOF
[remote "mytree"]
- url = master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux.git
+ url = main.kernel.org:/pub/scm/linux/kernel/git/aegl/linux.git
push = release
push = test
EOF
@@ -2256,7 +2256,7 @@ If it has been merged, then there will be no output.)
Once a patch completes the great cycle (moving from test to release,
then pulled by Linus, and finally coming back into your local
-`origin/master` branch), the branch for this change is no longer needed.
+`origin/main` branch), the branch for this change is no longer needed.
You detect this when the output from:
-------------------------------------------------
@@ -2289,16 +2289,16 @@ Here are some of the scripts that simplify all this even further.
==== update script ====
# Update a branch in my Git tree. If the branch to be updated
# is origin, then pull from kernel.org. Otherwise merge
-# origin/master branch into test|release branch
+# origin/main branch into test|release branch
case "$1" in
test|release)
git checkout $1 && git pull . origin
;;
origin)
- before=$(git rev-parse refs/remotes/origin/master)
+ before=$(git rev-parse refs/remotes/origin/main)
git fetch origin
- after=$(git rev-parse refs/remotes/origin/master)
+ after=$(git rev-parse refs/remotes/origin/main)
if [ $before != $after ]
then
git log $before..$after | git shortlog
@@ -2366,7 +2366,7 @@ do
echo -n $gb ======= $branch ====== $restore " "
status=
- for ref in test release origin/master
+ for ref in test release origin/main
do
if [ `git rev-list $ref..$branch | wc -c` -gt 0 ]
then
@@ -2390,7 +2390,7 @@ do
echo $rb "<$status>" $restore
;;
esac
- git log origin/master..$branch | git shortlog
+ git log origin/main..$branch | git shortlog
done
-------------------------------------------------
@@ -2760,14 +2760,14 @@ store it locally under the name `refs/heads/my-todo-work`.
You can also fetch branches from other repositories; so
-------------------------------------------------
-$ git fetch git://example.com/proj.git master:example-master
+$ git fetch git://example.com/proj.git main:example-main
-------------------------------------------------
-will create a new branch named `example-master` and store in it the
-branch named `master` from the repository at the given URL. If you
-already have a branch named example-master, it will attempt to
+will create a new branch named `example-main` and store in it the
+branch named `main` from the repository at the given URL. If you
+already have a branch named example-main, it will attempt to
<<fast-forwards,fast-forward>> to the commit given by example.com's
-master branch. In more detail:
+main branch. In more detail:
[[fetch-fast-forwards]]
=== git fetch and fast-forwards
@@ -2813,7 +2813,7 @@ If git fetch fails because the new head of a branch is not a
descendant of the old head, you may force the update with:
-------------------------------------------------
-$ git fetch git://example.com/proj.git +master:refs/remotes/example/master
+$ git fetch git://example.com/proj.git +main:refs/remotes/example/main
-------------------------------------------------
Note the addition of the `+` sign. Alternatively, you can use the `-f`
@@ -2823,7 +2823,7 @@ flag to force updates of all the fetched branches, as in:
$ git fetch -f origin
-------------------------------------------------
-Be aware that commits that the old version of example/master pointed at
+Be aware that commits that the old version of example/main pointed at
may be lost, as we saw in the previous section.
[[remote-branch-configuration]]
@@ -2841,8 +2841,8 @@ core.filemode=true
core.logallrefupdates=true
remote.origin.url=git://git.kernel.org/pub/scm/git/git.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
-branch.master.remote=origin
-branch.master.merge=refs/heads/master
+branch.main.remote=origin
+branch.main.merge=refs/heads/main
-------------------------------------------------
If there are other repositories that you also use frequently, you can
@@ -3507,7 +3507,7 @@ $ ls -a
The `git submodule add <repo> <path>` command does a couple of things:
- It clones the submodule from `<repo>` to the given `<path>` under the
- current directory and by default checks out the master branch.
+ current directory and by default checks out the main branch.
- It adds the submodule's clone path to the linkgit:gitmodules[5] file and
adds this file to the index, ready to be committed.
- It adds the submodule's current commit ID to the index, ready to be
@@ -3568,7 +3568,7 @@ working on a branch.
-------------------------------------------------
$ git branch
* (detached from d266b98)
- master
+ main
-------------------------------------------------
If you want to make a change within a submodule and you have a detached head,
@@ -3577,7 +3577,7 @@ change within the submodule, and then update the superproject to reference the
new commit:
-------------------------------------------------
-$ git switch master
+$ git switch main
-------------------------------------------------
or
@@ -4355,10 +4355,10 @@ Update and examine branches from the repository you cloned from:
-----------------------------------------------
$ git fetch # update
$ git branch -r # list
- origin/master
+ origin/main
origin/next
...
-$ git switch -c masterwork origin/master
+$ git switch -c mainwork origin/main
-----------------------------------------------
Fetch a branch from a different repository, and give it a new
@@ -4380,7 +4380,7 @@ $ git remote show example # get details
* remote example
URL: git://example.com/project.git
Tracked remote branches
- master
+ main
next
...
$ git fetch example # update branches from example
@@ -4396,9 +4396,9 @@ $ gitk # visualize and browse history
$ git log # list all commits
$ git log src/ # ...modifying src/
$ git log v2.6.15..v2.6.16 # ...in v2.6.16, not in v2.6.15
-$ git log master..test # ...in branch test, not in branch master
-$ git log test..master # ...in branch master, but not in test
-$ git log test...master # ...in one branch, not in both
+$ git log main..test # ...in branch test, not in branch main
+$ git log test..main # ...in branch main, but not in test
+$ git log test...main # ...in one branch, not in both
$ git log -S'foo()' # ...where difference contain "foo()"
$ git log --since="2 weeks ago"
$ git log -p # show patches as well
@@ -4458,7 +4458,7 @@ $ git commit -a # use latest content of all tracked files
-----------------------------------------------
$ git merge test # merge branch "test" into the current branch
-$ git pull git://example.com/project.git master
+$ git pull git://example.com/project.git main
# fetch and merge in remote branch
$ git pull . test # equivalent to git merge test
-----------------------------------------------
diff --git a/README.md b/README.md
index eb8115e6b0..fa6039caca 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,3 @@
-[![Build status](https://github.com/git/git/workflows/CI/PR/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)
-
Git - fast, scalable, distributed revision control system
=========================================================
diff --git a/builtin/clone.c b/builtin/clone.c
index cb48a291ca..1406ac658d 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -1264,8 +1264,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
remote_head = NULL;
option_no_checkout = 1;
if (!option_bare)
- install_branch_config(0, "master", option_origin,
- "refs/heads/master");
+ install_branch_config(0, "main", option_origin,
+ "refs/heads/main");
}
write_refspec_config(src_ref_prefix, our_head_points_at,
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 85868162ee..aa4a7a5910 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -518,10 +518,10 @@ static const char *anonymize_refname(const char *refname)
int i;
/*
- * We also leave "master" as a special case, since it does not reveal
+ * We also leave "main" as a special case, since it does not reveal
* anything interesting.
*/
- if (!strcmp(refname, "refs/heads/master"))
+ if (!strcmp(refname, "refs/heads/main"))
return refname;
strbuf_reset(&anon);
@@ -1011,7 +1011,7 @@ static void handle_tags_and_duplicates(struct string_list *extras)
/*
* Getting here means we have a commit which
* was excluded by a negative refspec (e.g.
- * fast-export ^master master). If we are
+ * fast-export ^main main). If we are
* referencing excluded commits, set the ref
* to the exact commit. Otherwise, the user
* wants the branch exported but every commit
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 0b7222e718..c16be7dbb3 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -258,14 +258,14 @@ static int create_default_files(const char *template_path,
die("failed to set up refs db: %s", err.buf);
/*
- * Create the default symlink from ".git/HEAD" to the "master"
+ * Create the default symlink from ".git/HEAD" to the "main"
* branch, if it does not exist yet.
*/
path = git_path_buf(&buf, "HEAD");
reinit = (!access(path, R_OK)
|| readlink(path, junk, sizeof(junk)-1) != -1);
if (!reinit) {
- if (create_symref("HEAD", "refs/heads/master", NULL) < 0)
+ if (create_symref("HEAD", "refs/heads/main", NULL) < 0)
exit(1);
}
diff --git a/builtin/remote.c b/builtin/remote.c
index e8377994e5..fd51776ce0 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -15,7 +15,7 @@
static const char * const builtin_remote_usage[] = {
N_("git remote [-v | --verbose]"),
- N_("git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <name> <url>"),
+ N_("git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <name> <url>"),
N_("git remote rename <old> <new>"),
N_("git remote remove <name>"),
N_("git remote set-head <name> (-a | --auto | -d | --delete | <branch>)"),
@@ -154,7 +154,7 @@ static int add(int argc, const char **argv)
int fetch = 0, fetch_tags = TAGS_DEFAULT;
unsigned mirror = MIRROR_NONE;
struct string_list track = STRING_LIST_INIT_NODUP;
- const char *master = NULL;
+ const char *main = NULL;
struct remote *remote;
struct strbuf buf = STRBUF_INIT, buf2 = STRBUF_INIT;
const char *name, *url;
@@ -169,7 +169,7 @@ static int add(int argc, const char **argv)
N_("or do not fetch any tag at all (--no-tags)"), TAGS_UNSET),
OPT_STRING_LIST('t', "track", &track, N_("branch"),
N_("branch(es) to track")),
- OPT_STRING('m', "master", &master, N_("branch"), N_("master branch")),
+ OPT_STRING('m', "main", &main, N_("branch"), N_("main branch")),
OPT_CALLBACK_F(0, "mirror", &mirror, "(push|fetch)",
N_("set up remote as a mirror to push to or fetch from"),
PARSE_OPT_OPTARG | PARSE_OPT_COMP_ARG, parse_mirror_opt),
@@ -182,8 +182,8 @@ static int add(int argc, const char **argv)
if (argc != 2)
usage_with_options(builtin_remote_add_usage, options);
- if (mirror && master)
- die(_("specifying a master branch makes no sense with --mirror"));
+ if (mirror && main)
+ die(_("specifying a main branch makes no sense with --mirror"));
if (mirror && !(mirror & MIRROR_FETCH) && track.nr)
die(_("specifying branches to track makes sense only with fetch mirrors"));
@@ -228,15 +228,15 @@ static int add(int argc, const char **argv)
if (fetch && fetch_remote(name))
return 1;
- if (master) {
+ if (main) {
strbuf_reset(&buf);
strbuf_addf(&buf, "refs/remotes/%s/HEAD", name);
strbuf_reset(&buf2);
- strbuf_addf(&buf2, "refs/remotes/%s/%s", name, master);
+ strbuf_addf(&buf2, "refs/remotes/%s/%s", name, main);
if (create_symref(buf.buf, buf2.buf, "remote add"))
- return error(_("Could not setup master '%s'"), master);
+ return error(_("Could not setup main '%s'"), main);
}
strbuf_release(&buf);
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 46c03d2a12..102aee83cf 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1981,7 +1981,7 @@ static const char *remote_submodule_branch(const char *path)
free(key);
if (!branch)
- return "master";
+ return "main";
if (!strcmp(branch, ".")) {
const char *refname = resolve_ref_unsafe("HEAD", 0, NULL, NULL);
diff --git a/compat/vcbuild/README b/compat/vcbuild/README
index 42292e7c09..050ffa0767 100644
--- a/compat/vcbuild/README
+++ b/compat/vcbuild/README
@@ -42,9 +42,9 @@ Visual Studio. The initial build will install the vcpkg system and build the
dependencies automatically. This will take a while.
Instead of generating the `git.sln` file yourself (which requires a full Git
-for Windows SDK), you may want to consider fetching the `vs/master` branch of
+for Windows SDK), you may want to consider fetching the `vs/main` branch of
https://github.com/git-for-windows/git instead (which is updated automatically
-via CI running `make vcxproj`). The `vs/master` branch does not require a Git
+via CI running `make vcxproj`). The `vs/main` branch does not require a Git
for Windows to build, but you can run the test scripts in a regular Git Bash.
Note that `make vcxproj` will automatically add and commit the generated `.sln`
@@ -69,7 +69,7 @@ The Steps of Build Git with VS2008
WWW: http://repo.or.cz/w/msvcgit.git
Git: git clone git://repo.or.cz/msvcgit.git
- Zip: http://repo.or.cz/w/msvcgit.git?a=snapshot;h=master;sf=zip
+ Zip: http://repo.or.cz/w/msvcgit.git?a=snapshot;h=main;sf=zip
and call the setup_32bit_env.cmd batch script before compiling Git,
(see repo/package README for details), or the source repository:
@@ -85,7 +85,7 @@ The Steps of Build Git with VS2008
WWW: http://repo.or.cz/w/msysgit.git
Git: git clone git://repo.or.cz/msysgit.git
- Zip: http://repo.or.cz/w/msysgit.git?a=snapshot;h=master;sf=zip
+ Zip: http://repo.or.cz/w/msysgit.git?a=snapshot;h=main;sf=zip
This environment is also needed when you use the resulting
executables, since Git might need to run scripts which are part of
diff --git a/connect.c b/connect.c
index 0df45a1108..bbc3be9fc2 100644
--- a/connect.c
+++ b/connect.c
@@ -159,7 +159,7 @@ static void parse_one_symref_info(struct string_list *symref, const char *val, i
if (!len)
return; /* just "symref" */
- /* e.g. "symref=HEAD:refs/heads/master" */
+ /* e.g. "symref=HEAD:refs/heads/main" */
sym = xmemdupz(val, len);
target = strchr(sym, ':');
if (!target)
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 014cd7c3cf..1caf836f56 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -80,7 +80,7 @@
# to one of these values:
#
# contains relative to newer annotated tag (v1.6.3.2~35)
-# branch relative to newer tag or branch (master~4)
+# branch relative to newer tag or branch (main~4)
# describe relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
# tag relative to any older tag (v1.6.3.1-13-gdd42c2f)
# default exactly matching tag
diff --git a/contrib/diff-highlight/t/t9400-diff-highlight.sh b/contrib/diff-highlight/t/t9400-diff-highlight.sh
index f6f5195d00..3d7a0573cb 100755
--- a/contrib/diff-highlight/t/t9400-diff-highlight.sh
+++ b/contrib/diff-highlight/t/t9400-diff-highlight.sh
@@ -52,7 +52,7 @@ test_strip_patch_header () {
# dh_test_setup_history generates a contrived graph such that we have at least
# 1 nesting (E) and 2 nestings (F).
#
-# A---B master
+# A---B main
# /
# D---E---F branch
#
@@ -80,7 +80,7 @@ dh_test_setup_history () {
test_tick &&
git commit -a -m "E" &&
- git checkout master &&
+ git checkout main &&
echo file2 >file &&
test_tick &&
git commit -a -m "A" &&
@@ -90,7 +90,7 @@ dh_test_setup_history () {
test_tick &&
git commit -a -m "F" &&
- git checkout master &&
+ git checkout main &&
echo file3 >file &&
test_tick &&
git commit -a -m "B"
@@ -287,13 +287,13 @@ test_expect_success 'diff-highlight ignores combined diffs' '
git commit -m base &&
>file &&
- git commit -am master &&
+ git commit -am main &&
git checkout -b other HEAD^ &&
echo "modified content" >file &&
git commit -am other &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
echo "resolved content" >file &&
git commit -am resolved &&
diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el
index 6a8a2b8ff1..3f94d47dd6 100644
--- a/contrib/emacs/git-blame.el
+++ b/contrib/emacs/git-blame.el
@@ -1,6 +1,6 @@
(error "git-blame.el no longer ships with git. It's recommended
to replace its use with Emacs's own vc-annotate. See
contrib/emacs/README in git's
-sources (https://github.com/git/git/blob/master/contrib/emacs/README)
+sources (https://github.com/git/git/blob/main/contrib/emacs/README)
for more info on suggested alternatives and for why this
happened.")
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 03f926281f..4bdd052403 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1,6 +1,6 @@
(error "git.el no longer ships with git. It's recommended to
replace its use with Magit, or simply delete references to git.el
in your initialization file(s). See contrib/emacs/README in git's
-sources (https://github.com/git/git/blob/master/contrib/emacs/README)
+sources (https://github.com/git/git/blob/main/contrib/emacs/README)
for suggested alternatives and for why this happened. Emacs's own
VC mode and Magit are viable alternatives.")
diff --git a/contrib/fast-import/import-directories.perl b/contrib/fast-import/import-directories.perl
index a16f79cfdc..a193d02a07 100755
--- a/contrib/fast-import/import-directories.perl
+++ b/contrib/fast-import/import-directories.perl
@@ -88,7 +88,7 @@ =head3 Revision description section
; author sets the author of the revisions
author=Peter Krefting <[email protected]>
; branch sets the branch that the revision should be committed to
- branch=master
+ branch=main
; parent describes the revision that is the parent of this commit
; (optional)
parent=1
diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py
index 7eb1b24cc7..e810399baf 100755
--- a/contrib/hg-to-git/hg-to-git.py
+++ b/contrib/hg-to-git/hg-to-git.py
@@ -122,7 +122,7 @@ def getgitenv(user, date):
print('analysing the branches...')
hgchildren["0"] = ()
hgparents["0"] = (None, None)
-hgbranch["0"] = "master"
+hgbranch["0"] = "main"
for cset in range(1, int(tip) + 1):
hgchildren[str(cset)] = ()
prnts = os.popen('hg log -r %d --template "{parents}"' % cset).read().strip().split(' ')
@@ -141,9 +141,9 @@ def getgitenv(user, date):
hgparents[str(cset)] = (parent, mparent)
if mparent:
- # For merge changesets, take either one, preferably the 'master' branch
- if hgbranch[mparent] == 'master':
- hgbranch[str(cset)] = 'master'
+ # For merge changesets, take either one, preferably the 'main' branch
+ if hgbranch[mparent] == 'main':
+ hgbranch[str(cset)] = 'main'
else:
hgbranch[str(cset)] = hgbranch[parent]
else:
diff --git a/contrib/hooks/multimail/CONTRIBUTING.rst b/contrib/hooks/multimail/CONTRIBUTING.rst
index de20a54287..e0bfa9b9d2 100644
--- a/contrib/hooks/multimail/CONTRIBUTING.rst
+++ b/contrib/hooks/multimail/CONTRIBUTING.rst
@@ -20,7 +20,7 @@ requests, and we use GitHub pull requests to exchange patches (though,
if you prefer, you can send patches via the Git mailing list with CC
to the maintainers). Please sign off your patches as per the `Git
project practice
-<https://github.com/git/git/blob/master/Documentation/SubmittingPatches#L234>`__.
+<https://github.com/git/git/blob/main/Documentation/SubmittingPatches#L234>`__.
Please vote for issues you would like to be addressed in priority
(click "add your reaction" and then the "+1" thumbs-up button on the
diff --git a/contrib/hooks/multimail/README.migrate-from-post-receive-email b/contrib/hooks/multimail/README.migrate-from-post-receive-email
index 1e6a976699..9560bae9a6 100644
--- a/contrib/hooks/multimail/README.migrate-from-post-receive-email
+++ b/contrib/hooks/multimail/README.migrate-from-post-receive-email
@@ -75,10 +75,10 @@ to the main README file:
describe new commits that were included in multiple branches. For
example, if a single push adds the "*" commits in the diagram below,
then post-receive-email would never include the details of the two
- commits that are common to "master" and "branch" in its
+ commits that are common to "main" and "branch" in its
notifications.
- o---o---o---*---*---* <-- master
+ o---o---o---*---*---* <-- main
\
*---* <-- branch
diff --git a/contrib/hooks/multimail/README.rst b/contrib/hooks/multimail/README.rst
index 7c0fc4a6ef..967ce6c672 100644
--- a/contrib/hooks/multimail/README.rst
+++ b/contrib/hooks/multimail/README.rst
@@ -1,7 +1,7 @@
git-multimail version 1.5.0
===========================
-.. image:: https://travis-ci.org/git-multimail/git-multimail.svg?branch=master
+.. image:: https://travis-ci.org/git-multimail/git-multimail.svg?branch=main
:target: https://travis-ci.org/git-multimail/git-multimail
git-multimail is a tool for sending notification emails on pushes to a
@@ -43,7 +43,7 @@ By default, for each push received by the repository, git-multimail:
commits. Commits are handled in reverse topological order (i.e.,
parents shown before children). For example::
- [git] branch master updated
+ [git] branch main updated
+ [git] 01/08: doc: fix xref link from api docs to manual pages
+ [git] 02/08: api-credentials.txt: show the big picture first
+ [git] 03/08: api-credentials.txt: mention credential.helper explicitly
@@ -626,9 +626,9 @@ multimailhook.refFilterInclusionRegex, multimailhook.refFilterExclusionRegex, mu
considered to match if any substring matches. For example, to
filter-out all tags, set ``refFilterExclusionRegex`` to
``^refs/tags/`` (note the leading ``^`` but no trailing ``$``). If
- you set ``refFilterExclusionRegex`` to ``master``, then any ref
- containing ``master`` will be excluded (the ``master`` branch, but
- also ``refs/tags/master`` or ``refs/heads/foo-master-bar``).
+ you set ``refFilterExclusionRegex`` to ``main``, then any ref
+ containing ``main`` will be excluded (the ``main`` branch, but
+ also ``refs/tags/main`` or ``refs/heads/foo-main-bar``).
``refFilterDoSendRegex`` and ``refFilterDontSendRegex`` are
analogous to ``refFilterInclusionRegex`` and
@@ -637,8 +637,8 @@ multimailhook.refFilterInclusionRegex, multimailhook.refFilterExclusionRegex, mu
introduced by one excluded ref will not be considered as new when
they reach an included ref. Typically, if you add a branch ``foo``
to ``refFilterDontSendRegex``, push commits to this branch, and
- later merge branch ``foo`` into ``master``, then the notification
- email for ``master`` will contain a commit email only for the
+ later merge branch ``foo`` into ``main``, then the notification
+ email for ``main`` will contain a commit email only for the
merge commit. If you include ``foo`` in
``refFilterExclusionRegex``, then at the time of merge, you will
receive one commit email per commit in the branch.
@@ -647,18 +647,18 @@ multimailhook.refFilterInclusionRegex, multimailhook.refFilterExclusionRegex, mu
[multimailhook]
refFilterExclusionRegex = ^refs/tags/
- refFilterExclusionRegex = ^refs/heads/master$
+ refFilterExclusionRegex = ^refs/heads/main$
You can also provide a whitespace-separated list like::
[multimailhook]
- refFilterExclusionRegex = ^refs/tags/ ^refs/heads/master$
+ refFilterExclusionRegex = ^refs/tags/ ^refs/heads/main$
- Both examples exclude tags and the master branch, and are
+ Both examples exclude tags and the main branch, and are
equivalent to::
[multimailhook]
- refFilterExclusionRegex = ^refs/tags/|^refs/heads/master$
+ refFilterExclusionRegex = ^refs/tags/|^refs/heads/main$
``refFilterInclusionRegex`` and ``refFilterExclusionRegex`` are
strictly stronger than ``refFilterDoSendRegex`` and
diff --git a/contrib/hooks/multimail/doc/troubleshooting.rst b/contrib/hooks/multimail/doc/troubleshooting.rst
index 651b509ee6..2c60239c7f 100644
--- a/contrib/hooks/multimail/doc/troubleshooting.rst
+++ b/contrib/hooks/multimail/doc/troubleshooting.rst
@@ -55,7 +55,7 @@ repository. You should see something like::
remote: ===========================================================================
remote: Date: Mon, 25 Apr 2016 18:39:59 +0200
remote: To: [email protected]
- remote: Subject: [git] branch master updated: foo
+ remote: Subject: [git] branch main updated: foo
remote: MIME-Version: 1.0
remote: Content-Type: text/plain; charset=utf-8
remote: Content-Transfer-Encoding: 8bit
@@ -69,7 +69,7 @@ repository. You should see something like::
remote: the administrator of this repository.
remote: ===========================================================================
To /path/to/repo
- 6278f04..e173f20 master -> master
+ 6278f04..e173f20 main -> main
Note: this does not include the sender (Return-Path: header), as it is
not part of the message content but passed to the mailer. Some mailer
diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid
index 0092d67b8a..9857f8bf3e 100755
--- a/contrib/hooks/update-paranoid
+++ b/contrib/hooks/update-paranoid
@@ -5,7 +5,7 @@ use File::Spec;
$ENV{PATH} = '/opt/git/bin';
my $acl_git = '/vcs/acls.git';
-my $acl_branch = 'refs/heads/master';
+my $acl_branch = 'refs/heads/main';
my $debug = 0;
=doc
@@ -34,7 +34,7 @@ Example:
committer = John R. Doe <[email protected]>
[repository "acls"]
- allow = heads/master
+ allow = heads/main
allow = CDUR for heads/jd/
allow = C for ^tags/v\\d+$
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index d8ff2e69c4..57bd2e9c51 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -512,7 +512,7 @@ sub download_mw_mediafile {
sub get_last_local_revision {
# Get note regarding last mediawiki revision
- my $note = run_git("notes --ref=${remotename}/mediawiki show refs/mediawiki/${remotename}/master 2>/dev/null");
+ my $note = run_git("notes --ref=${remotename}/mediawiki show refs/mediawiki/${remotename}/main 2>/dev/null");
my @note_info = split(/ /, $note);
my $lastrevision_number;
@@ -639,9 +639,9 @@ sub mw_capabilities {
sub mw_list {
# MediaWiki do not have branches, we consider one branch arbitrarily
- # called master, and HEAD pointing to it.
- print {*STDOUT} "? refs/heads/master\n";
- print {*STDOUT} "\@refs/heads/master HEAD\n";
+ # called main, and HEAD pointing to it.
+ print {*STDOUT} "? refs/heads/main\n";
+ print {*STDOUT} "\@refs/heads/main HEAD\n";
print {*STDOUT} "\n";
return;
}
@@ -744,14 +744,14 @@ sub import_file_revision {
my $author = $commit{author};
my $date = $commit{date};
- print {*STDOUT} "commit refs/mediawiki/${remotename}/master\n";
+ print {*STDOUT} "commit refs/mediawiki/${remotename}/main\n";
print {*STDOUT} "mark :${n}\n";
print {*STDOUT} "committer ${author} <${author}\@${wiki_name}> " . $date->epoch . " +0000\n";
literal_data($comment);
# If it's not a clone, we need to know where to start from
if (!$full_import && $n == 1) {
- print {*STDOUT} "from refs/mediawiki/${remotename}/master^0\n";
+ print {*STDOUT} "from refs/mediawiki/${remotename}/main^0\n";
}
if ($content ne DELETED_CONTENT) {
print {*STDOUT} 'M 644 inline ' .
@@ -817,8 +817,8 @@ sub mw_import {
sub mw_import_ref {
my $ref = shift;
# The remote helper will call "import HEAD" and
- # "import refs/heads/master".
- # Since HEAD is a symbolic ref to master (by convention,
+ # "import refs/heads/main".
+ # Since HEAD is a symbolic ref to main (by convention,
# followed by the output of the command "list" that we gave),
# we don't need to do anything in this case.
if ($ref eq 'HEAD') {
@@ -1141,9 +1141,9 @@ sub mw_push {
print {*STDOUT} "error ${remote} cannot delete\n";
next;
}
- if ($remote ne 'refs/heads/master') {
- print {*STDERR} "Only push to the branch 'master' is supported on a MediaWiki\n";
- print {*STDOUT} "error ${remote} only master allowed\n";
+ if ($remote ne 'refs/heads/main') {
+ print {*STDERR} "Only push to the branch 'main' is supported on a MediaWiki\n";
+ print {*STDOUT} "error ${remote} only main allowed\n";
next;
}
if (mw_push_revision($local, $remote)) {
@@ -1167,7 +1167,7 @@ sub mw_push {
sub mw_push_revision {
my $local = shift;
- my $remote = shift; # actually, this has to be "refs/heads/master" at this point.
+ my $remote = shift; # actually, this has to be "refs/heads/main" at this point.
my $last_local_revid = get_last_local_revision();
print {*STDERR} ".\n"; # Finish sentence started by get_last_local_revision()
my $last_remote_revid = get_last_remote_revision();
@@ -1176,8 +1176,8 @@ sub mw_push_revision {
# Get sha1 of commit pointed by local HEAD
my $HEAD_sha1 = run_git("rev-parse ${local} 2>/dev/null");
chomp($HEAD_sha1);
- # Get sha1 of commit pointed by remotes/$remotename/master
- my $remoteorigin_sha1 = run_git("rev-parse refs/remotes/${remotename}/master 2>/dev/null");
+ # Get sha1 of commit pointed by remotes/$remotename/main
+ my $remoteorigin_sha1 = run_git("rev-parse refs/remotes/${remotename}/main 2>/dev/null");
chomp($remoteorigin_sha1);
if ($last_local_revid > 0 &&
@@ -1190,8 +1190,8 @@ sub mw_push_revision {
return 0;
}
- # Get every commit in between HEAD and refs/remotes/origin/master,
- # including HEAD and refs/remotes/origin/master
+ # Get every commit in between HEAD and refs/remotes/origin/main,
+ # including HEAD and refs/remotes/origin/main
my @commit_pairs = ();
if ($last_local_revid > 0) {
my $parsed_sha1 = $remoteorigin_sha1;
diff --git a/contrib/remote-helpers/README b/contrib/remote-helpers/README
index ac72332517..5413876dbf 100644
--- a/contrib/remote-helpers/README
+++ b/contrib/remote-helpers/README
@@ -9,7 +9,7 @@ You can pick a directory on your $PATH and download them from these
repositories, e.g.:
$ wget -O $HOME/bin/git-remote-hg \
- https://raw.github.com/felipec/git-remote-hg/master/git-remote-hg
+ https://raw.github.com/felipec/git-remote-hg/main/git-remote-hg
$ wget -O $HOME/bin/git-remote-bzr \
- https://raw.github.com/felipec/git-remote-bzr/master/git-remote-bzr
+ https://raw.github.com/felipec/git-remote-bzr/main/git-remote-bzr
$ chmod +x $HOME/bin/git-remote-hg $HOME/bin/git-remote-bzr
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index 1c3d87f861..984fec96f2 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -6,6 +6,6 @@ WARNING: For more information visit https://github.com/felipec/git-remote-bzr
WARNING:
WARNING: You can pick a directory on your $PATH and download it, e.g.:
WARNING: $ wget -O $HOME/bin/git-remote-bzr \
-WARNING: https://raw.github.com/felipec/git-remote-bzr/master/git-remote-bzr
+WARNING: https://raw.github.com/felipec/git-remote-bzr/main/git-remote-bzr
WARNING: $ chmod +x $HOME/bin/git-remote-bzr
EOT
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 8e9188364c..797e2fc182 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -6,6 +6,6 @@ WARNING: For more information visit https://github.com/felipec/git-remote-hg
WARNING:
WARNING: You can pick a directory on your $PATH and download it, e.g.:
WARNING: $ wget -O $HOME/bin/git-remote-hg \
-WARNING: https://raw.github.com/felipec/git-remote-hg/master/git-remote-hg
+WARNING: https://raw.github.com/felipec/git-remote-hg/main/git-remote-hg
WARNING: $ chmod +x $HOME/bin/git-remote-hg
EOT
diff --git a/contrib/stats/packinfo.pl b/contrib/stats/packinfo.pl
index be188c0f11..05d96ae1ae 100755
--- a/contrib/stats/packinfo.pl
+++ b/contrib/stats/packinfo.pl
@@ -50,8 +50,8 @@
# 0 blob 03156f21... 1767 1767 Documentation/git-lost-found.txt @ tags/v1.2.0~142
# 1 blob f52a9d7f... 10 1777 Documentation/git-lost-found.txt @ tags/v1.5.0-rc1~74
# 2 blob a8cc5739... 51 1828 Documentation/git-lost+found.txt @ tags/v0.99.9h^0
-# 3 blob 660e90b1... 15 1843 Documentation/git-lost+found.txt @ master~3222^2~2
-# 4 blob 0cb8e3bb... 33 1876 Documentation/git-lost+found.txt @ master~3222^2~3
+# 3 blob 660e90b1... 15 1843 Documentation/git-lost+found.txt @ main~3222^2~2
+# 4 blob 0cb8e3bb... 33 1876 Documentation/git-lost+found.txt @ main~3222^2~3
# 2 blob e48607f0... 311 2088 Documentation/git-lost-found.txt @ tags/v1.5.2-rc3~4
# size: count 6 total 2187 min 10 max 1767 mean 364.50 median 51 std_dev 635.85
# path size: count 6 total 11179 min 1767 max 2088 mean 1863.17 median 1843 std_dev 107.26
diff --git a/contrib/subtree/git-subtree.txt b/contrib/subtree/git-subtree.txt
index 352deda69d..521f1c72b1 100644
--- a/contrib/subtree/git-subtree.txt
+++ b/contrib/subtree/git-subtree.txt
@@ -86,15 +86,15 @@ If you use '--squash', the merge direction doesn't always have to be
forward; you can use this command to go back in time from v2.5 to v2.4,
for example. If your merge introduces a conflict, you can resolve it in
the usual ways.
-
+
pull::
Exactly like 'merge', but parallels 'git pull' in that
it fetches the given ref from the specified remote
repository.
-
+
push::
Does a 'split' (see below) using the <prefix> supplied
- and then does a 'git push' to push the result to the
+ and then does a 'git push' to push the result to the
repository and ref. This can be used to push your
subtree to different branches of the remote repository.
@@ -248,16 +248,16 @@ git-subtree repository as a subdirectory of your already existing
git-extensions repository in ~/git-extensions/:
$ git subtree add --prefix=git-subtree --squash \
- git://github.com/apenwarr/git-subtree.git master
+ git://github.com/apenwarr/git-subtree.git main
-'master' needs to be a valid remote ref and can be a different branch
+'main' needs to be a valid remote ref and can be a different branch
name
You can omit the --squash flag, but doing so will increase the number
of commits that are included in your local repository.
We now have a ~/git-extensions/git-subtree directory containing code
-from the master branch of git://github.com/apenwarr/git-subtree.git
+from the main branch of git://github.com/apenwarr/git-subtree.git
in our git-extensions repository.
EXAMPLE 2. Extract a subtree using commit, merge and pull
@@ -269,7 +269,7 @@ First, get your own copy of the git.git repository:
$ cd test-git
gitweb (commit 1130ef3) was merged into git as of commit
-0a8f4f0, after which it was no longer maintained separately.
+0a8f4f0, after which it was no longer maintained separately.
But imagine it had been maintained separately, and we wanted to
extract git's changes to gitweb since that time, to share with
the upstream. You could do this:
@@ -278,8 +278,8 @@ the upstream. You could do this:
0a8f4f0^.. --onto=1130ef3 --rejoin \
--branch gitweb-latest
$ gitk gitweb-latest
- $ git push [email protected]:whatever/gitweb.git gitweb-latest:master
-
+ $ git push [email protected]:whatever/gitweb.git gitweb-latest:main
+
(We use '0a8f4f0^..' because that means "all the changes from
0a8f4f0 to the current version, including 0a8f4f0 itself.")
@@ -295,7 +295,7 @@ And you can merge changes back in from the upstream project just
as easily:
$ git subtree pull --prefix=gitweb \
- [email protected]:whatever/gitweb.git master
+ [email protected]:whatever/gitweb.git main
Or, using '--squash', you can actually rewind to an earlier
version of gitweb:
@@ -313,7 +313,7 @@ And fast forward again:
$ git subtree merge --prefix=gitweb --squash gitweb-latest
And notice that your change is still intact:
-
+
$ ls -l gitweb/myfile
And you can split it out and look at your changes versus
@@ -338,7 +338,7 @@ Back in your original directory:
Then push the new branch onto the new empty repository:
- $ git push <new-repo> split:master
+ $ git push <new-repo> split:main
AUTHOR
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 57ff4b25c1..859c6d91a3 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -103,7 +103,7 @@ test_expect_success 'no merge from non-existent subtree' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
test_must_fail git subtree merge --prefix="sub dir" FETCH_HEAD
)
'
@@ -116,8 +116,8 @@ test_expect_success 'no pull from non-existent subtree' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
- test_must_fail git subtree pull --prefix="sub dir" ./"sub proj" master
+ git fetch ./"sub proj" main &&
+ test_must_fail git subtree pull --prefix="sub dir" ./"sub proj" main
)'
next_test
@@ -128,7 +128,7 @@ test_expect_success 'add subproj as subtree into sub dir/ with --prefix' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD &&
check_equal "$(last_commit_message)" "Add '\''sub dir/'\'' from commit '\''$(git rev-parse FETCH_HEAD)'\''"
)
@@ -142,7 +142,7 @@ test_expect_success 'add subproj as subtree into sub dir/ with --prefix and --me
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" --message="Added subproject" FETCH_HEAD &&
check_equal "$(last_commit_message)" "Added subproject"
)
@@ -156,7 +156,7 @@ test_expect_success 'add subproj as subtree into sub dir/ with --prefix as -P an
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add -P "sub dir" -m "Added subproject" FETCH_HEAD &&
check_equal "$(last_commit_message)" "Added subproject"
)
@@ -170,7 +170,7 @@ test_expect_success 'add subproj as subtree into sub dir/ with --squash and --pr
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" --message="Added subproject with squash" --squash FETCH_HEAD &&
check_equal "$(last_commit_message)" "Added subproject with squash"
)
@@ -188,13 +188,13 @@ test_expect_success 'merge new subproj history into sub dir/ with --prefix' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count/sub proj" sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
check_equal "$(last_commit_message)" "Merge commit '\''$(git rev-parse FETCH_HEAD)'\''"
)
@@ -208,13 +208,13 @@ test_expect_success 'merge new subproj history into sub dir/ with --prefix and -
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count/sub proj" sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" --message="Merged changes from subproject" FETCH_HEAD &&
check_equal "$(last_commit_message)" "Merged changes from subproject"
)
@@ -228,13 +228,13 @@ test_expect_success 'merge new subproj history into sub dir/ with --squash and -
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count/sub proj" sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" --message="Merged changes from subproject using squash" --squash FETCH_HEAD &&
check_equal "$(last_commit_message)" "Merged changes from subproject using squash"
)
@@ -248,7 +248,7 @@ test_expect_success 'merge the added subproj again, should do nothing' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD &&
# this shouldn not actually do anything, since FETCH_HEAD
# is already a parent
@@ -265,13 +265,13 @@ test_expect_success 'merge new subproj history into subdir/ with a slash appende
test_create_commit "$test_count/subproj" sub1 &&
(
cd "$test_count" &&
- git fetch ./subproj master &&
+ git fetch ./subproj main &&
git subtree add --prefix=subdir/ FETCH_HEAD
) &&
test_create_commit "$test_count/subproj" sub2 &&
(
cd "$test_count" &&
- git fetch ./subproj master &&
+ git fetch ./subproj main &&
git subtree merge --prefix=subdir/ FETCH_HEAD &&
check_equal "$(last_commit_message)" "Merge commit '\''$(git rev-parse FETCH_HEAD)'\''"
)
@@ -289,7 +289,7 @@ test_expect_success 'split requires option --prefix' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD &&
echo "You must provide the --prefix option." > expected &&
test_must_fail git subtree split > actual 2>&1 &&
@@ -309,7 +309,7 @@ test_expect_success 'split requires path given by option --prefix must exist' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD &&
echo "'\''non-existent-directory'\'' does not exist; use '\''git subtree add'\''" > expected &&
test_must_fail git subtree split --prefix=non-existent-directory > actual 2>&1 &&
@@ -329,7 +329,7 @@ test_expect_success 'split sub dir/ with --rejoin' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -338,7 +338,7 @@ test_expect_success 'split sub dir/ with --rejoin' '
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
split_hash=$(git subtree split --prefix="sub dir" --annotate="*") &&
git subtree split --prefix="sub dir" --annotate="*" --rejoin &&
@@ -370,7 +370,7 @@ test_expect_success 'split sub dir/ with --rejoin and --message' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -379,7 +379,7 @@ test_expect_success 'split sub dir/ with --rejoin and --message' '
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
git subtree split --prefix="sub dir" --message="Split & rejoin" --annotate="*" --rejoin &&
check_equal "$(last_commit_message)" "Split & rejoin"
@@ -394,7 +394,7 @@ test_expect_success 'split "sub dir"/ with --branch' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -403,7 +403,7 @@ test_expect_success 'split "sub dir"/ with --branch' '
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
split_hash=$(git subtree split --prefix="sub dir" --annotate="*") &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br &&
@@ -419,7 +419,7 @@ test_expect_success 'check hash of split' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -428,7 +428,7 @@ test_expect_success 'check hash of split' '
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
split_hash=$(git subtree split --prefix="sub dir" --annotate="*") &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br &&
@@ -451,7 +451,7 @@ test_expect_success 'split "sub dir"/ with --branch for an existing branch' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git branch subproj-br FETCH_HEAD &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
@@ -461,7 +461,7 @@ test_expect_success 'split "sub dir"/ with --branch for an existing branch' '
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
split_hash=$(git subtree split --prefix="sub dir" --annotate="*") &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br &&
@@ -478,7 +478,7 @@ test_expect_success 'split "sub dir"/ with --branch for an incompatible branch'
(
cd "$subtree_test_count" &&
git branch init HEAD &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -487,7 +487,7 @@ test_expect_success 'split "sub dir"/ with --branch for an incompatible branch'
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
test_must_fail git subtree split --prefix="sub dir" --branch init
)
@@ -505,7 +505,7 @@ test_expect_success 'make sure exactly the right set of files ends up in the sub
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -514,7 +514,7 @@ test_expect_success 'make sure exactly the right set of files ends up in the sub
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br --rejoin
) &&
@@ -555,7 +555,7 @@ test_expect_success 'make sure the subproj *only* contains commits that affect t
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -564,7 +564,7 @@ test_expect_success 'make sure the subproj *only* contains commits that affect t
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br --rejoin
) &&
@@ -606,7 +606,7 @@ test_expect_success 'make sure exactly the right set of files ends up in the mai
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -615,7 +615,7 @@ test_expect_success 'make sure exactly the right set of files ends up in the mai
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br --rejoin
) &&
@@ -643,7 +643,7 @@ test_expect_success 'make sure exactly the right set of files ends up in the mai
) &&
(
cd "$subtree_test_count" &&
- git subtree pull --prefix="sub dir" ./"sub proj" master &&
+ git subtree pull --prefix="sub dir" ./"sub proj" main &&
test_write_lines main1 main2 >chkm &&
test_write_lines main-sub1 main-sub2 main-sub3 main-sub4 >chkms &&
@@ -666,7 +666,7 @@ test_expect_success 'make sure each filename changed exactly once in the entire
(
cd "$subtree_test_count" &&
git config log.date relative &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -675,7 +675,7 @@ test_expect_success 'make sure each filename changed exactly once in the entire
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br --rejoin
) &&
@@ -703,7 +703,7 @@ test_expect_success 'make sure each filename changed exactly once in the entire
) &&
(
cd "$subtree_test_count" &&
- git subtree pull --prefix="sub dir" ./"sub proj" master &&
+ git subtree pull --prefix="sub dir" ./"sub proj" main &&
test_write_lines main1 main2 >chkm &&
test_write_lines sub1 sub2 sub3 sub4 >chks &&
@@ -731,7 +731,7 @@ test_expect_success 'make sure the --rejoin commits never make it into subproj'
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -740,7 +740,7 @@ test_expect_success 'make sure the --rejoin commits never make it into subproj'
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br --rejoin
) &&
@@ -768,7 +768,7 @@ test_expect_success 'make sure the --rejoin commits never make it into subproj'
) &&
(
cd "$subtree_test_count" &&
- git subtree pull --prefix="sub dir" ./"sub proj" master &&
+ git subtree pull --prefix="sub dir" ./"sub proj" main &&
check_equal "$(git log --pretty=format:"%s" HEAD^2 | grep -i split)" ""
)
'
@@ -781,7 +781,7 @@ test_expect_success 'make sure no "git subtree" tagged commits make it into subp
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -790,7 +790,7 @@ test_expect_success 'make sure no "git subtree" tagged commits make it into subp
test_create_commit "$subtree_test_count" "sub dir"/main-sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD &&
git subtree split --prefix="sub dir" --annotate="*" --branch subproj-br --rejoin
) &&
@@ -818,7 +818,7 @@ test_expect_success 'make sure no "git subtree" tagged commits make it into subp
) &&
(
cd "$subtree_test_count" &&
- git subtree pull --prefix="sub dir" ./"sub proj" master &&
+ git subtree pull --prefix="sub dir" ./"sub proj" main &&
# They are meaningless to subproj since one side of the merge refers to the mainline
check_equal "$(git log --pretty=format:"%s%n%b" HEAD^2 | grep "git-subtree.*:")" ""
@@ -837,13 +837,13 @@ test_expect_success 'make sure "git subtree split" find the correct parent' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count/sub proj" sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git branch subproj-ref FETCH_HEAD &&
git subtree merge --prefix="sub dir" FETCH_HEAD
) &&
@@ -853,7 +853,7 @@ test_expect_success 'make sure "git subtree split" find the correct parent' '
git subtree split --prefix="sub dir" --branch subproj-br &&
# at this point, the new commit parent should be subproj-ref, if it is
- # not, something went wrong (the "newparent" of "master~" commit should
+ # not, something went wrong (the "newparent" of "main~" commit should
# have been sub2, but it was not, because its cache was not set to
# itself)
check_equal "$(git log --pretty=format:%P -1 subproj-br)" "$(git rev-parse subproj-ref)"
@@ -868,13 +868,13 @@ test_expect_success 'split a new subtree without --onto option' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count/sub proj" sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -903,14 +903,14 @@ test_expect_success 'verify one file change per commit' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git branch sub1 FETCH_HEAD &&
git subtree add --prefix="sub dir" sub1
) &&
test_create_commit "$subtree_test_count/sub proj" sub2 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -947,7 +947,7 @@ test_expect_success 'push split to subproj' '
test_create_commit "$subtree_test_count/sub proj" sub1 &&
(
cd "$subtree_test_count" &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree add --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub1 &&
@@ -958,7 +958,7 @@ test_expect_success 'push split to subproj' '
cd $subtree_test_count/"sub proj" &&
git branch sub-branch-1 &&
cd .. &&
- git fetch ./"sub proj" master &&
+ git fetch ./"sub proj" main &&
git subtree merge --prefix="sub dir" FETCH_HEAD
) &&
test_create_commit "$subtree_test_count" "sub dir"/main-sub3 &&
@@ -1010,7 +1010,7 @@ test_expect_success 'subtree descendant check' '
(
cd "$subtree_test_count" &&
git cherry-pick $cherry &&
- git checkout master &&
+ git checkout main &&
git merge -m "merge should be kept on subtree" branch &&
git branch no_subtree_work_branch
) &&
@@ -1022,10 +1022,10 @@ test_expect_success 'subtree descendant check' '
test_create_commit "$subtree_test_count" not_a_subtree_change &&
(
cd "$subtree_test_count" &&
- git checkout master &&
+ git checkout main &&
git merge -m "merge should be skipped on subtree" no_subtree_work_branch &&
- git subtree split --prefix folder_subtree/ --branch subtree_tip master &&
+ git subtree split --prefix folder_subtree/ --branch subtree_tip main &&
git subtree split --prefix folder_subtree/ --branch subtree_branch branch &&
check_equal $(git rev-list --count subtree_tip..subtree_branch) 0
)
diff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c
index f363505abb..07ecc25ba0 100644
--- a/contrib/svn-fe/svn-fe.c
+++ b/contrib/svn-fe/svn-fe.c
@@ -10,7 +10,7 @@ int main(int argc, char **argv)
{
if (svndump_init(NULL))
return 1;
- svndump_read((argc > 1) ? argv[1] : NULL, "refs/heads/master",
+ svndump_read((argc > 1) ? argv[1] : NULL, "refs/heads/main",
"refs/notes/svn/revs");
svndump_deinit();
svndump_reset();
diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c
index 72d32bd73b..29a237c995 100644
--- a/fmt-merge-msg.c
+++ b/fmt-merge-msg.c
@@ -451,7 +451,7 @@ static void fmt_merge_msg_title(struct strbuf *out,
strbuf_addf(out, " of %s", srcs.items[i].string);
}
- if (!strcmp("master", current_branch))
+ if (!strcmp("main", current_branch))
strbuf_addch(out, '\n');
else
strbuf_addf(out, " into %s\n", current_branch);
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 1057f389d3..df2a2fd014 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -186,7 +186,7 @@ sub read_repo_config {
my $remote;
if (defined $opt_r) {
$remote = 'refs/remotes/' . $opt_r;
- $opt_o ||= "master";
+ $opt_o ||= "main";
} else {
$opt_o ||= "origin";
$remote = 'refs/heads';
@@ -695,8 +695,8 @@ sub munge_user_filename {
$last_branch = basename($last_branch);
close(F);
unless ($last_branch) {
- warn "Cannot read the last branch name: $! -- assuming 'master'\n";
- $last_branch = "master";
+ warn "Cannot read the last branch name: $! -- assuming 'main'\n";
+ $last_branch = "main";
}
$orig_branch = $last_branch;
$tip_at_start = `git rev-parse --verify HEAD`;
@@ -1169,10 +1169,10 @@ sub commit {
die "Could not merge $opt_o into the current branch.\n" if $?;
}
} else {
- $orig_branch = "master";
+ $orig_branch = "main";
print "DONE; creating $orig_branch branch\n" if $opt_v;
- system("git", "update-ref", "refs/heads/master", "$remote/$opt_o")
- unless defined get_headref('refs/heads/master');
+ system("git", "update-ref", "refs/heads/main", "$remote/$opt_o")
+ unless defined get_headref('refs/heads/main');
system("git", "symbolic-ref", "$remote/HEAD", "$remote/$opt_o")
if ($opt_r && $opt_o ne 'HEAD');
system('git', 'update-ref', 'HEAD', "$orig_branch");
diff --git a/git-gui/README.md b/git-gui/README.md
index 5ce2122fbc..ec22f80fdf 100644
--- a/git-gui/README.md
+++ b/git-gui/README.md
@@ -60,10 +60,10 @@ Git: `git-send-email` and `git-format-patch`.
You can use `git-format-patch` to generate patches in mbox format from your
commits that can then be sent via email. Let's say you are working on a branch
-called 'foo' that was created on top of 'master'. You can run:
+called 'foo' that was created on top of 'main'. You can run:
```
-git format-patch -o output_dir master..foo
+git format-patch -o output_dir main..foo
```
to convert all the extra commits in 'foo' into a set of patches saved in the
@@ -124,18 +124,18 @@ git remote add gitgitgadget https://github.com/gitgitgadget/git
Then fetch the git-gui branch:
```
-git fetch gitgitgadget git-gui/master
+git fetch gitgitgadget git-gui/main
```
-Then create a new branch based on git-gui/master:
+Then create a new branch based on git-gui/main:
```
-git checkout -b <your-branch-name> git-gui/master
+git checkout -b <your-branch-name> git-gui/main
```
Make whatever commits you need to, push them to your fork, and then head over
to https://github.com/gitgitgadget/git/pulls and open a Pull Request targeting
-git-gui/master.
+git-gui/main.
GitGitGadget will welcome you with a (hopefully) helpful message.
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 49bd86e635..f122ecf789 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -4140,7 +4140,7 @@ if {[winfo exists $ui_comm]} {
set spell_dict [get_config gui.spellingdictionary]
lappend spell_cmd aspell
if {$spell_dict ne {}} {
- lappend spell_cmd --master=$spell_dict
+ lappend spell_cmd --main=$spell_dict
}
lappend spell_cmd --mode=none
lappend spell_cmd --encoding=utf-8
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl
index e54f3e66d8..963bcdc23c 100644
--- a/git-gui/lib/choose_repository.tcl
+++ b/git-gui/lib/choose_repository.tcl
@@ -739,7 +739,7 @@ method _do_clone2 {} {
info_popup [strcat \
[mc "Nothing to clone from %s." $origin_url] \
"\n" \
- [mc "The 'master' branch has not been initialized."] \
+ [mc "The 'main' branch has not been initialized."] \
]
destroy $w_body
set done 1
@@ -959,7 +959,7 @@ method _do_clone_checkout {HEAD} {
info_popup [strcat \
[mc "No default branch obtained."] \
"\n" \
- [mc "The 'master' branch has not been initialized."] \
+ [mc "The 'main' branch has not been initialized."] \
]
set done 1
return
@@ -971,7 +971,7 @@ method _do_clone_checkout {HEAD} {
[mc "Cannot resolve %s as a commit." $HEAD^0] \
"\n $err" \
"\n" \
- [mc "The 'master' branch has not been initialized."] \
+ [mc "The 'main' branch has not been initialized."] \
]
set done 1
return
diff --git a/git-gui/lib/spellcheck.tcl b/git-gui/lib/spellcheck.tcl
index 538d61c792..24cba9db71 100644
--- a/git-gui/lib/spellcheck.tcl
+++ b/git-gui/lib/spellcheck.tcl
@@ -90,7 +90,7 @@ method _connect {pipe_fd} {
# fetch the language
if {$major > 0 || ($major == 0 && $minor >= 60)} {
- puts $pipe_fd {$$cr master}
+ puts $pipe_fd {$$cr main}
flush $pipe_fd
gets $pipe_fd s_lang
regexp {[/\\]([^/\\]+)\.[^\.]+$} $s_lang _ s_lang
@@ -126,7 +126,7 @@ method lang {{n {}}} {
if {$n ne {} && $s_lang ne $n && !$s_failed} {
set spell_cmd [list |]
lappend spell_cmd aspell
- lappend spell_cmd --master=$n
+ lappend spell_cmd --main=$n
lappend spell_cmd --mode=none
lappend spell_cmd --encoding=UTF-8
lappend spell_cmd pipe
diff --git a/git-gui/po/README b/git-gui/po/README
index 2514bc22ab..607bed09d9 100644
--- a/git-gui/po/README
+++ b/git-gui/po/README
@@ -155,7 +155,7 @@ your patch series to the maintainer and the Git mailing list:
$ git send-email --to '[email protected]' \
--cc 'Pat Thoyts <[email protected]>' \
--subject 'git-gui: Afrikaans translation' \
- master..
+ main..
3. Updating your translation.
@@ -167,7 +167,7 @@ itself was updated and there are new messages that need translation.
In any case, make sure you are up to date before starting your work:
- $ git checkout master
+ $ git checkout main
$ git pull
In the former case, you will edit po/af.po (again, replace "af" with
@@ -229,7 +229,7 @@ version X:
? translated
/
- ---X---Y---Z (master)
+ ---X---Y---Z (main)
The coordinator could recover from such a mistake by first applying the
patch to X, replace the translated file in Z, and then running msgmerge
@@ -238,7 +238,7 @@ would look like this:
$ git checkout X
$ git am -s xx.patch
- $ git checkout master
+ $ git checkout main
$ git checkout HEAD@{1} po/xx.po
$ msgmerge -U po/xx.po po/git-gui.pot
$ git commit -c HEAD@{1} po/xx.po
diff --git a/git-gui/po/bg.po b/git-gui/po/bg.po
index 5af78f15a8..57f8b2bbb3 100644
--- a/git-gui/po/bg.po
+++ b/git-gui/po/bg.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: git-gui master\n"
+"Project-Id-Version: git-gui main\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-13 15:16+0300\n"
"PO-Revision-Date: 2016-10-13 15:16+0300\n"
@@ -1248,8 +1248,8 @@ msgstr "Няма какво да се клонира от „%s“."
#: lib/choose_repository.tcl:726 lib/choose_repository.tcl:940
#: lib/choose_repository.tcl:952
-msgid "The 'master' branch has not been initialized."
-msgstr "Основният клон — „master“ не е инициализиран."
+msgid "The 'main' branch has not been initialized."
+msgstr "Основният клон — „main“ не е инициализиран."
#: lib/choose_repository.tcl:739
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/de.po b/git-gui/po/de.po
index a8d5f61ca3..8ee6fbb79f 100644
--- a/git-gui/po/de.po
+++ b/git-gui/po/de.po
@@ -1916,8 +1916,8 @@ msgstr "Von »%s« konnte nichts geklont werden."
#: lib/choose_repository.tcl:742 lib/choose_repository.tcl:962
#: lib/choose_repository.tcl:974
-msgid "The 'master' branch has not been initialized."
-msgstr "Der »master«-Branch wurde noch nicht initialisiert."
+msgid "The 'main' branch has not been initialized."
+msgstr "Der »main«-Branch wurde noch nicht initialisiert."
#: lib/choose_repository.tcl:755
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/el.po b/git-gui/po/el.po
index 3634ba469d..f29cdbed66 100644
--- a/git-gui/po/el.po
+++ b/git-gui/po/el.po
@@ -1039,8 +1039,8 @@ msgstr "Τίποτα προς κλωνοποίηση από το %s."
#: lib/choose_repository.tcl:690 lib/choose_repository.tcl:904
#: lib/choose_repository.tcl:916
-msgid "The 'master' branch has not been initialized."
-msgstr "Ο κλάδος 'master' δεν έχει αρχικοποιηθεί."
+msgid "The 'main' branch has not been initialized."
+msgstr "Ο κλάδος 'main' δεν έχει αρχικοποιηθεί."
#: lib/choose_repository.tcl:703
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/fr.po b/git-gui/po/fr.po
index 0aff18691d..36261cf94b 100644
--- a/git-gui/po/fr.po
+++ b/git-gui/po/fr.po
@@ -1189,8 +1189,8 @@ msgstr "Il n'y a rien à cloner depuis %s."
#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
#: lib/choose_repository.tcl:929
-msgid "The 'master' branch has not been initialized."
-msgstr "La branche 'master' n'a pas été initialisée."
+msgid "The 'main' branch has not been initialized."
+msgstr "La branche 'main' n'a pas été initialisée."
#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/git-gui.pot b/git-gui/po/git-gui.pot
index b79ed4e133..331d8d68ad 100644
--- a/git-gui/po/git-gui.pot
+++ b/git-gui/po/git-gui.pot
@@ -1831,7 +1831,7 @@ msgstr ""
#: lib/choose_repository.tcl:742 lib/choose_repository.tcl:962
#: lib/choose_repository.tcl:974
-msgid "The 'master' branch has not been initialized."
+msgid "The 'main' branch has not been initialized."
msgstr ""
#: lib/choose_repository.tcl:755
diff --git a/git-gui/po/glossary/bg.po b/git-gui/po/glossary/bg.po
index 8b71fad9a5..40eb6a5ca2 100644
--- a/git-gui/po/glossary/bg.po
+++ b/git-gui/po/glossary/bg.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: git-gui-glossary master\n"
+"Project-Id-Version: git-gui-glossary main\n"
"POT-Creation-Date: 2014-01-13 21:39+0200\n"
"PO-Revision-Date: 2014-01-13 21:39+0200\n"
"Last-Translator: Alexander Shopov <[email protected]>\n"
@@ -238,8 +238,8 @@ msgstr "локален клон"
msgid "loose object"
msgstr "непакетиран обект"
-#. "a branch called by convention 'master' that exists in a newly created git repository"
-msgid "master branch"
+#. "a branch called by convention 'main' that exists in a newly created git repository"
+msgid "main branch"
msgstr "основен клон"
#. "a remote called by convention 'origin' that the current git repository has been cloned from"
diff --git a/git-gui/po/glossary/de.po b/git-gui/po/glossary/de.po
index 4c5f233ee5..4eaaf3b633 100644
--- a/git-gui/po/glossary/de.po
+++ b/git-gui/po/glossary/de.po
@@ -203,9 +203,9 @@ msgstr "Lokaler Branch"
msgid "loose object"
msgstr "loses Objekt"
-#. "a branch called by convention 'master' that exists in a newly created git repository"
-msgid "master branch"
-msgstr "Master-Branch"
+#. "a branch called by convention 'main' that exists in a newly created git repository"
+msgid "main branch"
+msgstr "main-Branch"
#. "A successful merge results in the creation of a new commit representing the result of the merge."
msgid "merge [noun]"
diff --git a/git-gui/po/glossary/git-gui-glossary.pot b/git-gui/po/glossary/git-gui-glossary.pot
index 4e66e0da3a..e293b230d0 100644
--- a/git-gui/po/glossary/git-gui-glossary.pot
+++ b/git-gui/po/glossary/git-gui-glossary.pot
@@ -178,8 +178,8 @@ msgstr ""
msgid "loose object"
msgstr ""
-#. "a branch called by convention 'master' that exists in a newly created git repository"
-msgid "master branch"
+#. "a branch called by convention 'main' that exists in a newly created git repository"
+msgid "main branch"
msgstr ""
#. "A successful merge results in the creation of a new commit representing the result of the merge."
diff --git a/git-gui/po/glossary/git-gui-glossary.txt b/git-gui/po/glossary/git-gui-glossary.txt
index 48b9f10e57..ceb82e0d76 100644
--- a/git-gui/po/glossary/git-gui-glossary.txt
+++ b/git-gui/po/glossary/git-gui-glossary.txt
@@ -39,7 +39,7 @@
"initial commit" "The very first commit in a repository"
"local branch" "a branch that resides in the local git repository"
"loose object" "a Git object that is not part of any pack"
-"master branch" "a branch called by convention 'master' that exists in a newly created git repository"
+"main branch" "a branch called by convention 'main' that exists in a newly created git repository"
"merge [noun]" "A successful merge results in the creation of a new commit representing the result of the merge."
"merge [verb]" "To bring the contents of another branch into the current branch."
"message" ""
diff --git a/git-gui/po/glossary/pt_pt.po b/git-gui/po/glossary/pt_pt.po
index adc3b542a6..2420ef1aef 100644
--- a/git-gui/po/glossary/pt_pt.po
+++ b/git-gui/po/glossary/pt_pt.po
@@ -244,8 +244,8 @@ msgstr "ramo local"
msgid "loose object"
msgstr "objeto solto"
-#. "a branch called by convention 'master' that exists in a newly created git repository"
-msgid "master branch"
+#. "a branch called by convention 'main' that exists in a newly created git repository"
+msgid "main branch"
msgstr "ramo mestre"
#. "a remote called by convention 'origin' that the current git repository has been cloned from"
diff --git a/git-gui/po/hu.po b/git-gui/po/hu.po
index d106dadac8..4efc9f46ad 100644
--- a/git-gui/po/hu.po
+++ b/git-gui/po/hu.po
@@ -1145,8 +1145,8 @@ msgstr "Semmi másolni való nincs innen: %s"
#: lib/choose_repository.tcl:697 lib/choose_repository.tcl:911
#: lib/choose_repository.tcl:923
-msgid "The 'master' branch has not been initialized."
-msgstr "A 'master' branch nincs inicializálva."
+msgid "The 'main' branch has not been initialized."
+msgstr "A 'main' branch nincs inicializálva."
#: lib/choose_repository.tcl:710
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/it.po b/git-gui/po/it.po
index 1bd8b8e04f..fb786a9302 100644
--- a/git-gui/po/it.po
+++ b/git-gui/po/it.po
@@ -1187,8 +1187,8 @@ msgstr "Niente da clonare da %s."
#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
#: lib/choose_repository.tcl:929
-msgid "The 'master' branch has not been initialized."
-msgstr "Il ramo 'master' non è stato inizializzato."
+msgid "The 'main' branch has not been initialized."
+msgstr "Il ramo 'main' non è stato inizializzato."
#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/ja.po b/git-gui/po/ja.po
index 2f61153ab9..4e836d3875 100644
--- a/git-gui/po/ja.po
+++ b/git-gui/po/ja.po
@@ -1356,8 +1356,8 @@ msgstr "%s から複製する内容はありません"
#: lib/choose_repository.tcl:726 lib/choose_repository.tcl:940
#: lib/choose_repository.tcl:952
-msgid "The 'master' branch has not been initialized."
-msgstr "'master' ブランチが初期化されていません"
+msgid "The 'main' branch has not been initialized."
+msgstr "'main' ブランチが初期化されていません"
#: lib/choose_repository.tcl:739
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/nb.po b/git-gui/po/nb.po
index d66aa50263..beb1b034c8 100644
--- a/git-gui/po/nb.po
+++ b/git-gui/po/nb.po
@@ -1113,8 +1113,8 @@ msgstr "Ingenting å klone fra %s."
#: lib/choose_repository.tcl:697 lib/choose_repository.tcl:911
#: lib/choose_repository.tcl:923
-msgid "The 'master' branch has not been initialized."
-msgstr "Grenen 'master' har ikke blitt initsialisert."
+msgid "The 'main' branch has not been initialized."
+msgstr "Grenen 'main' har ikke blitt initsialisert."
#: lib/choose_repository.tcl:710
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/pt_br.po b/git-gui/po/pt_br.po
index bad116c780..e122edd6d4 100644
--- a/git-gui/po/pt_br.po
+++ b/git-gui/po/pt_br.po
@@ -1178,8 +1178,8 @@ msgstr "Não há nada para clonar em %s."
#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
#: lib/choose_repository.tcl:929
-msgid "The 'master' branch has not been initialized."
-msgstr "O ramo \"master\" não foi inicializado."
+msgid "The 'main' branch has not been initialized."
+msgstr "O ramo \"main\" não foi inicializado."
#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/pt_pt.po b/git-gui/po/pt_pt.po
index 0ef3c7927d..3322456893 100644
--- a/git-gui/po/pt_pt.po
+++ b/git-gui/po/pt_pt.po
@@ -1832,8 +1832,8 @@ msgstr "Nada para clonar de %s."
#: lib/choose_repository.tcl:726 lib/choose_repository.tcl:940
#: lib/choose_repository.tcl:952
-msgid "The 'master' branch has not been initialized."
-msgstr "O ramo 'master' não foi inicializado."
+msgid "The 'main' branch has not been initialized."
+msgstr "O ramo 'main' não foi inicializado."
#: lib/choose_repository.tcl:739
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/ru.po b/git-gui/po/ru.po
index 9f5305c43e..a8deda2a93 100644
--- a/git-gui/po/ru.po
+++ b/git-gui/po/ru.po
@@ -1130,8 +1130,8 @@ msgstr "Нечего клонировать с %s."
#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
#: lib/choose_repository.tcl:929
-msgid "The 'master' branch has not been initialized."
-msgstr "Не инициализирована ветвь «master»."
+msgid "The 'main' branch has not been initialized."
+msgstr "Не инициализирована ветвь «main»."
#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/sv.po b/git-gui/po/sv.po
index 1b4ad8368e..ccc20fbf6f 100644
--- a/git-gui/po/sv.po
+++ b/git-gui/po/sv.po
@@ -1970,8 +1970,8 @@ msgstr "Ingenting att klona från %s."
#: lib/choose_repository.tcl:726 lib/choose_repository.tcl:940
#: lib/choose_repository.tcl:952
-msgid "The 'master' branch has not been initialized."
-msgstr "Grenen \"master\" har inte initierats."
+msgid "The 'main' branch has not been initialized."
+msgstr "Grenen \"main\" har inte initierats."
#: lib/choose_repository.tcl:739
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/vi.po b/git-gui/po/vi.po
index d956b59a9e..2ed98a6f03 100644
--- a/git-gui/po/vi.po
+++ b/git-gui/po/vi.po
@@ -1216,8 +1216,8 @@ msgstr "Không có gì để nhân bản từ %s"
#: lib/choose_repository.tcl:705 lib/choose_repository.tcl:919
#: lib/choose_repository.tcl:931
-msgid "The 'master' branch has not been initialized."
-msgstr "Nhánh 'master' chưa được khởi tạo."
+msgid "The 'main' branch has not been initialized."
+msgstr "Nhánh 'main' chưa được khởi tạo."
#: lib/choose_repository.tcl:718
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-gui/po/zh_cn.po b/git-gui/po/zh_cn.po
index 91c1be23c2..45ce2f2dd8 100644
--- a/git-gui/po/zh_cn.po
+++ b/git-gui/po/zh_cn.po
@@ -1032,8 +1032,8 @@ msgstr "没有东西可从 %s 克隆."
#: lib/choose_repository.tcl:690 lib/choose_repository.tcl:904
#: lib/choose_repository.tcl:916
-msgid "The 'master' branch has not been initialized."
-msgstr "'master'分支尚未初始化."
+msgid "The 'main' branch has not been initialized."
+msgstr "'main'分支尚未初始化."
#: lib/choose_repository.tcl:703
msgid "Hardlinks are unavailable. Falling back to copying."
diff --git a/git-p4.py b/git-p4.py
index ca79dc0900..07570941a1 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -978,7 +978,7 @@ def p4BranchesInGit(branchesAreInRemotes=True):
# only import to p4/
if not line.startswith('p4/'):
continue
- # special symbolic ref to p4/master
+ # special symbolic ref to p4/main
if line == "p4/HEAD":
continue
@@ -1076,7 +1076,7 @@ def createOrUpdateBranchesFromOrigin(localRefPrefix = "refs/remotes/p4/", silent
system("git update-ref %s %s" % (remoteHead, originHead))
def originP4BranchesExist():
- return gitBranchExists("origin") or gitBranchExists("origin/p4") or gitBranchExists("origin/p4/master")
+ return gitBranchExists("origin") or gitBranchExists("origin/p4") or gitBranchExists("origin/p4/main")
def p4ParseNumericChangeRange(parts):
@@ -1635,9 +1635,9 @@ def __init__(self):
help="submit only the specified commit(s), one commit or xxx..xxx"),
optparse.make_option("--disable-rebase", dest="disable_rebase", action="store_true",
help="Disable rebase after submit is completed. Can be useful if you "
- "work from a local git branch that is not master"),
+ "work from a local git branch that is not main"),
optparse.make_option("--disable-p4sync", dest="disable_p4sync", action="store_true",
- help="Skip Perforce sync of p4/master after submit or shelve"),
+ help="Skip Perforce sync of p4/main after submit or shelve"),
optparse.make_option("--no-verify", dest="no_verify", action="store_true",
help="Bypass p4-pre-submit and p4-changelist hooks"),
]
@@ -2360,11 +2360,11 @@ def exportGitTags(self, gitTags):
def run(self, args):
if len(args) == 0:
- self.master = currentGitBranch()
+ self.main = currentGitBranch()
elif len(args) == 1:
- self.master = args[0]
- if not branchExists(self.master):
- die("Branch %s does not exist" % self.master)
+ self.main = args[0]
+ if not branchExists(self.main):
+ die("Branch %s does not exist" % self.main)
else:
return False
@@ -2372,10 +2372,10 @@ def run(self, args):
if i <= 0:
sys.exit("invalid changelist %d" % i)
- if self.master:
+ if self.main:
allowSubmit = gitConfig("git-p4.allowSubmit")
- if len(allowSubmit) > 0 and not self.master in allowSubmit.split(","):
- die("%s is not in git-p4.allowSubmit" % self.master)
+ if len(allowSubmit) > 0 and not self.main in allowSubmit.split(","):
+ die("%s is not in git-p4.allowSubmit" % self.main)
[upstream, settings] = findUpstreamBranchPoint()
self.depotPath = settings['depot-paths'][0]
@@ -2446,8 +2446,8 @@ def run(self, args):
self.check()
commits = []
- if self.master:
- committish = self.master
+ if self.main:
+ committish = self.main
else:
committish = 'HEAD'
@@ -3510,7 +3510,7 @@ def getBranchMapping(self):
def getBranchMappingFromGitBranches(self):
branches = p4BranchesInGit(self.importIntoRemotes)
for branch in branches.keys():
- if branch == "master":
+ if branch == "main":
branch = "main"
else:
branch = branch[len(self.projectName):]
@@ -3529,7 +3529,7 @@ def readOptions(self, d):
def gitRefForBranch(self, branch):
if branch == "main":
- return self.refPrefix + "master"
+ return self.refPrefix + "main"
if len(branch) <= 0:
return branch
@@ -3783,7 +3783,7 @@ def importRevisions(self, args, branch_arg_given):
if not self.p4BranchesInGit:
raise P4CommandException("No remote p4 branches. Perhaps you never did \"git p4 clone\" in here.")
- # The default branch is master, unless --branch is used to
+ # The default branch is main, unless --branch is used to
# specify something else. Make sure it exists, or complain
# nicely about how to use --branch.
if not self.detectBranches:
@@ -3867,7 +3867,7 @@ def run(self, args):
branch_arg_given = bool(self.branch)
if len(self.branch) == 0:
- self.branch = self.refPrefix + "master"
+ self.branch = self.refPrefix + "main"
if gitBranchExists("refs/heads/p4") and self.importIntoRemotes:
system("git update-ref %s refs/heads/p4" % self.branch)
system("git branch -D p4")
@@ -4033,7 +4033,7 @@ def run(self, args):
print("p4-git branches: %s" % self.p4BranchesInGit)
print("initial parents: %s" % self.initialParents)
for b in self.p4BranchesInGit:
- if b != "master":
+ if b != "main":
## FIXME
b = b[len(self.projectName):]
@@ -4184,14 +4184,14 @@ def run(self, args):
if not P4Sync.run(self, depotPaths):
return False
- # create a master branch and check out a work tree
+ # create a main branch and check out a work tree
if gitBranchExists(self.branch):
- system([ "git", "branch", "master", self.branch ])
+ system([ "git", "branch", "main", self.branch ])
if not self.cloneBare:
system([ "git", "checkout", "-f" ])
else:
print('Not checking out any branch, use ' \
- '"git checkout -q -b master <branch>"')
+ '"git checkout -q -b main <branch>"')
# auto-set this variable if invoked with --use-client-spec
if self.useClientSpec_from_options:
diff --git a/gitk-git/gitk b/gitk-git/gitk
index abe4805ade..0de4d90f38 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -12335,7 +12335,7 @@ set wrapcomment "none"
set showneartags 1
set hideremotes 0
set maxrefs 20
-set visiblerefs {"master"}
+set visiblerefs {"main"}
set maxlinelen 200
set showlocalchanges 1
set limitdiffs 1
diff --git a/gitk-git/po/bg.po b/gitk-git/po/bg.po
index 87ab1fac24..29258b9266 100644
--- a/gitk-git/po/bg.po
+++ b/gitk-git/po/bg.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gitk master\n"
+"Project-Id-Version: gitk main\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-04 11:27+0100\n"
"PO-Revision-Date: 2019-03-04 11:39+0100\n"
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0959a782ec..07617a8412 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3552,7 +3552,7 @@ sub parse_commit_text {
$title =~ s/(http|rsync):\/\///;
}
if (length($title) > 50) {
- $title =~ s/(master|www|rsync)\.//;
+ $title =~ s/(main|www|rsync)\.//;
}
if (length($title) > 50) {
$title =~ s/kernel.org:?//;
diff --git a/perl/Git.pm b/perl/Git.pm
index 54c9ed0dde..9e991f8a91 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -91,7 +91,7 @@ =head1 DESCRIPTION
TODO: In the future, we might also do
- my $remoterepo = $repo->remote_repository (Name => 'cogito', Branch => 'master');
+ my $remoterepo = $repo->remote_repository (Name => 'cogito', Branch => 'main');
$remoterepo ||= Git->remote_repository ('http://git.or.cz/cogito.git/');
my @refs = $remoterepo->refs();
diff --git a/po/bg.po b/po/bg.po
index a189b16dc4..f52e1990b4 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8790,10 +8790,10 @@ msgstr "грешка при изпълнението на командата з
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"Няма общи указатели, не са указани никакви указатели — нищо няма да бъде\n"
-"направено. Пробвайте да укажете клон, напр. “master“.\n"
+"направено. Пробвайте да укажете клон, напр. “main“.\n"
#: transport-helper.c:1121
#, c-format
@@ -19603,7 +19603,7 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
"git remote add [-t КЛОН] [-m ОСНОВЕН_КЛОН] [-f] [--tags | --no-tags] [--"
@@ -19715,7 +19715,7 @@ msgid "branch(es) to track"
msgstr "клон/и за следене"
#: builtin/remote.c:172
-msgid "master branch"
+msgid "main branch"
msgstr "основен клон"
#: builtin/remote.c:174
@@ -19724,7 +19724,7 @@ msgstr ""
"настройване на отдалечено хранилище, от което да се издърпва или доставя"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr ""
"няма смисъл да се указва основен клон при използване на опцията „--mirror“"
@@ -19746,7 +19746,7 @@ msgstr "„%s“ е неправилно име за отдалечено хра
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr "Основният клон „%s“ не може да бъде настроен"
#: builtin/remote.c:354
diff --git a/po/ca.po b/po/ca.po
index 3a0246ed86..66be651f92 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -8589,10 +8589,10 @@ msgstr "error en executar l'exportació ràpida"
#, fuzzy, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"No hi ha referències en comú i no n'hi ha cap especificat. Potser hauríeu "
-"d'especificar una branca com ara «master»."
+"d'especificar una branca com ara «main»."
#: transport-helper.c:1121
#, fuzzy, c-format
@@ -19430,7 +19430,7 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
"git remote add [-t <branca>] [-m <mestra>] [-f] [--tags | --no-tags] [--"
@@ -19542,7 +19542,7 @@ msgid "branch(es) to track"
msgstr "branques a seguir"
#: builtin/remote.c:172
-msgid "master branch"
+msgid "main branch"
msgstr "branca mestra"
#: builtin/remote.c:174
@@ -19550,7 +19550,7 @@ msgid "set up remote as a mirror to push to or fetch from"
msgstr "estableix el remot com a mirall al qual pujar o del qual obtenir"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr "especificar una branca mestra no té sentit amb --mirror"
#: builtin/remote.c:188
@@ -19570,7 +19570,7 @@ msgstr "«%s» no és un nom de remot vàlid"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr "No s'ha pogut configurar la mestra «%s»"
#: builtin/remote.c:354
@@ -25298,7 +25298,7 @@ msgstr "(%s) S'està afegint %s: %s des de: «%s»\n"
#: git-send-email.perl:1875
#, perl-format
-msgid "(%s) failed to close pipe to '%s'"
+msgid "(%s) failed to close pipe to '%s'"
msgstr "(%s) s'ha produït un error en tancar el conducte «%s»"
#: git-send-email.perl:1905
diff --git a/po/de.po b/po/de.po
index 6356276d0a..8fdeaa2886 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8600,10 +8600,10 @@ msgstr "Fehler beim Ausführen von \"fast-export\"."
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"Keine gemeinsamen Referenzen und nichts spezifiziert; keine Ausführung.\n"
-"Vielleicht sollten Sie einen Branch wie 'master' angeben.\n"
+"Vielleicht sollten Sie einen Branch wie 'main' angeben.\n"
#: transport-helper.c:1121
#, c-format
@@ -19419,10 +19419,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <Branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <Branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <Name> <URL>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -19530,7 +19530,7 @@ msgid "branch(es) to track"
msgstr "Branch(es) zur Übernahme"
#: builtin/remote.c:172
-msgid "master branch"
+msgid "main branch"
msgstr "Hauptbranch"
#: builtin/remote.c:174
@@ -19540,7 +19540,7 @@ msgstr ""
"\"fetch\""
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr ""
"Die Option --mirror kann nicht mit der Angabe eines Hauptbranches verwendet "
"werden."
@@ -19563,7 +19563,7 @@ msgstr "'%s' ist kein gültiger Name für ein Remote-Repository"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr "Konnte symbolische Referenz für Hauptbranch von '%s' nicht einrichten"
#: builtin/remote.c:354
diff --git a/po/el.po b/po/el.po
index 703f46d0c7..144f186aed 100644
--- a/po/el.po
+++ b/po/el.po
@@ -6599,7 +6599,7 @@ msgstr ""
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
#: transport-helper.c:1083
@@ -16196,7 +16196,7 @@ msgstr ""
#: builtin/remote.c:17
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
@@ -16302,7 +16302,7 @@ msgid "branch(es) to track"
msgstr ""
#: builtin/remote.c:171
-msgid "master branch"
+msgid "main branch"
msgstr ""
#: builtin/remote.c:173
@@ -16310,7 +16310,7 @@ msgid "set up remote as a mirror to push to or fetch from"
msgstr ""
#: builtin/remote.c:185
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr ""
#: builtin/remote.c:187
@@ -16329,7 +16329,7 @@ msgstr ""
#: builtin/remote.c:238
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr ""
#: builtin/remote.c:344
diff --git a/po/es.po b/po/es.po
index 97bd3e27f5..69cabe8dc2 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8477,10 +8477,10 @@ msgstr "error al ejecutar fast-export"
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"No hay refs comunes y ninguno especificado; no se hace nada.\n"
-"Tal vez deberías especificar un branch como 'master'.\n"
+"Tal vez deberías especificar un branch como 'main'.\n"
#: transport-helper.c:1121
#, c-format
@@ -19067,10 +19067,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <rama>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <rama>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <nombre> <url>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -19178,8 +19178,8 @@ msgid "branch(es) to track"
msgstr "rama(s) para rastrear"
#: builtin/remote.c:172
-msgid "master branch"
-msgstr "rama master"
+msgid "main branch"
+msgstr "rama main"
#: builtin/remote.c:174
msgid "set up remote as a mirror to push to or fetch from"
@@ -19188,8 +19188,8 @@ msgstr ""
"fetch"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
-msgstr "especificar una rama master no tiene sentido con --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
+msgstr "especificar una rama main no tiene sentido con --mirror"
#: builtin/remote.c:188
msgid "specifying branches to track makes sense only with fetch mirrors"
@@ -19207,8 +19207,8 @@ msgstr "'%s' no es un nombre remoto válido"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
-msgstr "No se pudo configurar master '%s'"
+msgid "Could not setup main '%s'"
+msgstr "No se pudo configurar main '%s'"
#: builtin/remote.c:354
#, c-format
diff --git a/po/fr.po b/po/fr.po
index b1b4144d2e..8c7451fc37 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8648,10 +8648,10 @@ msgstr "erreur au lancement de fast-export"
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"Aucune référence en commun et aucune spécfiée ; rien à faire.\n"
-"Vous devriez peut-être spécifier une branche telle que 'master'.\n"
+"Vous devriez peut-être spécifier une branche telle que 'main'.\n"
#: transport-helper.c:1121
#, c-format
@@ -19346,10 +19346,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <branche>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branche>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <nom> <url>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -19459,7 +19459,7 @@ msgid "branch(es) to track"
msgstr "branche(s) à suivre"
#: builtin/remote.c:172
-msgid "master branch"
+msgid "main branch"
msgstr "branche maîtresse"
#: builtin/remote.c:174
@@ -19468,7 +19468,7 @@ msgstr ""
"paramétrer la distante comme miroir pour pousser ou pour rapatrier depuis"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr "spécifier une branche maîtresse n'a pas de sens avec --mirror"
#: builtin/remote.c:188
@@ -19489,7 +19489,7 @@ msgstr "'%s' n'est pas un nom valide de distante"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr "Impossible de paramétrer la maîtresse '%s'"
#: builtin/remote.c:354
diff --git a/po/git.pot b/po/git.pot
index 49e3db0fa0..9c0b4d1a1a 100644
--- a/po/git.pot
+++ b/po/git.pot
@@ -7879,7 +7879,7 @@ msgstr ""
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
#: transport-helper.c:1121
@@ -17767,7 +17767,7 @@ msgstr ""
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
@@ -17873,7 +17873,7 @@ msgid "branch(es) to track"
msgstr ""
#: builtin/remote.c:172
-msgid "master branch"
+msgid "main branch"
msgstr ""
#: builtin/remote.c:174
@@ -17881,7 +17881,7 @@ msgid "set up remote as a mirror to push to or fetch from"
msgstr ""
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr ""
#: builtin/remote.c:188
@@ -17900,7 +17900,7 @@ msgstr ""
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr ""
#: builtin/remote.c:354
diff --git a/po/it.po b/po/it.po
index 769d9e0ccc..e96e767c98 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8604,10 +8604,10 @@ msgstr "errore durante l'esecuzione di fast-export"
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"Nessun riferimento in comune e nessuno specificato; non eseguo nulla.\n"
-"Forse dovresti specificare un branch come 'master'.\n"
+"Forse dovresti specificare un branch come 'main'.\n"
#: transport-helper.c:1121
#, c-format
@@ -19374,10 +19374,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <nome> <URL>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -19485,8 +19485,8 @@ msgid "branch(es) to track"
msgstr "branch da tracciare"
#: builtin/remote.c:172
-msgid "master branch"
-msgstr "branch master"
+msgid "main branch"
+msgstr "branch main"
#: builtin/remote.c:174
msgid "set up remote as a mirror to push to or fetch from"
@@ -19494,8 +19494,8 @@ msgstr ""
"imposta il remoto come mirror su cui eseguire push o da cui recuperare dati"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
-msgstr "specificare un branch master con --mirror non ha senso"
+msgid "specifying a main branch makes no sense with --mirror"
+msgstr "specificare un branch main con --mirror non ha senso"
#: builtin/remote.c:188
msgid "specifying branches to track makes sense only with fetch mirrors"
@@ -19515,8 +19515,8 @@ msgstr "'%s' non è un nome di remoto valido"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
-msgstr "Impossibile configurare il master '%s'"
+msgid "Could not setup main '%s'"
+msgstr "Impossibile configurare il main '%s'"
#: builtin/remote.c:354
#, c-format
diff --git a/po/ko.po b/po/ko.po
index dcfe21c223..0214339b12 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -12708,10 +12708,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:15
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <브랜치>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <브랜치>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <이름> <url>"
#: builtin/remote.c:16 builtin/remote.c:36
@@ -12819,7 +12819,7 @@ msgid "branch(es) to track"
msgstr "추적할 브랜치"
#: builtin/remote.c:169
-msgid "master branch"
+msgid "main branch"
msgstr "마스터 브랜치"
#: builtin/remote.c:170
@@ -12831,7 +12831,7 @@ msgid "set up remote as a mirror to push to or fetch from"
msgstr "리모트를 푸시 또는 가져올 때 사용할 미러로 설정합니다"
#: builtin/remote.c:183
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr "--mirror 옵션과 같이 마스터 브랜치를 지정하면 앞뒤가 맞지 않습니다"
#: builtin/remote.c:185
@@ -12850,7 +12850,7 @@ msgstr "'%s'은(는) 올바른 리모트 이름이 아닙니다"
#: builtin/remote.c:236
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr "마스터 '%s'을(를) 설정할 수 없습니다"
#: builtin/remote.c:342
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 8a2d55a8b6..19fd3ff31f 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -11753,7 +11753,7 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:13
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
"git remote add [-t <ramo>] [-m <mestre>] [-f] [--tags | --no-tags] [--"
@@ -11864,7 +11864,7 @@ msgid "branch(es) to track"
msgstr "ramos a seguir"
#: builtin/remote.c:167
-msgid "master branch"
+msgid "main branch"
msgstr "ramo mestre"
#: builtin/remote.c:168
@@ -11876,7 +11876,7 @@ msgid "set up remote as a mirror to push to or fetch from"
msgstr "configurar o remoto como um espelho para publicar ou obter"
#: builtin/remote.c:181
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr "especificar um ramo mestre não faz sentido com --mirror"
#: builtin/remote.c:183
@@ -11895,7 +11895,7 @@ msgstr "'%s' não é um nome de remoto válido"
#: builtin/remote.c:234
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr "Não foi possível configuração o ramo mestre '%s'"
#: builtin/remote.c:336
diff --git a/po/ru.po b/po/ru.po
index a77b462e62..c616b5a9e1 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
# Translators:
# Dimitriy Ryazantcev <[email protected]>, 2014-2019
# insolor, 2014
@@ -6948,7 +6948,7 @@ msgstr ""
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
#: transport-helper.c:1085
@@ -16343,7 +16343,7 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:17
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] "
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] "
"[--mirror=<fetch|push>] <name> <url>"
msgstr "git remote add [-t <ветка>] [-m <мастер-ветка>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <имя> <адрес>"
@@ -16449,7 +16449,7 @@ msgid "branch(es) to track"
msgstr "отслеживаемые ветки"
#: builtin/remote.c:171
-msgid "master branch"
+msgid "main branch"
msgstr "мастер ветка"
#: builtin/remote.c:173
@@ -16457,7 +16457,7 @@ msgid "set up remote as a mirror to push to or fetch from"
msgstr "настроить внешний репозиторий как зеркало для отправки или извлечения изменений"
#: builtin/remote.c:185
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr "указание мастер ветки не имеет смысла с параметром --mirror"
#: builtin/remote.c:187
@@ -16476,7 +16476,7 @@ msgstr "«%s» не является допустимым именем внеш
#: builtin/remote.c:238
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr "Не удалось настроить мастер ветку «%s»"
#: builtin/remote.c:344
diff --git a/po/sv.po b/po/sv.po
index 73696a13f3..3c62c895f5 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8437,10 +8437,10 @@ msgstr "fel vid körning av fast-export"
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"Inga gemensamma referenser och inga angavs; gör inget.\n"
-"Du kanske borde ange en gren såsom \"master\".\n"
+"Du kanske borde ange en gren såsom \"main\".\n"
#: transport-helper.c:1121
#, c-format
@@ -18942,10 +18942,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <gren>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <gren>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <namn> <url>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -19053,7 +19053,7 @@ msgid "branch(es) to track"
msgstr "gren(ar) att spåra"
#: builtin/remote.c:172
-msgid "master branch"
+msgid "main branch"
msgstr "huvudgren"
#: builtin/remote.c:174
@@ -19061,8 +19061,8 @@ msgid "set up remote as a mirror to push to or fetch from"
msgstr "ställ in arkiv som spegel att sända eller ta emot från"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
-msgstr "att ange en master-gren ger ingen mening med --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
+msgstr "att ange en main-gren ger ingen mening med --mirror"
#: builtin/remote.c:188
msgid "specifying branches to track makes sense only with fetch mirrors"
@@ -19080,8 +19080,8 @@ msgstr "\"%s\" är inte ett giltigt namn på fjärrarkiv"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
-msgstr "Kunde inte skapa master \"%s\""
+msgid "Could not setup main '%s'"
+msgstr "Kunde inte skapa main \"%s\""
#: builtin/remote.c:354
#, c-format
diff --git a/po/tr.po b/po/tr.po
index a74b885338..afc150fbbb 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -8502,10 +8502,10 @@ msgstr "fast-export çalıştırılırken hata"
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"Ortak başvuru yok ve hiç belirtilmemiş; bir şey yapılmayacak.\n"
-"Belki de bir dal belirtmelisiniz, örneğin: 'master'.\n"
+"Belki de bir dal belirtmelisiniz, örneğin: 'main'.\n"
#: transport-helper.c:1121
#, c-format
@@ -19040,10 +19040,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <dal>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <dal>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<getir|it>] <ad> <url>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -19151,7 +19151,7 @@ msgid "branch(es) to track"
msgstr "izlenecek dal(lar)"
#: builtin/remote.c:172
-msgid "master branch"
+msgid "main branch"
msgstr "ana dal"
#: builtin/remote.c:174
@@ -19161,7 +19161,7 @@ msgstr ""
"ayarla"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
msgstr "--mirror ile bir ana dal belirtmek anlam ifade etmiyor"
#: builtin/remote.c:188
@@ -19181,7 +19181,7 @@ msgstr "'%s' geçerli bir uzak konum adı değil"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
+msgid "Could not setup main '%s'"
msgstr "'%s' ana dalı ayarlanamadı"
#: builtin/remote.c:354
diff --git a/po/vi.po b/po/vi.po
index 9fcf8aa543..0ea5918b8d 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -8458,11 +8458,11 @@ msgstr "gặp lỗi trong khi chạy fast-export"
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"Không có các tham chiếu trong phần chung và chưa chỉ định; nên không làm gì "
"cả.\n"
-"Tuy nhiên bạn nên chỉ định một nhánh như “master” chẳng hạn.\n"
+"Tuy nhiên bạn nên chỉ định một nhánh như “main” chẳng hạn.\n"
#: transport-helper.c:1121
#, c-format
@@ -19083,10 +19083,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <nhánh>] [-m <master>] [-f] [--tags|--no-tags] [--"
+"git remote add [-t <nhánh>] [-m <main>] [-f] [--tags|--no-tags] [--"
"mirror=<fetch|push>] <tên> <url>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -19194,16 +19194,16 @@ msgid "branch(es) to track"
msgstr "các nhánh để theo dõi"
#: builtin/remote.c:172
-msgid "master branch"
-msgstr "nhánh master"
+msgid "main branch"
+msgstr "nhánh main"
#: builtin/remote.c:174
msgid "set up remote as a mirror to push to or fetch from"
msgstr "đặt máy chủ (remote) như là một máy bản sao để push hay fetch từ đó"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
-msgstr "đang chỉ định một nhánh master không hợp lý với tùy chọn --mirror"
+msgid "specifying a main branch makes no sense with --mirror"
+msgstr "đang chỉ định một nhánh main không hợp lý với tùy chọn --mirror"
#: builtin/remote.c:188
msgid "specifying branches to track makes sense only with fetch mirrors"
@@ -19221,8 +19221,8 @@ msgstr "“%s” không phải tên máy chủ hợp lệ"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
-msgstr "Không thể cài đặt nhánh master “%s”"
+msgid "Could not setup main '%s'"
+msgstr "Không thể cài đặt nhánh main “%s”"
#: builtin/remote.c:354
#, c-format
diff --git a/po/zh_CN.po b/po/zh_CN.po
index ee0e6bee0d..c26bd00220 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -71,7 +71,7 @@
# index entry | 索引条目
# loose object | 松散对象
# loose refs | 松散引用
-# master | master(默认分支名)
+# main | main(默认分支名)
# merge | 合并
# object | 对象
# object database | 对象库
@@ -5469,7 +5469,7 @@ msgstr "坏的索引文件 sha1 签名"
msgid "index uses %.4s extension, which we do not understand"
msgstr "索引使用不被支持的 %.4s 扩展"
-#
+#
#: read-cache.c:1761
#, c-format
msgid "ignoring %.4s extension"
@@ -8395,10 +8395,10 @@ msgstr "执行 fast-export 时出错"
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"没有共同的引用并且也没有指定,什么也不会做。\n"
-"可能您应该指定一个分支如 'master'。\n"
+"可能您应该指定一个分支如 'main'。\n"
#: transport-helper.c:1121
#, c-format
@@ -18766,10 +18766,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <分支>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <分支>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <名称> <地址>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -18876,7 +18876,7 @@ msgid "branch(es) to track"
msgstr "跟踪的分支"
#: builtin/remote.c:172
-msgid "master branch"
+msgid "main branch"
msgstr "主线分支"
#: builtin/remote.c:174
@@ -18884,8 +18884,8 @@ msgid "set up remote as a mirror to push to or fetch from"
msgstr "把远程设置为用以推送或抓取的镜像"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
-msgstr "指定一个 master 分支并使用 --mirror 选项没有意义"
+msgid "specifying a main branch makes no sense with --mirror"
+msgstr "指定一个 main 分支并使用 --mirror 选项没有意义"
#: builtin/remote.c:188
msgid "specifying branches to track makes sense only with fetch mirrors"
@@ -18903,8 +18903,8 @@ msgstr "'%s' 不是一个有效的远程名称"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
-msgstr "无法设置 master '%s'"
+msgid "Could not setup main '%s'"
+msgstr "无法设置 main '%s'"
#: builtin/remote.c:354
#, c-format
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 38670cb654..25c20f0b52 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -8512,10 +8512,10 @@ msgstr "執行 fast-export 時發生錯誤"
#, c-format
msgid ""
"No refs in common and none specified; doing nothing.\n"
-"Perhaps you should specify a branch such as 'master'.\n"
+"Perhaps you should specify a branch such as 'main'.\n"
msgstr ""
"沒有共同的引用並且也沒有指定,什麼也不會做。\n"
-"可能您應該指定一個分支如 'master'。\n"
+"可能您應該指定一個分支如 'main'。\n"
#: transport-helper.c:1121
#, c-format
@@ -18862,10 +18862,10 @@ msgstr "git remote [-v | --verbose]"
#: builtin/remote.c:18
msgid ""
-"git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <branch>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <name> <url>"
msgstr ""
-"git remote add [-t <分支>] [-m <master>] [-f] [--tags | --no-tags] [--"
+"git remote add [-t <分支>] [-m <main>] [-f] [--tags | --no-tags] [--"
"mirror=<fetch|push>] <名稱> <位址>"
#: builtin/remote.c:19 builtin/remote.c:39
@@ -18972,16 +18972,16 @@ msgid "branch(es) to track"
msgstr "追蹤的分支"
#: builtin/remote.c:172
-msgid "master branch"
-msgstr "master 分支"
+msgid "main branch"
+msgstr "main 分支"
#: builtin/remote.c:174
msgid "set up remote as a mirror to push to or fetch from"
msgstr "把遠端設定為用以推送或抓取的鏡像"
#: builtin/remote.c:186
-msgid "specifying a master branch makes no sense with --mirror"
-msgstr "指定一個 master 分支並使用 --mirror 選項沒有意義"
+msgid "specifying a main branch makes no sense with --mirror"
+msgstr "指定一個 main 分支並使用 --mirror 選項沒有意義"
#: builtin/remote.c:188
msgid "specifying branches to track makes sense only with fetch mirrors"
@@ -18999,8 +18999,8 @@ msgstr "'%s' 不是一個有效的遠端名稱"
#: builtin/remote.c:239
#, c-format
-msgid "Could not setup master '%s'"
-msgstr "無法設定 master '%s'"
+msgid "Could not setup main '%s'"
+msgstr "無法設定 main '%s'"
#: builtin/remote.c:354
#, c-format
diff --git a/ref-filter.c b/ref-filter.c
index bf7b70299b..f1e18c3c3e 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -1799,7 +1799,7 @@ static int get_ref_atom_value(struct ref_array_item *ref, int atom,
/*
* Return 1 if the refname matches one of the patterns, otherwise 0.
- * A pattern can be a literal prefix (e.g. a refname "refs/heads/master"
+ * A pattern can be a literal prefix (e.g. a refname "refs/heads/main"
* matches a pattern "refs/heads/mas") or a wildcard (e.g. the same ref
* matches "refs/heads/mas*", too).
*/
@@ -1829,7 +1829,7 @@ static int match_pattern(const struct ref_filter *filter, const char *refname)
/*
* Return 1 if the refname matches one of the patterns, otherwise 0.
- * A pattern can be path prefix (e.g. a refname "refs/heads/master"
+ * A pattern can be path prefix (e.g. a refname "refs/heads/main"
* matches a pattern "refs/heads/" but not "refs/heads/m") or a
* wildcard (e.g. the same ref matches "refs/heads/m*", too).
*/
diff --git a/refs.c b/refs.c
index 224ff66c7b..b642055a4d 100644
--- a/refs.c
+++ b/refs.c
@@ -1948,19 +1948,19 @@ int peel_ref(const char *refname, struct object_id *oid)
int refs_create_symref(struct ref_store *refs,
const char *ref_target,
- const char *refs_heads_master,
+ const char *refs_heads_main,
const char *logmsg)
{
return refs->be->create_symref(refs, ref_target,
- refs_heads_master,
+ refs_heads_main,
logmsg);
}
-int create_symref(const char *ref_target, const char *refs_heads_master,
+int create_symref(const char *ref_target, const char *refs_heads_main,
const char *logmsg)
{
return refs_create_symref(get_main_ref_store(the_repository), ref_target,
- refs_heads_master, logmsg);
+ refs_heads_main, logmsg);
}
int ref_update_reject_duplicates(struct string_list *refnames,
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 6516c7bc8c..d74f2f311d 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2948,7 +2948,7 @@ static int files_initial_transaction_commit(struct ref_store *ref_store,
* the same time we do, and (2) any existing loose versions of
* the references that we are setting would have precedence
* over our values. But some remote helpers create the remote
- * "HEAD" and "master" branches before calling this function,
+ * "HEAD" and "main" branches before calling this function,
* so here we really only check that none of the references
* that we are creating already exists.
*/
diff --git a/refs/ref-cache.h b/refs/ref-cache.h
index 3bfb89d2b3..c27d2e5fb0 100644
--- a/refs/ref-cache.h
+++ b/refs/ref-cache.h
@@ -147,7 +147,7 @@ struct ref_entry {
struct ref_dir subdir; /* if (flags&REF_DIR) */
} u;
/*
- * The full name of the reference (e.g., "refs/heads/master")
+ * The full name of the reference (e.g., "refs/heads/main")
* or the full name of the directory with a trailing slash
* (e.g., "refs/heads/"):
*/
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 4271362d26..268c809c65 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -545,7 +545,7 @@ typedef int ref_transaction_commit_fn(struct ref_store *refs,
typedef int pack_refs_fn(struct ref_store *ref_store, unsigned int flags);
typedef int create_symref_fn(struct ref_store *ref_store,
const char *ref_target,
- const char *refs_heads_master,
+ const char *refs_heads_main,
const char *logmsg);
typedef int delete_refs_fn(struct ref_store *ref_store, const char *msg,
struct string_list *refnames, unsigned int flags);
@@ -605,7 +605,7 @@ typedef int reflog_expire_fn(struct ref_store *ref_store,
*
* - If refname is the name of a symbolic reference, write the full
* name of the reference to which it refers (e.g.
- * "refs/heads/master") to referent and set the REF_ISSYMREF bit in
+ * "refs/heads/main") to referent and set the REF_ISSYMREF bit in
* type (leaving oid unchanged). The caller is responsible for
* validating that referent is a valid reference name.
*
diff --git a/remote-testsvn.c b/remote-testsvn.c
index 3af708c5b6..dcc3e0f595 100644
--- a/remote-testsvn.c
+++ b/remote-testsvn.c
@@ -13,7 +13,7 @@
static const char *url;
static int dump_from_file;
static const char *private_ref;
-static const char *remote_ref = "refs/heads/master";
+static const char *remote_ref = "refs/heads/main";
static const char *marksfilename, *notes_ref;
struct rev_note { unsigned int rev_nr; };
@@ -306,7 +306,7 @@ int cmd_main(int argc, const char **argv)
url = url_sb.buf;
}
- strbuf_addf(&private_ref_sb, "refs/svn/%s/master", remote->name);
+ strbuf_addf(&private_ref_sb, "refs/svn/%s/main", remote->name);
private_ref = private_ref_sb.buf;
strbuf_addf(&notes_ref_sb, "refs/notes/%s/revs", remote->name);
diff --git a/remote.c b/remote.c
index 534c6426f1..4d81d8a6b3 100644
--- a/remote.c
+++ b/remote.c
@@ -276,7 +276,7 @@ static void read_branches_file(struct remote *remote)
/*
* The branches file would have URL and optionally
- * #branch specified. The "master" (or specified) branch is
+ * #branch specified. The "main" (or specified) branch is
* fetched and stored in the local branch matching the
* remote name.
*/
@@ -284,7 +284,7 @@ static void read_branches_file(struct remote *remote)
if (frag)
*(frag++) = '\0';
else
- frag = "master";
+ frag = "main";
add_url_alias(remote, strbuf_detach(&buf, NULL));
strbuf_addf(&buf, "refs/heads/%s:refs/heads/%s",
@@ -293,7 +293,7 @@ static void read_branches_file(struct remote *remote)
/*
* Cogito compatible push: push current HEAD to remote #branch
- * (master if missing)
+ * (main if missing)
*/
strbuf_reset(&buf);
strbuf_addf(&buf, "HEAD:refs/heads/%s", frag);
@@ -866,10 +866,10 @@ int count_refspec_match(const char *pattern,
/* A match is "weak" if it is with refs outside
* heads or tags, and did not specify the pattern
- * in full (e.g. "refs/remotes/origin/master") or at
- * least from the toplevel (e.g. "remotes/origin/master");
- * otherwise "git push $URL master" would result in
- * ambiguity between remotes/origin/master and heads/master
+ * in full (e.g. "refs/remotes/origin/main") or at
+ * least from the toplevel (e.g. "remotes/origin/main");
+ * otherwise "git push $URL main" would result in
+ * ambiguity between remotes/origin/main and heads/main
* at the remote site.
*/
if (namelen != patlen &&
@@ -2097,9 +2097,9 @@ struct ref *guess_remote_head(const struct ref *head,
if (head->symref)
return copy_ref(find_ref_by_name(refs, head->symref));
- /* If refs/heads/master could be right, it is. */
+ /* If refs/heads/main could be right, it is. */
if (!all) {
- r = find_ref_by_name(refs, "refs/heads/master");
+ r = find_ref_by_name(refs, "refs/heads/main");
if (r && oideq(&r->old_oid, &head->old_oid))
return copy_ref(r);
}
diff --git a/revision.c b/revision.c
index ebb4d2a0f2..c87f27f383 100644
--- a/revision.c
+++ b/revision.c
@@ -834,7 +834,7 @@ static struct treesame_state *initialise_treesame(struct rev_info *revs, struct
/*
* Must be called immediately after removing the nth_parent from a commit's
* parent list, if we are maintaining the per-parent treesame[] decoration.
- * This does not recalculate the master TREESAME flag - update_treesame()
+ * This does not recalculate the main TREESAME flag - update_treesame()
* should be called to update it after a sequence of treesame[] modifications
* that may have affected it.
*/
diff --git a/send-pack.c b/send-pack.c
index 0abee22283..325df7ed80 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -406,7 +406,7 @@ int send_pack(struct send_pack_args *args,
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
- "Perhaps you should specify a branch such as 'master'.\n");
+ "Perhaps you should specify a branch such as 'main'.\n");
return 0;
}
if (args->atomic && !atomic_supported)
diff --git a/strbuf.h b/strbuf.h
index 7062eb6410..f5fbfffad8 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -694,8 +694,8 @@ static inline void strbuf_complete_line(struct strbuf *sb)
/*
* Copy "name" to "sb", expanding any special @-marks as handled by
* interpret_branch_name(). The result is a non-qualified branch name
- * (so "foo" or "origin/master" instead of "refs/heads/foo" or
- * "refs/remotes/origin/master").
+ * (so "foo" or "origin/main" instead of "refs/heads/foo" or
+ * "refs/remotes/origin/main").
*
* Note that the resulting name may not be a syntactically valid refname.
*
diff --git a/t/README b/t/README
index cf863837ab..e4cef70ded 100644
--- a/t/README
+++ b/t/README
@@ -858,7 +858,7 @@ library for your script to use.
For example:
test_expect_success 'Merge with d/f conflicts' '
- test_expect_code 1 git merge "merge msg" B master
+ test_expect_code 1 git merge "merge msg" B main
'
- test_must_fail [<options>] <git-command>
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index d933af5714..bd73151dc6 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -95,7 +95,7 @@ test_expect_success 'blame 2 authors' '
'
test_expect_success 'setup B1 lines (branch1)' '
- git checkout -b branch1 master &&
+ git checkout -b branch1 main &&
echo "3A slow green fox jumps into the" >>file &&
echo "well." >>file &&
GIT_AUTHOR_NAME="B1" GIT_AUTHOR_EMAIL="[email protected]" \
@@ -107,7 +107,7 @@ test_expect_success 'blame 2 authors + 1 branch1 author' '
'
test_expect_success 'setup B2 lines (branch2)' '
- git checkout -b branch2 master &&
+ git checkout -b branch2 main &&
sed -e "s/2A quick brown/4A quick brown lazy dog/" <file >file.new &&
mv file.new file &&
GIT_AUTHOR_NAME="B2" GIT_AUTHOR_EMAIL="[email protected]" \
@@ -131,11 +131,11 @@ test_expect_success 'blame --first-parent blames merge for branch1' '
'
test_expect_success 'blame ancestor' '
- check_count -h master A 2 B 2
+ check_count -h main A 2 B 2
'
test_expect_success 'blame great-ancestor' '
- check_count -h master^ A 2
+ check_count -h main^ A 2
'
test_expect_success 'setup evil merge' '
diff --git a/t/helper/test-svn-fe.c b/t/helper/test-svn-fe.c
index 7667c0803f..f884752768 100644
--- a/t/helper/test-svn-fe.c
+++ b/t/helper/test-svn-fe.c
@@ -40,7 +40,7 @@ int cmd_main(int argc, const char **argv)
if (argc == 2) {
if (svndump_init(argv[1]))
return 1;
- svndump_read(NULL, "refs/heads/master", "refs/notes/svn/revs");
+ svndump_read(NULL, "refs/heads/main", "refs/notes/svn/revs");
svndump_deinit();
svndump_reset();
return 0;
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
index 9b2bcfb1b0..32b3473379 100644
--- a/t/lib-cvs.sh
+++ b/t/lib-cvs.sh
@@ -36,7 +36,7 @@ setup_cvs_test_repository () {
test_cvs_co () {
# Usage: test_cvs_co BRANCH_NAME
rm -rf module-cvs-"$1"
- if [ "$1" = "master" ]
+ if [ "$1" = "main" ]
then
$CVS co -P -d module-cvs-"$1" -A module
else
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 64fc6487dd..ae3ccc6db1 100644
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -144,7 +144,7 @@ create_lib_submodule_repo () {
git checkout -b valid_sub1 &&
git revert HEAD &&
- git checkout master
+ git checkout main
)
}
diff --git a/t/lib-terminal.sh b/t/lib-terminal.sh
index e3809dcead..b1ea98b31c 100644
--- a/t/lib-terminal.sh
+++ b/t/lib-terminal.sh
@@ -15,7 +15,7 @@ test_terminal () {
test_lazy_prereq TTY '
test_have_prereq PERL &&
- # Reading from the pty master seems to get stuck _sometimes_
+ # Reading from the pty main seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
diff --git a/t/perf/p0005-status.sh b/t/perf/p0005-status.sh
index 0b0aa9858f..b1e652fd29 100755
--- a/t/perf/p0005-status.sh
+++ b/t/perf/p0005-status.sh
@@ -25,7 +25,7 @@ test_expect_success "setup repo" '
if git rev-parse --verify refs/heads/p0006-ballast^{commit}
then
echo Assuming synthetic repo from many-files.sh
- git branch br_base master
+ git branch br_base main
git branch br_ballast p0006-ballast
git config --local core.sparsecheckout 1
cat >.git/info/sparse-checkout <<-EOF
diff --git a/t/perf/p0006-read-tree-checkout.sh b/t/perf/p0006-read-tree-checkout.sh
index 78cc23fe2f..245f5c791f 100755
--- a/t/perf/p0006-read-tree-checkout.sh
+++ b/t/perf/p0006-read-tree-checkout.sh
@@ -25,7 +25,7 @@ test_expect_success "setup repo" '
if git rev-parse --verify refs/heads/p0006-ballast^{commit}
then
echo Assuming synthetic repo from many-files.sh
- git branch br_base master
+ git branch br_base main
git branch br_ballast p0006-ballast^
git branch br_ballast_alias p0006-ballast^
git branch br_ballast_plus_1 p0006-ballast
diff --git a/t/perf/p1451-fsck-skip-list.sh b/t/perf/p1451-fsck-skip-list.sh
index c2b97d2487..b36db4650f 100755
--- a/t/perf/p1451-fsck-skip-list.sh
+++ b/t/perf/p1451-fsck-skip-list.sh
@@ -11,7 +11,7 @@ n=1000000
test_expect_success "setup $n bad commits" '
for i in $(test_seq 1 $n)
do
- echo "commit refs/heads/master" &&
+ echo "commit refs/heads/main" &&
echo "committer C <[email protected]> 1234567890 +0000" &&
echo "data <<EOF" &&
echo "$i.Q." &&
diff --git a/t/perf/p5303-many-packs.sh b/t/perf/p5303-many-packs.sh
index 7ee791669a..e5b418c8ce 100755
--- a/t/perf/p5303-many-packs.sh
+++ b/t/perf/p5303-many-packs.sh
@@ -58,8 +58,8 @@ test_expect_success 'simplify reachability' '
git for-each-ref --format="option no-deref%0adelete %(refname)" |
git update-ref --stdin &&
rm -rf .git/logs &&
- git update-ref refs/heads/master $tip &&
- git symbolic-ref HEAD refs/heads/master &&
+ git update-ref refs/heads/main $tip &&
+ git symbolic-ref HEAD refs/heads/main &&
git repack -ad
'
diff --git a/t/perf/p5550-fetch-tags.sh b/t/perf/p5550-fetch-tags.sh
index d0e0e019ea..87972cb8b7 100755
--- a/t/perf/p5550-fetch-tags.sh
+++ b/t/perf/p5550-fetch-tags.sh
@@ -71,7 +71,7 @@ test_expect_success 'create child packs' '
test_perf 'fetch' '
# make sure there is something to fetch on each iteration
- git -C child update-ref -d refs/remotes/origin/master &&
+ git -C child update-ref -d refs/remotes/origin/main &&
git -C child fetch
'
diff --git a/t/perf/repos/inflate-repo.sh b/t/perf/repos/inflate-repo.sh
index fcfc992b5b..1e9b776c43 100755
--- a/t/perf/repos/inflate-repo.sh
+++ b/t/perf/repos/inflate-repo.sh
@@ -74,7 +74,7 @@ git commit -q -m "ballast plus 1"
nr_files=$(git ls-files | wc -l)
-# Checkout master to put repo in canonical state (because
+# Checkout main to put repo in canonical state (because
# the perf test may need to clone and enable sparse-checkout
# before attempting to checkout a commit with the ballast
# (because it may contain 100K directories and 1M files)).
diff --git a/t/perf/repos/many-files.sh b/t/perf/repos/many-files.sh
index 28720e4e10..7cae9e7ce7 100755
--- a/t/perf/repos/many-files.sh
+++ b/t/perf/repos/many-files.sh
@@ -81,7 +81,7 @@ mkdir $repo
cd $repo
git init .
-# Create an initial commit just to define master.
+# Create an initial commit just to define main.
touch many-files.empty
echo "$depth $width $files" >many-files.params
git add many-files.*
@@ -100,11 +100,11 @@ echo "$depth $width $files" >>many-files.params
git add many-files.params
git commit -q -m "ballast plus 1"
-# Checkout master to put repo in canonical state (because
+# Checkout main to put repo in canonical state (because
# the perf test may need to clone and enable sparse-checkout
# before attempting to checkout a commit with the ballast
# (because it may contain 100K directories and 1M files)).
-git checkout master
+git checkout main
echo "Repository "$repo" ($depth, $width, $files) created. Ballast $nr_files."
exit 0
diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
index 960ed150cb..bbcfc8a0b5 100755
--- a/t/t0002-gitfile.sh
+++ b/t/t0002-gitfile.sh
@@ -96,7 +96,7 @@ test_expect_success 'enter_repo non-strict mode' '
git ls-remote enter_repo >actual &&
cat >expected <<-EOF &&
$head HEAD
- $head refs/heads/master
+ $head refs/heads/main
$head refs/tags/foo
EOF
test_cmp expected actual
@@ -111,7 +111,7 @@ test_expect_success 'enter_repo linked checkout' '
git ls-remote foo >actual &&
cat >expected <<-EOF &&
$head HEAD
- $head refs/heads/master
+ $head refs/heads/main
$head refs/tags/foo
EOF
test_cmp expected actual
@@ -122,7 +122,7 @@ test_expect_success 'enter_repo strict mode' '
git ls-remote --upload-pack="git upload-pack --strict" foo/.git >actual &&
cat >expected <<-EOF &&
$head HEAD
- $head refs/heads/master
+ $head refs/heads/main
$head refs/tags/foo
EOF
test_cmp expected actual
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index b63ba62e5d..04bf4b1e82 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -318,8 +318,8 @@ test_expect_success 'checkout with existing .gitattributes' '
git add .gitattributes .file &&
git commit -m second &&
- git checkout master~1 &&
- git checkout master &&
+ git checkout main~1 &&
+ git checkout main &&
test "$(git diff-files --raw)" = ""
'
@@ -331,8 +331,8 @@ test_expect_success 'checkout when deleting .gitattributes' '
git add .file2 &&
git commit -m third &&
- git checkout master~1 &&
- git checkout master &&
+ git checkout main~1 &&
+ git checkout main &&
has_cr .file2
'
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 4bfffa9c31..7b79c70639 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -382,8 +382,8 @@ test_expect_success PERL 'required process filter should filter data' '
test_cmp_count expected.log debug.log &&
git commit -m "test commit 2" &&
- MASTER=$(git rev-parse --verify master) &&
- META="ref=refs/heads/master treeish=$MASTER" &&
+ main=$(git rev-parse --verify main) &&
+ META="ref=refs/heads/main treeish=$main" &&
rm -f test2.r "testsubdir/test3 '\''sq'\'',\$x=.r" &&
filter_git checkout --quiet --no-progress . &&
@@ -408,7 +408,7 @@ test_expect_success PERL 'required process filter should filter data' '
EOF
test_cmp_exclude_clean expected.log debug.log &&
- filter_git checkout --quiet --no-progress master &&
+ filter_git checkout --quiet --no-progress main &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -440,15 +440,15 @@ test_expect_success PERL 'required process filter should filter data for various
M3=$(git hash-object "testsubdir/test3 '\''sq'\'',\$x=.r") &&
EMPTY=$(git hash-object /dev/null) &&
- MASTER=$(git rev-parse --verify master) &&
+ main=$(git rev-parse --verify main) &&
cp "$TEST_ROOT/test.o" test5.r &&
git add test5.r &&
git commit -m "test commit 3" &&
git checkout empty-branch &&
- filter_git rebase --onto empty-branch master^^ master &&
- MASTER2=$(git rev-parse --verify master) &&
- META="ref=refs/heads/master treeish=$MASTER2" &&
+ filter_git rebase --onto empty-branch main^^ main &&
+ main2=$(git rev-parse --verify main) &&
+ META="ref=refs/heads/main treeish=$main2" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -462,8 +462,8 @@ test_expect_success PERL 'required process filter should filter data for various
test_cmp_exclude_clean expected.log debug.log &&
git reset --hard empty-branch &&
- filter_git reset --hard $MASTER &&
- META="treeish=$MASTER" &&
+ filter_git reset --hard $main &&
+ META="treeish=$main" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -475,10 +475,10 @@ test_expect_success PERL 'required process filter should filter data for various
EOF
test_cmp_exclude_clean expected.log debug.log &&
- git branch old-master $MASTER &&
+ git branch old-main $main &&
git reset --hard empty-branch &&
- filter_git reset --hard old-master &&
- META="ref=refs/heads/old-master treeish=$MASTER" &&
+ filter_git reset --hard old-main &&
+ META="ref=refs/heads/old-main treeish=$main" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -491,9 +491,9 @@ test_expect_success PERL 'required process filter should filter data for various
test_cmp_exclude_clean expected.log debug.log &&
git checkout -b merge empty-branch &&
- git branch -f master $MASTER2 &&
- filter_git merge master &&
- META="treeish=$MASTER2" &&
+ git branch -f main $main2 &&
+ filter_git merge main &&
+ META="treeish=$main2" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -506,8 +506,8 @@ test_expect_success PERL 'required process filter should filter data for various
EOF
test_cmp_exclude_clean expected.log debug.log &&
- filter_git archive master >/dev/null &&
- META="ref=refs/heads/master treeish=$MASTER2" &&
+ filter_git archive main >/dev/null &&
+ META="ref=refs/heads/main treeish=$main2" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -520,7 +520,7 @@ test_expect_success PERL 'required process filter should filter data for various
EOF
test_cmp_exclude_clean expected.log debug.log &&
- TREE="$(git rev-parse $MASTER2^{tree})" &&
+ TREE="$(git rev-parse $main2^{tree})" &&
filter_git archive $TREE >/dev/null &&
META="treeish=$TREE" &&
cat >expected.log <<-EOF &&
@@ -860,8 +860,8 @@ test_expect_success PERL 'delayed checkout in process filter' '
) &&
S=$(file_size "$TEST_ROOT/test.o") &&
- PM="ref=refs/heads/master treeish=$(git -C repo rev-parse --verify master) " &&
- M="${PM}blob=$(git -C repo rev-parse --verify master:test.a)" &&
+ PM="ref=refs/heads/main treeish=$(git -C repo rev-parse --verify main) " &&
+ M="${PM}blob=$(git -C repo rev-parse --verify main:test.a)" &&
cat >a.exp <<-EOF &&
START
init handshake complete
diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh
index 9fcd56fab3..51f74a3ddf 100755
--- a/t/t0027-auto-crlf.sh
+++ b/t/t0027-auto-crlf.sh
@@ -368,9 +368,9 @@ test_expect_success 'ls-files --eol -o Text/Binary' '
test_cmp expect actual
'
-test_expect_success 'setup master' '
+test_expect_success 'setup main' '
echo >.gitattributes &&
- git checkout -b master &&
+ git checkout -b main &&
git add .gitattributes &&
git commit -m "add .gitattributes" . &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONE\nLINETWO\nLINETHREE" >LF &&
diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh
index bfc4fb9af5..9c48037884 100755
--- a/t/t0028-working-tree-encoding.sh
+++ b/t/t0028-working-tree-encoding.sh
@@ -215,7 +215,7 @@ test_expect_success 'error if encoding round trip is not the same during refresh
TEST_HASH=$(git hash-object --no-filters -w nonsense.utf16le) &&
git update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16le &&
COMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m "plain commit" $(git write-tree)) &&
- git update-ref refs/heads/master $COMMIT &&
+ git update-ref refs/heads/main $COMMIT &&
test_must_fail git checkout HEAD^ 2>err.out &&
test_i18ngrep "error: .* overwritten by checkout:" err.out
@@ -231,7 +231,7 @@ test_expect_success 'error if encoding garbage is already in Git' '
TEST_HASH=$(git hash-object --no-filters -w nonsense.utf16) &&
git update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16 &&
COMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m "plain commit" $(git write-tree)) &&
- git update-ref refs/heads/master $COMMIT &&
+ git update-ref refs/heads/main $COMMIT &&
git diff 2>err.out &&
test_i18ngrep "error: BOM is required" err.out
diff --git a/t/t0041-usage.sh b/t/t0041-usage.sh
index 5b927b76fe..6f93450597 100755
--- a/t/t0041-usage.sh
+++ b/t/t0041-usage.sh
@@ -41,8 +41,8 @@ test_expect_success 'tag usage error' '
'
test_expect_success 'branch --contains <existent_commit>' '
- git branch --contains "master" >actual 2>actual.err &&
- test_i18ngrep "master" actual &&
+ git branch --contains "main" >actual 2>actual.err &&
+ test_i18ngrep "main" actual &&
test_line_count = 0 actual.err
'
@@ -54,7 +54,7 @@ test_expect_success 'branch --contains <inexistent_commit>' '
'
test_expect_success 'branch --no-contains <existent_commit>' '
- git branch --no-contains "master" >actual 2>actual.err &&
+ git branch --no-contains "main" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'
@@ -73,7 +73,7 @@ test_expect_success 'branch usage error' '
'
test_expect_success 'for-each-ref --contains <existent_object>' '
- git for-each-ref --contains "master" >actual 2>actual.err &&
+ git for-each-ref --contains "main" >actual 2>actual.err &&
test_line_count = 2 actual &&
test_line_count = 0 actual.err
'
@@ -86,7 +86,7 @@ test_expect_success 'for-each-ref --contains <inexistent_object>' '
'
test_expect_success 'for-each-ref --no-contains <existent_object>' '
- git for-each-ref --no-contains "master" >actual 2>actual.err &&
+ git for-each-ref --no-contains "main" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 608673fb77..e3412b896b 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -65,7 +65,7 @@ test_expect_success "setup case tests" '
git mv camelcase tmp &&
git mv tmp CamelCase &&
git commit -m "rename" &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'rename (case change)' '
@@ -118,7 +118,7 @@ test_expect_success "setup unicode normalization tests" '
git mv $aumlcdiar tmp &&
git mv tmp "$auml" &&
git commit -m rename &&
- git checkout -f master
+ git checkout -f main
'
$test_unicode 'rename (silent unicode normalization)' '
@@ -147,7 +147,7 @@ test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case in
git add gitweb &&
git commit -m "add gitweb/subdir/file" &&
- git checkout master
+ git checkout main
)
'
diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index 56db5c8aba..c0a9504b25 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -312,8 +312,8 @@ test_git_path GIT_COMMON_DIR=bar info/sparse-checkout .git/info/sparse-check
test_git_path GIT_COMMON_DIR=bar info//sparse-checkout .git/info//sparse-checkout
test_git_path GIT_COMMON_DIR=bar remotes/bar bar/remotes/bar
test_git_path GIT_COMMON_DIR=bar branches/bar bar/branches/bar
-test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master bar/logs/refs/heads/master
-test_git_path GIT_COMMON_DIR=bar refs/heads/master bar/refs/heads/master
+test_git_path GIT_COMMON_DIR=bar logs/refs/heads/main bar/logs/refs/heads/main
+test_git_path GIT_COMMON_DIR=bar refs/heads/main bar/refs/heads/main
test_git_path GIT_COMMON_DIR=bar refs/bisect/foo .git/refs/bisect/foo
test_git_path GIT_COMMON_DIR=bar hooks/me bar/hooks/me
test_git_path GIT_COMMON_DIR=bar config bar/config
diff --git a/t/t0100-previous.sh b/t/t0100-previous.sh
index 58c0b7e9b6..dfb367b720 100755
--- a/t/t0100-previous.sh
+++ b/t/t0100-previous.sh
@@ -8,7 +8,7 @@ test_expect_success 'branch -d @{-1}' '
test_commit A &&
git checkout -b junk &&
git checkout - &&
- test "$(git symbolic-ref HEAD)" = refs/heads/master &&
+ test "$(git symbolic-ref HEAD)" = refs/heads/main &&
git branch -d @{-1} &&
test_must_fail git rev-parse --verify refs/heads/junk
'
@@ -17,9 +17,9 @@ test_expect_success 'branch -d @{-12} when there is not enough switches yet' '
git reflog expire --expire=now &&
git checkout -b junk2 &&
git checkout - &&
- test "$(git symbolic-ref HEAD)" = refs/heads/master &&
+ test "$(git symbolic-ref HEAD)" = refs/heads/main &&
test_must_fail git branch -d @{-12} &&
- git rev-parse --verify refs/heads/master
+ git rev-parse --verify refs/heads/main
'
test_expect_success 'merge @{-1}' '
@@ -28,19 +28,19 @@ test_expect_success 'merge @{-1}' '
git checkout A &&
test_commit C &&
test_commit D &&
- git branch -f master B &&
+ git branch -f main B &&
git branch -f other &&
git checkout other &&
- git checkout master &&
+ git checkout main &&
git merge @{-1} &&
git cat-file commit HEAD | grep "Merge branch '\''other'\''"
'
test_expect_success 'merge @{-1}~1' '
- git checkout master &&
+ git checkout main &&
git reset --hard B &&
git checkout other &&
- git checkout master &&
+ git checkout main &&
git merge @{-1}~1 &&
git cat-file commit HEAD >actual &&
grep "Merge branch '\''other'\''" actual
@@ -48,11 +48,11 @@ test_expect_success 'merge @{-1}~1' '
test_expect_success 'merge @{-100} before checking out that many branches yet' '
git reflog expire --expire=now &&
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard B &&
git branch -f other C &&
git checkout other &&
- git checkout master &&
+ git checkout main &&
test_must_fail git merge @{-100}
'
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index c13578a635..67fccf39ed 100755
--- a/t/t1004-read-tree-m-u-wf.sh
+++ b/t/t1004-read-tree-m-u-wf.sh
@@ -20,17 +20,17 @@ test_expect_success 'two-way setup' '
git branch side &&
git tag -f branch-point &&
- echo file2 is not tracked on the master anymore &&
+ echo file2 is not tracked on the main anymore &&
rm -f file2 subdir/file2 &&
git update-index --remove file2 subdir/file2 &&
- git commit -a -m "master removes file2 and subdir/file2"
+ git commit -a -m "main removes file2 and subdir/file2"
'
test_expect_success 'two-way not clobbering' '
- echo >file2 master creates untracked file2 &&
- echo >subdir/file2 master creates untracked subdir/file2 &&
- if err=$(read_tree_u_must_succeed -m -u master side 2>&1)
+ echo >file2 main creates untracked file2 &&
+ echo >subdir/file2 main creates untracked subdir/file2 &&
+ if err=$(read_tree_u_must_succeed -m -u main side 2>&1)
then
echo should have complained
false
@@ -43,7 +43,7 @@ echo file2 >.gitignore
test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '
- if err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore master side 2>&1)
+ if err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore main side 2>&1)
then
echo should have complained
false
@@ -54,7 +54,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '
test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '
- if err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore master side 2>&1)
+ if err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore main side 2>&1)
then
echo should have complained
false
@@ -65,7 +65,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '
test_expect_success 'two-way clobbering a ignored file' '
- read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore master side
+ read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore main side
'
rm -f .gitignore
@@ -81,21 +81,21 @@ test_expect_success 'three-way not complaining on an untracked path in both' '
git update-index --add file3 subdir/file3 &&
git commit -a -m "side adds file3 and removes file2" &&
- git checkout master &&
- echo >file2 file two is untracked on the master side &&
- echo >subdir/file2 file two is untracked on the master side &&
+ git checkout main &&
+ echo >file2 file two is untracked on the main side &&
+ echo >subdir/file2 file two is untracked on the main side &&
- read_tree_u_must_succeed -m -u branch-point master side
+ read_tree_u_must_succeed -m -u branch-point main side
'
test_expect_success 'three-way not clobbering a working tree file' '
git reset --hard &&
rm -f file2 subdir/file2 file3 subdir/file3 &&
- git checkout master &&
- echo >file3 file three created in master, untracked &&
- echo >subdir/file3 file three created in master, untracked &&
- if err=$(read_tree_u_must_succeed -m -u branch-point master side 2>&1)
+ git checkout main &&
+ echo >file3 file three created in main, untracked &&
+ echo >subdir/file3 file three created in main, untracked &&
+ if err=$(read_tree_u_must_succeed -m -u branch-point main side 2>&1)
then
echo should have complained
false
@@ -110,11 +110,11 @@ test_expect_success 'three-way not complaining on an untracked file' '
git reset --hard &&
rm -f file2 subdir/file2 file3 subdir/file3 &&
- git checkout master &&
- echo >file3 file three created in master, untracked &&
- echo >subdir/file3 file three created in master, untracked &&
+ git checkout main &&
+ echo >file3 file three created in main, untracked &&
+ echo >subdir/file3 file three created in main, untracked &&
- read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point master side
+ read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point main side
'
test_expect_success '3-way not overwriting local changes (setup)' '
diff --git a/t/t1008-read-tree-overlay.sh b/t/t1008-read-tree-overlay.sh
index cf96016844..2a757bd6d5 100755
--- a/t/t1008-read-tree-overlay.sh
+++ b/t/t1008-read-tree-overlay.sh
@@ -22,7 +22,7 @@ test_expect_success setup '
'
test_expect_success 'multi-read' '
- read_tree_must_succeed initial master side &&
+ read_tree_must_succeed initial main side &&
test_write_lines a b/c >expect &&
git ls-files >actual &&
test_cmp expect actual
diff --git a/t/t1009-read-tree-new-index.sh b/t/t1009-read-tree-new-index.sh
index 59b3aa4bc4..7302adfb20 100755
--- a/t/t1009-read-tree-new-index.sh
+++ b/t/t1009-read-tree-new-index.sh
@@ -12,13 +12,13 @@ test_expect_success setup '
test_expect_success 'non-existent index file' '
rm -f new-index &&
- GIT_INDEX_FILE=new-index git read-tree master
+ GIT_INDEX_FILE=new-index git read-tree main
'
test_expect_success 'empty index file' '
rm -f new-index &&
> new-index &&
- GIT_INDEX_FILE=new-index git read-tree master
+ GIT_INDEX_FILE=new-index git read-tree main
'
test_done
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh
index 140f459977..dfe9794a74 100755
--- a/t/t1011-read-tree-sparse-checkout.sh
+++ b/t/t1011-read-tree-sparse-checkout.sh
@@ -2,7 +2,7 @@
test_description='sparse checkout tests
-* (tag: removed, master) removed
+* (tag: removed, main) removed
| D sub/added
* (HEAD, tag: top) modified and added
| M init.t
diff --git a/t/t1021-rerere-in-workdir.sh b/t/t1021-rerere-in-workdir.sh
index 301e071ff7..a32b4a50e0 100755
--- a/t/t1021-rerere-in-workdir.sh
+++ b/t/t1021-rerere-in-workdir.sh
@@ -19,7 +19,7 @@ test_expect_success SYMLINKS setup '
test_tick &&
git commit -a -m goodbye &&
- git checkout master
+ git checkout main
'
test_expect_success SYMLINKS 'rerere in workdir' '
diff --git a/t/t1050-large.sh b/t/t1050-large.sh
index 184b479a21..45cdbdefc0 100755
--- a/t/t1050-large.sh
+++ b/t/t1050-large.sh
@@ -6,7 +6,7 @@ test_description='adding and checking out large blobs'
. ./test-lib.sh
# This should be moved to test-lib.sh together with the
-# copy in t0021 after both topics have graduated to 'master'.
+# copy in t0021 after both topics have graduated to 'main'.
file_size () {
test-tool path-utils file-size "$1"
}
diff --git a/t/t1090-sparse-checkout-scope.sh b/t/t1090-sparse-checkout-scope.sh
index 40cc004326..9d85425bb8 100755
--- a/t/t1090-sparse-checkout-scope.sh
+++ b/t/t1090-sparse-checkout-scope.sh
@@ -20,18 +20,18 @@ test_expect_success 'create feature branch' '
git commit -m "modification"
'
-test_expect_success 'perform sparse checkout of master' '
+test_expect_success 'perform sparse checkout of main' '
git config --local --bool core.sparsecheckout true &&
echo "!/*" >.git/info/sparse-checkout &&
echo "/a" >>.git/info/sparse-checkout &&
echo "/c" >>.git/info/sparse-checkout &&
- git checkout master &&
+ git checkout main &&
test_path_is_file a &&
test_path_is_missing b &&
test_path_is_file c
'
-test_expect_success 'merge feature branch into sparse checkout of master' '
+test_expect_success 'merge feature branch into sparse checkout of main' '
git merge feature &&
test_path_is_file a &&
test_path_is_missing b &&
@@ -39,10 +39,10 @@ test_expect_success 'merge feature branch into sparse checkout of master' '
test "$(cat c)" = "modified"
'
-test_expect_success 'return to full checkout of master' '
+test_expect_success 'return to full checkout of main' '
git checkout feature &&
echo "/*" >.git/info/sparse-checkout &&
- git checkout master &&
+ git checkout main &&
test_path_is_file a &&
test_path_is_file b &&
test_path_is_file c &&
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 97ebfe1f9d..6f570bf007 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -1054,8 +1054,8 @@ test_expect_success 'check split_cmdline return' "
echo foo > foo &&
git add foo &&
git commit -m 'initial commit' &&
- git config branch.master.mergeoptions 'echo \"' &&
- test_must_fail git merge master
+ git config branch.main.mergeoptions 'echo \"' &&
+ test_must_fail git merge main
"
test_expect_success 'git -c "key=value" support' '
@@ -1769,11 +1769,11 @@ test_expect_success '--show-origin blob' '
test_expect_success '--show-origin blob ref' '
cat >expect <<-\EOF &&
- blob:master:custom.conf user.custom=true
+ blob:main:custom.conf user.custom=true
EOF
git add "$CUSTOM_CONFIG_FILE" &&
git commit -m "new config file" &&
- git config --blob=master:"$CUSTOM_CONFIG_FILE" --show-origin --list >output &&
+ git config --blob=main:"$CUSTOM_CONFIG_FILE" --show-origin --list >output &&
test_cmp expect output
'
diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
index 2dc853d1be..b0236ffe4a 100755
--- a/t/t1301-shared-repo.sh
+++ b/t/t1301-shared-repo.sh
@@ -115,13 +115,13 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
umask 077 &&
git config core.sharedRepository group &&
git reflog expire --all &&
- actual="$(ls -l .git/logs/refs/heads/master)" &&
+ actual="$(ls -l .git/logs/refs/heads/main)" &&
case "$actual" in
-rw-rw-*)
: happy
;;
*)
- echo Ooops, .git/logs/refs/heads/master is not 0662 [$actual]
+ echo Ooops, .git/logs/refs/heads/main is not 0662 [$actual]
false
;;
esac
diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh
index f1e1b289f9..938ca17d78 100755
--- a/t/t1305-config-include.sh
+++ b/t/t1305-config-include.sh
@@ -312,7 +312,7 @@ test_expect_success SYMLINKS 'conditional include, gitdir matching symlink, icas
test_expect_success 'conditional include, onbranch' '
echo "[includeIf \"onbranch:foo-branch\"]path=bar9" >>.git/config &&
echo "[test]nine=9" >.git/bar9 &&
- git checkout -b master &&
+ git checkout -b main &&
test_must_fail git config test.nine &&
git checkout -b foo-branch &&
echo 9 >expect &&
diff --git a/t/t1309-early-config.sh b/t/t1309-early-config.sh
index ebb8e1aecb..598e62eb4c 100755
--- a/t/t1309-early-config.sh
+++ b/t/t1309-early-config.sh
@@ -91,11 +91,11 @@ test_expect_failure 'ignore .git/ with invalid config' '
test_expect_success 'early config and onbranch' '
echo "[broken" >broken &&
- test_with_config "[includeif \"onbranch:master\"]path=../broken"
+ test_with_config "[includeif \"onbranch:main\"]path=../broken"
'
test_expect_success 'onbranch config outside of git repo' '
- test_config_global includeIf.onbranch:master.path non-existent &&
+ test_config_global includeIf.onbranch:main.path non-existent &&
nongit git help
'
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 27171f8261..b2368a1c63 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -8,7 +8,7 @@ test_description='Test git update-ref and basic ref logging'
Z=$ZERO_OID
-m=refs/heads/master
+m=refs/heads/main
n_dir=refs/heads/gu
n=$n_dir/fixes
outside=refs/foo
@@ -258,7 +258,7 @@ test_expect_success "(not) changed .git/$m" '
! test $B = $(git show-ref -s --verify $m)
'
-rm -f .git/logs/refs/heads/master
+rm -f .git/logs/refs/heads/main
test_expect_success "create $m (logged by touch)" '
test_config core.logAllRefUpdates false &&
GIT_COMMITTER_DATE="2005-05-26 23:30" \
@@ -294,7 +294,7 @@ test_expect_success 'symref empty directory removal' '
git branch e1/e2/r1 HEAD &&
git branch e1/r2 HEAD &&
git checkout e1/e2/r1 &&
- test_when_finished "git checkout master" &&
+ test_when_finished "git checkout main" &&
test_path_is_file .git/refs/heads/e1/e2/r1 &&
test_path_is_file .git/logs/refs/heads/e1/e2/r1 &&
git update-ref -d HEAD &&
@@ -358,68 +358,68 @@ test_expect_success 'set up for querying the reflog' '
ed="Thu, 26 May 2005 18:32:00 -0500"
gd="Thu, 26 May 2005 18:33:00 -0500"
ld="Thu, 26 May 2005 18:43:00 -0500"
-test_expect_success 'Query "master@{May 25 2005}" (before history)' '
+test_expect_success 'Query "main@{May 25 2005}" (before history)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify "master@{May 25 2005}" >o 2>e &&
+ git rev-parse --verify "main@{May 25 2005}" >o 2>e &&
echo "$C" >expect &&
test_cmp expect o &&
- echo "warning: log for '\''master'\'' only goes back to $ed" >expect &&
+ echo "warning: log for '\''main'\'' only goes back to $ed" >expect &&
test_i18ncmp expect e
'
-test_expect_success 'Query master@{2005-05-25} (before history)' '
+test_expect_success 'Query main@{2005-05-25} (before history)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify master@{2005-05-25} >o 2>e &&
+ git rev-parse --verify main@{2005-05-25} >o 2>e &&
echo "$C" >expect &&
test_cmp expect o &&
- echo "warning: log for '\''master'\'' only goes back to $ed" >expect &&
+ echo "warning: log for '\''main'\'' only goes back to $ed" >expect &&
test_i18ncmp expect e
'
-test_expect_success 'Query "master@{May 26 2005 23:31:59}" (1 second before history)' '
+test_expect_success 'Query "main@{May 26 2005 23:31:59}" (1 second before history)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
+ git rev-parse --verify "main@{May 26 2005 23:31:59}" >o 2>e &&
echo "$C" >expect &&
test_cmp expect o &&
- echo "warning: log for '\''master'\'' only goes back to $ed" >expect &&
+ echo "warning: log for '\''main'\'' only goes back to $ed" >expect &&
test_i18ncmp expect e
'
-test_expect_success 'Query "master@{May 26 2005 23:32:00}" (exactly history start)' '
+test_expect_success 'Query "main@{May 26 2005 23:32:00}" (exactly history start)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
+ git rev-parse --verify "main@{May 26 2005 23:32:00}" >o 2>e &&
echo "$C" >expect &&
test_cmp expect o &&
test_must_be_empty e
'
-test_expect_success 'Query "master@{May 26 2005 23:32:30}" (first non-creation change)' '
+test_expect_success 'Query "main@{May 26 2005 23:32:30}" (first non-creation change)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify "master@{May 26 2005 23:32:30}" >o 2>e &&
+ git rev-parse --verify "main@{May 26 2005 23:32:30}" >o 2>e &&
echo "$A" >expect &&
test_cmp expect o &&
test_must_be_empty e
'
-test_expect_success 'Query "master@{2005-05-26 23:33:01}" (middle of history with gap)' '
+test_expect_success 'Query "main@{2005-05-26 23:33:01}" (middle of history with gap)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify "master@{2005-05-26 23:33:01}" >o 2>e &&
+ git rev-parse --verify "main@{2005-05-26 23:33:01}" >o 2>e &&
echo "$B" >expect &&
test_cmp expect o &&
test_i18ngrep -F "warning: log for ref $m has gap after $gd" e
'
-test_expect_success 'Query "master@{2005-05-26 23:38:00}" (middle of history)' '
+test_expect_success 'Query "main@{2005-05-26 23:38:00}" (middle of history)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify "master@{2005-05-26 23:38:00}" >o 2>e &&
+ git rev-parse --verify "main@{2005-05-26 23:38:00}" >o 2>e &&
echo "$Z" >expect &&
test_cmp expect o &&
test_must_be_empty e
'
-test_expect_success 'Query "master@{2005-05-26 23:43:00}" (exact end of history)' '
+test_expect_success 'Query "main@{2005-05-26 23:43:00}" (exact end of history)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify "master@{2005-05-26 23:43:00}" >o 2>e &&
+ git rev-parse --verify "main@{2005-05-26 23:43:00}" >o 2>e &&
echo "$E" >expect &&
test_cmp expect o &&
test_must_be_empty e
'
-test_expect_success 'Query "master@{2005-05-28}" (past end of history)' '
+test_expect_success 'Query "main@{2005-05-28}" (past end of history)' '
test_when_finished "rm -f o e" &&
- git rev-parse --verify "master@{2005-05-28}" >o 2>e &&
+ git rev-parse --verify "main@{2005-05-28}" >o 2>e &&
echo "$D" >expect &&
test_cmp expect o &&
test_i18ngrep -F "warning: log for ref $m unexpectedly ended on $ld" e
@@ -461,14 +461,14 @@ test_expect_success 'git commit logged updates' '
'
unset h_TEST h_OTHER h_FIXED h_MERGED
-test_expect_success 'git cat-file blob master:F (expect OTHER)' '
- test OTHER = $(git cat-file blob master:F)
+test_expect_success 'git cat-file blob main:F (expect OTHER)' '
+ test OTHER = $(git cat-file blob main:F)
'
-test_expect_success 'git cat-file blob master@{2005-05-26 23:30}:F (expect TEST)' '
- test TEST = $(git cat-file blob "master@{2005-05-26 23:30}:F")
+test_expect_success 'git cat-file blob main@{2005-05-26 23:30}:F (expect TEST)' '
+ test TEST = $(git cat-file blob "main@{2005-05-26 23:30}:F")
'
-test_expect_success 'git cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)' '
- test OTHER = $(git cat-file blob "master@{2005-05-26 23:42}:F")
+test_expect_success 'git cat-file blob main@{2005-05-26 23:42}:F (expect OTHER)' '
+ test OTHER = $(git cat-file blob "main@{2005-05-26 23:42}:F")
'
# Test adding and deleting pseudorefs
@@ -580,9 +580,9 @@ test_expect_success 'stdin fails on unknown command' '
'
test_expect_success 'stdin fails on unbalanced quotes' '
- echo "create $a \"master" >stdin &&
+ echo "create $a \"main" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
- grep "fatal: badly quoted argument: \\\"master" err
+ grep "fatal: badly quoted argument: \\\"main" err
'
test_expect_success 'stdin fails on invalid escape' '
@@ -592,9 +592,9 @@ test_expect_success 'stdin fails on invalid escape' '
'
test_expect_success 'stdin fails on junk after quoted argument' '
- echo "create \"$a\"master" >stdin &&
+ echo "create \"$a\"main" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
- grep "fatal: unexpected character after quoted argument: \\\"$a\\\"master" err
+ grep "fatal: unexpected character after quoted argument: \\\"$a\\\"main" err
'
test_expect_success 'stdin fails create with no ref' '
diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
index 98e4a8613b..c19fa344d1 100755
--- a/t/t1402-check-ref-format.sh
+++ b/t/t1402-check-ref-format.sh
@@ -134,15 +134,15 @@ valid_ref !MINGW "$ref" '--refspec-pattern --allow-onelevel --normalize'
test_expect_success "check-ref-format --branch @{-1}" '
T=$(git write-tree) &&
sha1=$(echo A | git commit-tree $T) &&
- git update-ref refs/heads/master $sha1 &&
- git update-ref refs/remotes/origin/master $sha1 &&
- git checkout master &&
- git checkout origin/master &&
- git checkout master &&
+ git update-ref refs/heads/main $sha1 &&
+ git update-ref refs/remotes/origin/main $sha1 &&
+ git checkout main &&
+ git checkout origin/main &&
+ git checkout main &&
refname=$(git check-ref-format --branch @{-1}) &&
test "$refname" = "$sha1" &&
refname2=$(git check-ref-format --branch @{-2}) &&
- test "$refname2" = master'
+ test "$refname2" = main'
test_expect_success 'check-ref-format --branch -naster' '
test_must_fail git check-ref-format --branch -naster >actual &&
@@ -154,11 +154,11 @@ test_expect_success 'check-ref-format --branch from subdir' '
T=$(git write-tree) &&
sha1=$(echo A | git commit-tree $T) &&
- git update-ref refs/heads/master $sha1 &&
- git update-ref refs/remotes/origin/master $sha1 &&
- git checkout master &&
- git checkout origin/master &&
- git checkout master &&
+ git update-ref refs/heads/main $sha1 &&
+ git update-ref refs/remotes/origin/main $sha1 &&
+ git checkout main &&
+ git checkout origin/main &&
+ git checkout main &&
refname=$(
cd subdir &&
git check-ref-format --branch @{-1}
@@ -171,9 +171,9 @@ test_expect_success 'check-ref-format --branch @{-1} from non-repo' '
test_must_be_empty actual
'
-test_expect_success 'check-ref-format --branch master from non-repo' '
- echo master >expect &&
- nongit git check-ref-format --branch master >actual &&
+test_expect_success 'check-ref-format --branch main from non-repo' '
+ echo main >expect &&
+ nongit git check-ref-format --branch main >actual &&
test_cmp expect actual
'
diff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh
index 5d955c3bff..681b7022c3 100755
--- a/t/t1403-show-ref.sh
+++ b/t/t1403-show-ref.sh
@@ -9,7 +9,7 @@ test_expect_success setup '
git checkout -b side &&
test_commit B &&
git tag -f -a -m "annotated B" B &&
- git checkout master &&
+ git checkout main &&
test_commit C &&
git branch B A^0
'
@@ -92,23 +92,23 @@ test_expect_success 'show-ref -d' '
git show-ref --verify -d refs/tags/A refs/tags/C >actual &&
test_cmp expect actual &&
- echo $(git rev-parse refs/heads/master) refs/heads/master >expect &&
- git show-ref -d master >actual &&
+ echo $(git rev-parse refs/heads/main) refs/heads/main >expect &&
+ git show-ref -d main >actual &&
test_cmp expect actual &&
- git show-ref -d heads/master >actual &&
+ git show-ref -d heads/main >actual &&
test_cmp expect actual &&
- git show-ref -d refs/heads/master >actual &&
+ git show-ref -d refs/heads/main >actual &&
test_cmp expect actual &&
- git show-ref -d --verify refs/heads/master >actual &&
+ git show-ref -d --verify refs/heads/main >actual &&
test_cmp expect actual &&
- test_must_fail git show-ref -d --verify master >actual &&
+ test_must_fail git show-ref -d --verify main >actual &&
test_must_be_empty actual &&
- test_must_fail git show-ref -d --verify heads/master >actual &&
+ test_must_fail git show-ref -d --verify heads/main >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify -d A C >actual &&
@@ -120,7 +120,7 @@ test_expect_success 'show-ref -d' '
'
test_expect_success 'show-ref --heads, --tags, --head, pattern' '
- for branch in B master side
+ for branch in B main side
do
echo $(git rev-parse refs/heads/$branch) refs/heads/$branch
done >expect.heads &&
diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh
index 331899ddc4..590c544bac 100755
--- a/t/t1405-main-ref-store.sh
+++ b/t/t1405-main-ref-store.sh
@@ -21,9 +21,9 @@ test_expect_success 'peel_ref(new-tag)' '
test_cmp expected actual
'
-test_expect_success 'create_symref(FOO, refs/heads/master)' '
- $RUN create-symref FOO refs/heads/master nothing &&
- echo refs/heads/master >expected &&
+test_expect_success 'create_symref(FOO, refs/heads/main)' '
+ $RUN create-symref FOO refs/heads/main nothing &&
+ echo refs/heads/main >expected &&
git symbolic-ref FOO >actual &&
test_cmp expected actual
'
@@ -36,19 +36,19 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '
test_must_fail git rev-parse refs/tags/new-tag --
'
-test_expect_success 'rename_refs(master, new-master)' '
- git rev-parse master >expected &&
- $RUN rename-ref refs/heads/master refs/heads/new-master &&
- git rev-parse new-master >actual &&
+test_expect_success 'rename_refs(main, new-main)' '
+ git rev-parse main >expected &&
+ $RUN rename-ref refs/heads/main refs/heads/new-main &&
+ git rev-parse new-main >actual &&
test_cmp expected actual &&
- test_commit recreate-master
+ test_commit recreate-main
'
test_expect_success 'for_each_ref(refs/heads/)' '
$RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
- master 0x0
- new-master 0x0
+ main 0x0
+ new-main 0x0
EOF
test_cmp expected actual
'
@@ -59,23 +59,23 @@ test_expect_success 'for_each_ref() is sorted' '
test_cmp expected actual
'
-test_expect_success 'resolve_ref(new-master)' '
- SHA1=`git rev-parse new-master` &&
- echo "$SHA1 refs/heads/new-master 0x0" >expected &&
- $RUN resolve-ref refs/heads/new-master 0 >actual &&
+test_expect_success 'resolve_ref(new-main)' '
+ SHA1=`git rev-parse new-main` &&
+ echo "$SHA1 refs/heads/new-main 0x0" >expected &&
+ $RUN resolve-ref refs/heads/new-main 0 >actual &&
test_cmp expected actual
'
-test_expect_success 'verify_ref(new-master)' '
- $RUN verify-ref refs/heads/new-master
+test_expect_success 'verify_ref(new-main)' '
+ $RUN verify-ref refs/heads/new-main
'
test_expect_success 'for_each_reflog()' '
$RUN for-each-reflog | sort -k2 | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
HEAD 0x1
- refs/heads/master 0x0
- refs/heads/new-master 0x0
+ refs/heads/main 0x0
+ refs/heads/new-main 0x0
EOF
test_cmp expected actual
'
@@ -83,12 +83,12 @@ test_expect_success 'for_each_reflog()' '
test_expect_success 'for_each_reflog_ent()' '
$RUN for-each-reflog-ent HEAD >actual &&
head -n1 actual | grep one &&
- tail -n2 actual | head -n1 | grep recreate-master
+ tail -n2 actual | head -n1 | grep recreate-main
'
test_expect_success 'for_each_reflog_ent_reverse()' '
$RUN for-each-reflog-ent-reverse HEAD >actual &&
- head -n1 actual | grep recreate-master &&
+ head -n1 actual | grep recreate-main &&
tail -n2 actual | head -n1 | grep one
'
diff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh
index 36b7ef5046..e3e3b9c84c 100755
--- a/t/t1406-submodule-ref-store.sh
+++ b/t/t1406-submodule-ref-store.sh
@@ -11,7 +11,7 @@ test_expect_success 'setup' '
(
cd sub &&
test_commit first &&
- git checkout -b new-master
+ git checkout -b new-main
)
'
@@ -27,7 +27,7 @@ test_expect_success 'peel_ref(new-tag)' '
'
test_expect_success 'create_symref() not allowed' '
- test_must_fail $RUN create-symref FOO refs/heads/master nothing
+ test_must_fail $RUN create-symref FOO refs/heads/main nothing
'
test_expect_success 'delete_refs() not allowed' '
@@ -35,14 +35,14 @@ test_expect_success 'delete_refs() not allowed' '
'
test_expect_success 'rename_refs() not allowed' '
- test_must_fail $RUN rename-ref refs/heads/master refs/heads/new-master
+ test_must_fail $RUN rename-ref refs/heads/main refs/heads/new-main
'
test_expect_success 'for_each_ref(refs/heads/)' '
$RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
- master 0x0
- new-master 0x0
+ main 0x0
+ new-main 0x0
EOF
test_cmp expected actual
'
@@ -53,23 +53,23 @@ test_expect_success 'for_each_ref() is sorted' '
test_cmp expected actual
'
-test_expect_success 'resolve_ref(master)' '
- SHA1=`git -C sub rev-parse master` &&
- echo "$SHA1 refs/heads/master 0x0" >expected &&
- $RUN resolve-ref refs/heads/master 0 >actual &&
+test_expect_success 'resolve_ref(main)' '
+ SHA1=`git -C sub rev-parse main` &&
+ echo "$SHA1 refs/heads/main 0x0" >expected &&
+ $RUN resolve-ref refs/heads/main 0 >actual &&
test_cmp expected actual
'
-test_expect_success 'verify_ref(new-master)' '
- $RUN verify-ref refs/heads/new-master
+test_expect_success 'verify_ref(new-main)' '
+ $RUN verify-ref refs/heads/new-main
'
test_expect_success 'for_each_reflog()' '
$RUN for-each-reflog | sort | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
HEAD 0x1
- refs/heads/master 0x0
- refs/heads/new-master 0x0
+ refs/heads/main 0x0
+ refs/heads/new-main 0x0
EOF
test_cmp expected actual
'
@@ -77,12 +77,12 @@ test_expect_success 'for_each_reflog()' '
test_expect_success 'for_each_reflog_ent()' '
$RUN for-each-reflog-ent HEAD >actual &&
head -n1 actual | grep first &&
- tail -n2 actual | head -n1 | grep master.to.new
+ tail -n2 actual | head -n1 | grep main.to.new
'
test_expect_success 'for_each_reflog_ent_reverse()' '
$RUN for-each-reflog-ent-reverse HEAD >actual &&
- head -n1 actual | grep master.to.new &&
+ head -n1 actual | grep main.to.new &&
tail -n2 actual | head -n1 | grep first
'
diff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-ref-store.sh
index 9a84858118..71059cb254 100755
--- a/t/t1407-worktree-ref-store.sh
+++ b/t/t1407-worktree-ref-store.sh
@@ -9,7 +9,7 @@ RMAIN="test-tool ref-store worktree:main"
test_expect_success 'setup' '
test_commit first &&
- git worktree add -b wt-master wt &&
+ git worktree add -b wt-main wt &&
(
cd wt &&
test_commit second
@@ -17,34 +17,34 @@ test_expect_success 'setup' '
'
test_expect_success 'resolve_ref(<shared-ref>)' '
- SHA1=`git rev-parse master` &&
- echo "$SHA1 refs/heads/master 0x0" >expected &&
- $RWT resolve-ref refs/heads/master 0 >actual &&
+ SHA1=`git rev-parse main` &&
+ echo "$SHA1 refs/heads/main 0x0" >expected &&
+ $RWT resolve-ref refs/heads/main 0 >actual &&
test_cmp expected actual &&
- $RMAIN resolve-ref refs/heads/master 0 >actual &&
+ $RMAIN resolve-ref refs/heads/main 0 >actual &&
test_cmp expected actual
'
test_expect_success 'resolve_ref(<per-worktree-ref>)' '
SHA1=`git -C wt rev-parse HEAD` &&
- echo "$SHA1 refs/heads/wt-master 0x1" >expected &&
+ echo "$SHA1 refs/heads/wt-main 0x1" >expected &&
$RWT resolve-ref HEAD 0 >actual &&
test_cmp expected actual &&
SHA1=`git rev-parse HEAD` &&
- echo "$SHA1 refs/heads/master 0x1" >expected &&
+ echo "$SHA1 refs/heads/main 0x1" >expected &&
$RMAIN resolve-ref HEAD 0 >actual &&
test_cmp expected actual
'
-test_expect_success 'create_symref(FOO, refs/heads/master)' '
- $RWT create-symref FOO refs/heads/master nothing &&
- echo refs/heads/master >expected &&
+test_expect_success 'create_symref(FOO, refs/heads/main)' '
+ $RWT create-symref FOO refs/heads/main nothing &&
+ echo refs/heads/main >expected &&
git -C wt symbolic-ref FOO >actual &&
test_cmp expected actual &&
- $RMAIN create-symref FOO refs/heads/wt-master nothing &&
- echo refs/heads/wt-master >expected &&
+ $RMAIN create-symref FOO refs/heads/wt-main nothing &&
+ echo refs/heads/wt-main >expected &&
git symbolic-ref FOO >actual &&
test_cmp expected actual
'
@@ -63,8 +63,8 @@ test_expect_success 'for_each_reflog()' '
HEAD 0x1
PSEUDO-WT 0x0
refs/bisect/wt-random 0x0
- refs/heads/master 0x0
- refs/heads/wt-master 0x0
+ refs/heads/main 0x0
+ refs/heads/wt-main 0x0
EOF
test_cmp expected actual &&
@@ -73,8 +73,8 @@ test_expect_success 'for_each_reflog()' '
HEAD 0x1
PSEUDO-MAIN 0x0
refs/bisect/random 0x0
- refs/heads/master 0x0
- refs/heads/wt-master 0x0
+ refs/heads/main 0x0
+ refs/heads/wt-main 0x0
EOF
test_cmp expected actual
'
diff --git a/t/t1408-packed-refs.sh b/t/t1408-packed-refs.sh
index 1e44a17eea..f40e7af8ce 100755
--- a/t/t1408-packed-refs.sh
+++ b/t/t1408-packed-refs.sh
@@ -9,32 +9,32 @@ test_expect_success setup '
git commit --allow-empty -m one &&
one=$(git rev-parse HEAD) &&
git for-each-ref >actual &&
- echo "$one commit refs/heads/master" >expect &&
+ echo "$one commit refs/heads/main" >expect &&
test_cmp expect actual &&
git pack-refs --all &&
git for-each-ref >actual &&
- echo "$one commit refs/heads/master" >expect &&
+ echo "$one commit refs/heads/main" >expect &&
test_cmp expect actual &&
git checkout --orphan another &&
test_tick &&
git commit --allow-empty -m two &&
two=$(git rev-parse HEAD) &&
- git checkout -B master &&
+ git checkout -B main &&
git branch -D another &&
git for-each-ref >actual &&
- echo "$two commit refs/heads/master" >expect &&
+ echo "$two commit refs/heads/main" >expect &&
test_cmp expect actual &&
git reflog expire --expire=now --all &&
git prune &&
- git tag -m v1.0 v1.0 master
+ git tag -m v1.0 v1.0 main
'
test_expect_success 'no error from stale entry in packed-refs' '
- git describe master >actual 2>&1 &&
+ git describe main >actual 2>&1 &&
echo "v1.0" >expect &&
test_cmp expect actual
'
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 76d9b744a6..66e5ad3170 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -100,7 +100,7 @@ test_expect_success setup '
check_fsck &&
- git reflog refs/heads/master >output &&
+ git reflog refs/heads/main >output &&
test_line_count = 4 output
'
@@ -117,7 +117,7 @@ test_expect_success rewind '
check_have A B C D E F G H I J K L &&
- git reflog refs/heads/master >output &&
+ git reflog refs/heads/main >output &&
test_line_count = 5 output
'
@@ -136,7 +136,7 @@ test_expect_success 'reflog expire --dry-run should not touch reflog' '
--stale-fix \
--all &&
- git reflog refs/heads/master >output &&
+ git reflog refs/heads/main >output &&
test_line_count = 5 output &&
check_fsck "missing blob $F"
@@ -150,7 +150,7 @@ test_expect_success 'reflog expire' '
--stale-fix \
--all &&
- git reflog refs/heads/master >output &&
+ git reflog refs/heads/main >output &&
test_line_count = 2 output &&
check_fsck "dangling commit $K"
@@ -187,29 +187,29 @@ test_expect_success 'delete' '
git commit -m tiger C &&
HEAD_entry_count=$(git reflog | wc -l) &&
- master_entry_count=$(git reflog show master | wc -l) &&
+ main_entry_count=$(git reflog show main | wc -l) &&
test $HEAD_entry_count = 5 &&
- test $master_entry_count = 5 &&
+ test $main_entry_count = 5 &&
- git reflog delete master@{1} &&
- git reflog show master > output &&
- test_line_count = $(($master_entry_count - 1)) output &&
+ git reflog delete main@{1} &&
+ git reflog show main > output &&
+ test_line_count = $(($main_entry_count - 1)) output &&
test $HEAD_entry_count = $(git reflog | wc -l) &&
! grep ox < output &&
- master_entry_count=$(wc -l < output) &&
+ main_entry_count=$(wc -l < output) &&
git reflog delete HEAD@{1} &&
test $(($HEAD_entry_count -1)) = $(git reflog | wc -l) &&
- test $master_entry_count = $(git reflog show master | wc -l) &&
+ test $main_entry_count = $(git reflog show main | wc -l) &&
HEAD_entry_count=$(git reflog | wc -l) &&
- git reflog delete master@{07.04.2005.15:15:00.-0700} &&
- git reflog show master > output &&
- test_line_count = $(($master_entry_count - 1)) output &&
+ git reflog delete main@{07.04.2005.15:15:00.-0700} &&
+ git reflog show main > output &&
+ test_line_count = $(($main_entry_count - 1)) output &&
! grep dragon < output
'
@@ -217,7 +217,7 @@ test_expect_success 'delete' '
test_expect_success 'rewind2' '
test_tick && git reset --hard HEAD~2 &&
- git reflog refs/heads/master >output &&
+ git reflog refs/heads/main >output &&
test_line_count = 4 output
'
@@ -227,7 +227,7 @@ test_expect_success '--expire=never' '
--expire=never \
--expire-unreachable=never \
--all &&
- git reflog refs/heads/master >output &&
+ git reflog refs/heads/main >output &&
test_line_count = 4 output
'
@@ -238,7 +238,7 @@ test_expect_success 'gc.reflogexpire=never' '
git reflog expire --verbose --all >output &&
test_line_count = 9 output &&
- git reflog refs/heads/master >output &&
+ git reflog refs/heads/main >output &&
test_line_count = 4 output
'
@@ -247,7 +247,7 @@ test_expect_success 'gc.reflogexpire=false' '
test_config gc.reflogexpireunreachable false &&
git reflog expire --verbose --all &&
- git reflog refs/heads/master >output &&
+ git reflog refs/heads/main >output &&
test_line_count = 4 output
'
@@ -256,33 +256,33 @@ test_expect_success 'git reflog expire unknown reference' '
test_config gc.reflogexpire never &&
test_config gc.reflogexpireunreachable never &&
- test_must_fail git reflog expire master@{123} 2>stderr &&
+ test_must_fail git reflog expire main@{123} 2>stderr &&
test_i18ngrep "points nowhere" stderr &&
test_must_fail git reflog expire does-not-exist 2>stderr &&
test_i18ngrep "points nowhere" stderr
'
test_expect_success 'checkout should not delete log for packed ref' '
- test $(git reflog master | wc -l) = 4 &&
+ test $(git reflog main | wc -l) = 4 &&
git branch foo &&
git pack-refs --all &&
git checkout foo &&
- test $(git reflog master | wc -l) = 4
+ test $(git reflog main | wc -l) = 4
'
test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '
test_when_finished "git branch -d one || git branch -d one/two" &&
- git branch one/two master &&
- echo "one/two@{0} branch: Created from master" >expect &&
+ git branch one/two main &&
+ echo "one/two@{0} branch: Created from main" >expect &&
git log -g --format="%gd %gs" one/two >actual &&
test_cmp expect actual &&
git branch -d one/two &&
# now logs/refs/heads/one is a stale directory, but
# we should move it out of the way to create "one" reflog
- git branch one master &&
- echo "one@{0} branch: Created from master" >expect &&
+ git branch one main &&
+ echo "one@{0} branch: Created from main" >expect &&
git log -g --format="%gd %gs" one >actual &&
test_cmp expect actual
'
@@ -290,15 +290,15 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '
test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '
test_when_finished "git branch -d one || git branch -d one/two" &&
- git branch one/two master &&
- echo "one/two@{0} branch: Created from master" >expect &&
+ git branch one/two main &&
+ echo "one/two@{0} branch: Created from main" >expect &&
git log -g --format="%gd %gs" one/two >actual &&
test_cmp expect actual &&
git branch -d one/two &&
# same as before, but we only create a reflog for "one" if
# it already exists, which it does not
- git -c core.logallrefupdates=false branch one master &&
+ git -c core.logallrefupdates=false branch one main &&
git log -g --format="%gd %gs" one >actual &&
test_must_be_empty actual
'
diff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh
index 985daf1def..333b35aebc 100755
--- a/t/t1411-reflog-show.sh
+++ b/t/t1411-reflog-show.sh
@@ -167,7 +167,7 @@ test_expect_success 'git log -g -p shows diffs vs. parents' '
'
test_expect_success 'reflog exists works' '
- git reflog exists refs/heads/master &&
+ git reflog exists refs/heads/main &&
! git reflog exists refs/heads/nonexistent
'
diff --git a/t/t1413-reflog-detach.sh b/t/t1413-reflog-detach.sh
index c730600d8a..b1f7f35fe9 100755
--- a/t/t1413-reflog-detach.sh
+++ b/t/t1413-reflog-detach.sh
@@ -4,7 +4,7 @@ test_description='Test reflog interaction with detached HEAD'
. ./test-lib.sh
reset_state () {
- git checkout master &&
+ git checkout main &&
cp saved_reflog .git/logs/HEAD
}
@@ -19,14 +19,14 @@ test_expect_success setup '
test_expect_success baseline '
reset_state &&
- git rev-parse master master^ >expect &&
+ git rev-parse main main^ >expect &&
git log -g --format=%H >actual &&
test_cmp expect actual
'
test_expect_success 'switch to branch' '
reset_state &&
- git rev-parse side master master^ >expect &&
+ git rev-parse side main main^ >expect &&
git checkout side &&
git log -g --format=%H >actual &&
test_cmp expect actual
@@ -34,34 +34,34 @@ test_expect_success 'switch to branch' '
test_expect_success 'detach to other' '
reset_state &&
- git rev-parse master side master master^ >expect &&
+ git rev-parse main side main main^ >expect &&
git checkout side &&
- git checkout master^0 &&
+ git checkout main^0 &&
git log -g --format=%H >actual &&
test_cmp expect actual
'
test_expect_success 'detach to self' '
reset_state &&
- git rev-parse master master master^ >expect &&
- git checkout master^0 &&
+ git rev-parse main main main^ >expect &&
+ git checkout main^0 &&
git log -g --format=%H >actual &&
test_cmp expect actual
'
test_expect_success 'attach to self' '
reset_state &&
- git rev-parse master master master master^ >expect &&
- git checkout master^0 &&
- git checkout master &&
+ git rev-parse main main main main^ >expect &&
+ git checkout main^0 &&
+ git checkout main &&
git log -g --format=%H >actual &&
test_cmp expect actual
'
test_expect_success 'attach to other' '
reset_state &&
- git rev-parse side master master master^ >expect &&
- git checkout master^0 &&
+ git rev-parse side main main main^ >expect &&
+ git checkout main^0 &&
git checkout side &&
git log -g --format=%H >actual &&
test_cmp expect actual
diff --git a/t/t1414-reflog-walk.sh b/t/t1414-reflog-walk.sh
index 1181a9fb28..89458b7158 100755
--- a/t/t1414-reflog-walk.sh
+++ b/t/t1414-reflog-walk.sh
@@ -8,7 +8,7 @@ test_expect_success 'set up some reflog entries' '
test_commit two &&
git checkout -b side HEAD^ &&
test_commit three &&
- git merge --no-commit master &&
+ git merge --no-commit main &&
echo evil-merge-content >>one.t &&
test_tick &&
git commit --no-edit -a
@@ -20,9 +20,9 @@ do_walk () {
test_expect_success 'set up expected reflog' '
cat >expect.all <<-EOF
- HEAD@{0} commit (merge): Merge branch ${SQ}master${SQ} into side
+ HEAD@{0} commit (merge): Merge branch ${SQ}main${SQ} into side
HEAD@{1} commit: three
- HEAD@{2} checkout: moving from master to side
+ HEAD@{2} checkout: moving from main to side
HEAD@{3} commit: two
HEAD@{4} commit (initial): one
EOF
@@ -73,15 +73,15 @@ test_expect_success 'walking multiple reflogs shows all' '
# sort ignores the bits after the timestamp.
#
# 2. POSIX leaves undefined whether this is a stable sort or not. So
- # we use "-k 1" to ensure that we see HEAD before master before
+ # we use "-k 1" to ensure that we see HEAD before main before
# side when breaking ties.
{
do_walk --date=unix HEAD &&
do_walk --date=unix side &&
- do_walk --date=unix master
+ do_walk --date=unix main
} >expect.raw &&
sort -t "{" -k 2nr -k 1 <expect.raw >expect &&
- do_walk --date=unix HEAD master side >actual &&
+ do_walk --date=unix HEAD main side >actual &&
test_cmp expect actual
'
diff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh
index c7878a60ed..fcc0194d7e 100755
--- a/t/t1430-bad-ref-name.sh
+++ b/t/t1430-bad-ref-name.sh
@@ -17,7 +17,7 @@ test_expect_success 'fast-import: fail on invalid branch name ".badbranchname"'
corrupt
COMMIT
- from refs/heads/master
+ from refs/heads/main
INPUT_END
test_must_fail git fast-import <input
@@ -32,14 +32,14 @@ test_expect_success 'fast-import: fail on invalid branch name "bad[branch]name"'
corrupt
COMMIT
- from refs/heads/master
+ from refs/heads/main
INPUT_END
test_must_fail git fast-import <input
'
test_expect_success 'git branch shows badly named ref as warning' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch >output 2>error &&
test_i18ngrep -e "ignoring ref with broken name refs/heads/broken\.\.\.ref" error &&
@@ -47,7 +47,7 @@ test_expect_success 'git branch shows badly named ref as warning' '
'
test_expect_success 'branch -d can delete badly named ref' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch -d broken...ref &&
git branch >output 2>error &&
@@ -56,7 +56,7 @@ test_expect_success 'branch -d can delete badly named ref' '
'
test_expect_success 'branch -D can delete badly named ref' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch -D broken...ref &&
git branch >output 2>error &&
@@ -98,17 +98,17 @@ test_expect_success 'branch -m cannot rename to a bad ref name' '
test_might_fail git branch -D goodref &&
git branch goodref &&
test_must_fail git branch -m goodref broken...ref &&
- test_cmp_rev master goodref &&
+ test_cmp_rev main goodref &&
git branch >output 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
'
test_expect_failure 'branch -m can rename from a bad ref name' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch -m broken...ref renamed &&
- test_cmp_rev master renamed &&
+ test_cmp_rev main renamed &&
git branch >output 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
@@ -135,7 +135,7 @@ test_expect_failure C_LOCALE_OUTPUT 'push --mirror can delete badly named ref' '
cd dest &&
test_commit two &&
git checkout --detach &&
- cp .git/refs/heads/master .git/refs/heads/broken...ref
+ cp .git/refs/heads/main .git/refs/heads/broken...ref
) &&
git -C src push --mirror "file://$top/dest" &&
git -C dest branch >output 2>error &&
@@ -146,7 +146,7 @@ test_expect_failure C_LOCALE_OUTPUT 'push --mirror can delete badly named ref' '
test_expect_success 'rev-parse skips symref pointing to broken name' '
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch shadow one &&
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/tags/shadow &&
test_when_finished "rm -f .git/refs/tags/shadow" &&
git rev-parse --verify one >expect &&
@@ -156,11 +156,11 @@ test_expect_success 'rev-parse skips symref pointing to broken name' '
'
test_expect_success 'for-each-ref emits warnings for broken names' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
- printf "ref: refs/heads/master\n" >.git/refs/heads/broken...symref &&
+ printf "ref: refs/heads/main\n" >.git/refs/heads/broken...symref &&
test_when_finished "rm -f .git/refs/heads/broken...symref" &&
git for-each-ref >output 2>error &&
! grep -e "broken\.\.\.ref" output &&
@@ -172,7 +172,7 @@ test_expect_success 'for-each-ref emits warnings for broken names' '
'
test_expect_success 'update-ref -d can delete broken name' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git update-ref -d refs/heads/broken...ref >output 2>error &&
test_must_be_empty output &&
@@ -183,7 +183,7 @@ test_expect_success 'update-ref -d can delete broken name' '
'
test_expect_success 'branch -d can delete broken name' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch -d broken...ref >output 2>error &&
test_i18ngrep "Deleted branch broken...ref (was broken)" output &&
@@ -194,7 +194,7 @@ test_expect_success 'branch -d can delete broken name' '
'
test_expect_success 'update-ref --no-deref -d can delete symref to broken name' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
@@ -205,7 +205,7 @@ test_expect_success 'update-ref --no-deref -d can delete symref to broken name'
'
test_expect_success 'branch -d can delete symref to broken name' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
@@ -234,7 +234,7 @@ test_expect_success 'branch -d can delete dangling symref to broken name' '
'
test_expect_success 'update-ref -d can delete broken name through symref' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ cp .git/refs/heads/main .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
@@ -245,7 +245,7 @@ test_expect_success 'update-ref -d can delete broken name through symref' '
'
test_expect_success 'update-ref --no-deref -d can delete symref with broken name' '
- printf "ref: refs/heads/master\n" >.git/refs/heads/broken...symref &&
+ printf "ref: refs/heads/main\n" >.git/refs/heads/broken...symref &&
test_when_finished "rm -f .git/refs/heads/broken...symref" &&
git update-ref --no-deref -d refs/heads/broken...symref >output 2>error &&
test_path_is_missing .git/refs/heads/broken...symref &&
@@ -254,11 +254,11 @@ test_expect_success 'update-ref --no-deref -d can delete symref with broken name
'
test_expect_success 'branch -d can delete symref with broken name' '
- printf "ref: refs/heads/master\n" >.git/refs/heads/broken...symref &&
+ printf "ref: refs/heads/main\n" >.git/refs/heads/broken...symref &&
test_when_finished "rm -f .git/refs/heads/broken...symref" &&
git branch -d broken...symref >output 2>error &&
test_path_is_missing .git/refs/heads/broken...symref &&
- test_i18ngrep "Deleted branch broken...symref (was refs/heads/master)" output &&
+ test_i18ngrep "Deleted branch broken...symref (was refs/heads/main)" output &&
test_must_be_empty error
'
@@ -296,37 +296,37 @@ test_expect_success 'update-ref -d cannot delete absolute path' '
'
test_expect_success 'update-ref --stdin fails create with bad ref name' '
- echo "create ~a refs/heads/master" >stdin &&
+ echo "create ~a refs/heads/main" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
'
test_expect_success 'update-ref --stdin fails update with bad ref name' '
- echo "update ~a refs/heads/master" >stdin &&
+ echo "update ~a refs/heads/main" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
'
test_expect_success 'update-ref --stdin fails delete with bad ref name' '
- echo "delete ~a refs/heads/master" >stdin &&
+ echo "delete ~a refs/heads/main" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
'
test_expect_success 'update-ref --stdin -z fails create with bad ref name' '
- printf "%s\0" "create ~a " refs/heads/master >stdin &&
+ printf "%s\0" "create ~a " refs/heads/main >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a " err
'
test_expect_success 'update-ref --stdin -z fails update with bad ref name' '
- printf "%s\0" "update ~a" refs/heads/master "" >stdin &&
+ printf "%s\0" "update ~a" refs/heads/main "" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
'
test_expect_success 'update-ref --stdin -z fails delete with bad ref name' '
- printf "%s\0" "delete ~a" refs/heads/master >stdin &&
+ printf "%s\0" "delete ~a" refs/heads/main >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
'
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index 344a2aad82..a7b70d6314 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -3,7 +3,7 @@
test_description='git fsck random collection of tests
* (HEAD) B
-* (master) A
+* (main) A
'
. ./test-lib.sh
diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh
index 603019b541..92ed2d69e3 100755
--- a/t/t1500-rev-parse.sh
+++ b/t/t1500-rev-parse.sh
@@ -175,8 +175,8 @@ test_expect_success 'showing the superproject correctly' '
test_commit -C super/dir/sub branch1_commit &&
git -C super add dir/sub &&
test_commit -C super branch1_commit &&
- git -C super checkout -b branch2 master &&
- git -C super/dir/sub checkout -b branch2 master &&
+ git -C super checkout -b branch2 main &&
+ git -C super/dir/sub checkout -b branch2 main &&
test_commit -C super/dir/sub branch2_commit &&
git -C super add dir/sub &&
test_commit -C super branch2_commit &&
diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh
index 492edffa9c..c19867ae29 100755
--- a/t/t1503-rev-parse-verify.sh
+++ b/t/t1503-rev-parse-verify.sh
@@ -51,8 +51,8 @@ test_expect_success 'works with one good rev' '
test "$rev_hash3" = "$HASH3" &&
rev_hash4=$(git rev-parse --verify $HASH4) &&
test "$rev_hash4" = "$HASH4" &&
- rev_master=$(git rev-parse --verify master) &&
- test "$rev_master" = "$HASH4" &&
+ rev_main=$(git rev-parse --verify main) &&
+ test "$rev_main" = "$HASH4" &&
rev_head=$(git rev-parse --verify HEAD) &&
test "$rev_head" = "$HASH4"
'
@@ -116,27 +116,27 @@ test_expect_success 'no stdout output on error' '
'
test_expect_success 'use --default' '
- git rev-parse --verify --default master &&
- git rev-parse --verify --default master HEAD &&
- git rev-parse --default master --verify &&
- git rev-parse --default master --verify HEAD &&
- git rev-parse --verify HEAD --default master &&
- test_must_fail git rev-parse --verify foo --default master &&
+ git rev-parse --verify --default main &&
+ git rev-parse --verify --default main HEAD &&
+ git rev-parse --default main --verify &&
+ git rev-parse --default main --verify HEAD &&
+ git rev-parse --verify HEAD --default main &&
+ test_must_fail git rev-parse --verify foo --default main &&
test_must_fail git rev-parse --default HEAD --verify bar &&
test_must_fail git rev-parse --verify --default HEAD baz &&
test_must_fail git rev-parse --default foo --verify &&
test_must_fail git rev-parse --verify --default bar
'
-test_expect_success 'master@{n} for various n' '
+test_expect_success 'main@{n} for various n' '
N=$(git reflog | wc -l) &&
Nm1=$(($N-1)) &&
Np1=$(($N+1)) &&
- git rev-parse --verify master@{0} &&
- git rev-parse --verify master@{1} &&
- git rev-parse --verify master@{$Nm1} &&
- test_must_fail git rev-parse --verify master@{$N} &&
- test_must_fail git rev-parse --verify master@{$Np1}
+ git rev-parse --verify main@{0} &&
+ git rev-parse --verify main@{1} &&
+ git rev-parse --verify main@{$Nm1} &&
+ test_must_fail git rev-parse --verify main@{$N} &&
+ test_must_fail git rev-parse --verify main@{$Np1}
'
test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '
diff --git a/t/t1505-rev-parse-last.sh b/t/t1505-rev-parse-last.sh
index 4969edb314..a64cd4ce14 100755
--- a/t/t1505-rev-parse-last.sh
+++ b/t/t1505-rev-parse-last.sh
@@ -20,12 +20,12 @@ test_expect_success 'setup' '
make_commit 3 &&
git checkout side &&
make_commit 4 &&
- git merge master &&
- git checkout master
+ git merge main &&
+ git checkout main
'
-# 1 -- 2 -- 3 master
+# 1 -- 2 -- 3 main
# \ \
# \ \
# --- 4 --- 5 side
@@ -49,7 +49,7 @@ test_expect_success '@{-1}@{1} works' '
'
test_expect_success '@{-2} works' '
- test_cmp_rev master @{-2}
+ test_cmp_rev main @{-2}
'
test_expect_success '@{-3} fails' '
diff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh
index dbf690b9c1..c6501842ae 100755
--- a/t/t1506-rev-parse-diagnosis.sh
+++ b/t/t1506-rev-parse-diagnosis.sh
@@ -137,10 +137,10 @@ test_expect_success 'incorrect file in :path and :N:path' '
'
test_expect_success 'invalid @{n} reference' '
- test_must_fail git rev-parse master@{99999} >output 2>error &&
+ test_must_fail git rev-parse main@{99999} >output 2>error &&
test_must_be_empty output &&
test_i18ngrep "log for [^ ]* only has [0-9][0-9]* entries" error &&
- test_must_fail git rev-parse --verify master@{99999} >output 2>error &&
+ test_must_fail git rev-parse --verify main@{99999} >output 2>error &&
test_must_be_empty output &&
test_i18ngrep "log for [^ ]* only has [0-9][0-9]* entries" error
'
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index dfc0d96d8a..d49998ceb6 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -10,20 +10,20 @@ test_expect_success 'setup' '
test_commit 1 &&
git checkout -b side &&
test_commit 2 &&
- git checkout master &&
+ git checkout main &&
git clone . clone &&
test_commit 3 &&
(cd clone &&
test_commit 4 &&
git branch --track my-side origin/side &&
- git branch --track local-master master &&
+ git branch --track local-main main &&
git branch --track fun@ny origin/side &&
git branch --track @funny origin/side &&
git branch --track funny@ origin/side &&
- git remote add -t master master-only .. &&
- git fetch master-only &&
+ git remote add -t main main-only .. &&
+ git fetch main-only &&
git branch bad-upstream &&
- git config branch.bad-upstream.remote master-only &&
+ git config branch.bad-upstream.remote main-only &&
git config branch.bad-upstream.merge refs/heads/side
)
'
@@ -39,7 +39,7 @@ error_message () {
}
test_expect_success '@{upstream} resolves to correct full name' '
- echo refs/remotes/origin/master >expect &&
+ echo refs/remotes/origin/main >expect &&
git -C clone rev-parse --symbolic-full-name @{upstream} >actual &&
test_cmp expect actual &&
git -C clone rev-parse --symbolic-full-name @{UPSTREAM} >actual &&
@@ -49,7 +49,7 @@ test_expect_success '@{upstream} resolves to correct full name' '
'
test_expect_success '@{u} resolves to correct full name' '
- echo refs/remotes/origin/master >expect &&
+ echo refs/remotes/origin/main >expect &&
git -C clone rev-parse --symbolic-full-name @{u} >actual &&
test_cmp expect actual &&
git -C clone rev-parse --symbolic-full-name @{U} >actual &&
@@ -132,7 +132,7 @@ test_expect_success 'checkout -b new my-side@{u} forks from the same' '
test_expect_success 'merge my-side@{u} records the correct name' '
(
cd clone &&
- git checkout master &&
+ git checkout main &&
test_might_fail git branch -D new &&
git branch -t new my-side@{u} &&
git merge -s ours new@{u} &&
@@ -143,24 +143,24 @@ test_expect_success 'merge my-side@{u} records the correct name' '
'
test_expect_success 'branch -d other@{u}' '
- git checkout -t -b other master &&
+ git checkout -t -b other main &&
git branch -d @{u} &&
- git for-each-ref refs/heads/master >actual &&
+ git for-each-ref refs/heads/main >actual &&
test_must_be_empty actual
'
test_expect_success 'checkout other@{u}' '
- git branch -f master HEAD &&
- git checkout -t -b another master &&
+ git branch -f main HEAD &&
+ git checkout -t -b another main &&
git checkout @{u} &&
git symbolic-ref HEAD >actual &&
- echo refs/heads/master >expect &&
+ echo refs/heads/main >expect &&
test_cmp expect actual
'
test_expect_success 'branch@{u} works when tracking a local branch' '
- echo refs/heads/master >expect &&
- git -C clone rev-parse --symbolic-full-name local-master@{u} >actual &&
+ echo refs/heads/main >expect &&
+ git -C clone rev-parse --symbolic-full-name local-main@{u} >actual &&
test_cmp expect actual
'
@@ -174,7 +174,7 @@ test_expect_success 'branch@{u} error message when no upstream' '
test_expect_success '@{u} error message when no upstream' '
cat >expect <<-EOF &&
- fatal: no upstream configured for branch ${SQ}master${SQ}
+ fatal: no upstream configured for branch ${SQ}main${SQ}
EOF
test_must_fail git rev-parse --verify @{u} 2>actual &&
test_i18ncmp expect actual
@@ -208,14 +208,14 @@ test_expect_success 'branch@{u} error message if upstream branch not fetched' '
test_expect_success 'pull works when tracking a local branch' '
(
cd clone &&
- git checkout local-master &&
+ git checkout local-main &&
git pull
)
'
# makes sense if the previous one succeeded
test_expect_success '@{u} works when tracking a local branch' '
- echo refs/heads/master >expect &&
+ echo refs/heads/main >expect &&
git -C clone rev-parse --symbolic-full-name @{u} >actual &&
test_cmp expect actual
'
@@ -224,7 +224,7 @@ test_expect_success 'log -g other@{u}' '
commit=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
commit $commit
- Reflog: master@{0} (C O Mitter <[email protected]>)
+ Reflog: main@{0} (C O Mitter <[email protected]>)
Reflog message: branch: Created from HEAD
Author: A U Thor <[email protected]>
Date: Thu Apr 7 15:15:13 2005 -0700
@@ -239,7 +239,7 @@ test_expect_success 'log -g other@{u}@{now}' '
commit=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
commit $commit
- Reflog: master@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <[email protected]>)
+ Reflog: main@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <[email protected]>)
Reflog message: branch: Created from HEAD
Author: A U Thor <[email protected]>
Date: Thu Apr 7 15:15:13 2005 -0700
diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh
index 4a9964e9dc..bda6e7900c 100755
--- a/t/t1508-at-combinations.sh
+++ b/t/t1508-at-combinations.sh
@@ -30,8 +30,8 @@ fail() {
}
test_expect_success 'setup' '
- test_commit master-one &&
- test_commit master-two &&
+ test_commit main-one &&
+ test_commit main-two &&
git checkout -b upstream-branch &&
test_commit upstream-one &&
test_commit upstream-two &&
@@ -47,7 +47,7 @@ test_expect_success 'setup' '
git checkout -b new-branch &&
test_commit new-one &&
test_commit new-two &&
- git branch -u master old-branch &&
+ git branch -u main old-branch &&
git branch -u upstream-branch new-branch
'
@@ -62,8 +62,8 @@ check "@{-1}@{1}" commit old-one
check "@{u}" ref refs/heads/upstream-branch
check "HEAD@{u}" ref refs/heads/upstream-branch
check "@{u}@{1}" commit upstream-one
-check "@{-1}@{u}" ref refs/heads/master
-check "@{-1}@{u}@{1}" commit master-one
+check "@{-1}@{u}" ref refs/heads/main
+check "@{-1}@{u}@{1}" commit main-one
check "@" commit new-two
check "@@{u}" ref refs/heads/upstream-branch
check "@@/at-test" ref refs/heads/@@/at-test
diff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh
index e0a49a651f..cc324bea52 100755
--- a/t/t1511-rev-parse-caret.sh
+++ b/t/t1511-rev-parse-caret.sh
@@ -15,7 +15,7 @@ test_expect_success 'setup' '
git commit -m Initial &&
git tag -a -m commit commit-tag &&
git branch ref &&
- git checkout master &&
+ git checkout main &&
echo modified >>a-blob &&
git add -u &&
git commit -m Modified &&
@@ -73,52 +73,52 @@ test_expect_success 'ref^{tag}' '
'
test_expect_success 'ref^{/.}' '
- git rev-parse master >expected &&
- git rev-parse master^{/.} >actual &&
+ git rev-parse main >expected &&
+ git rev-parse main^{/.} >actual &&
test_cmp expected actual
'
test_expect_success 'ref^{/non-existent}' '
- test_must_fail git rev-parse master^{/non-existent}
+ test_must_fail git rev-parse main^{/non-existent}
'
test_expect_success 'ref^{/Initial}' '
git rev-parse ref >expected &&
- git rev-parse master^{/Initial} >actual &&
+ git rev-parse main^{/Initial} >actual &&
test_cmp expected actual
'
test_expect_success 'ref^{/!Exp}' '
- test_must_fail git rev-parse master^{/!Exp}
+ test_must_fail git rev-parse main^{/!Exp}
'
test_expect_success 'ref^{/!}' '
- test_must_fail git rev-parse master^{/!}
+ test_must_fail git rev-parse main^{/!}
'
test_expect_success 'ref^{/!!Exp}' '
git rev-parse expref >expected &&
- git rev-parse master^{/!!Exp} >actual &&
+ git rev-parse main^{/!!Exp} >actual &&
test_cmp expected actual
'
test_expect_success 'ref^{/!-}' '
- test_must_fail git rev-parse master^{/!-}
+ test_must_fail git rev-parse main^{/!-}
'
test_expect_success 'ref^{/!-.}' '
- test_must_fail git rev-parse master^{/!-.}
+ test_must_fail git rev-parse main^{/!-.}
'
test_expect_success 'ref^{/!-non-existent}' '
- git rev-parse master >expected &&
- git rev-parse master^{/!-non-existent} >actual &&
+ git rev-parse main >expected &&
+ git rev-parse main^{/!-non-existent} >actual &&
test_cmp expected actual
'
test_expect_success 'ref^{/!-Changed}' '
git rev-parse expref >expected &&
- git rev-parse master^{/!-Changed} >actual &&
+ git rev-parse main^{/!-Changed} >actual &&
test_cmp expected actual
'
diff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh
index 18fa6cf40d..6b4481d36b 100755
--- a/t/t1512-rev-parse-disambiguation.sh
+++ b/t/t1512-rev-parse-disambiguation.sh
@@ -212,7 +212,7 @@ test_expect_success 'more history' '
side=$(git rev-parse HEAD) &&
# commit 000000000066
- git checkout master &&
+ git checkout main &&
# If you use recursive, merge will fail and you will need to
# clean up a0blgqsjc as well. If you use resolve, merge will
diff --git a/t/t1513-rev-parse-prefix.sh b/t/t1513-rev-parse-prefix.sh
index 87ec3ae714..f77e59121c 100755
--- a/t/t1513-rev-parse-prefix.sh
+++ b/t/t1513-rev-parse-prefix.sh
@@ -76,9 +76,9 @@ test_expect_success 'disambiguate path with valid prefix' '
'
test_expect_success 'file and refs with prefix' '
- git rev-parse --prefix sub1/ master file1 >actual &&
+ git rev-parse --prefix sub1/ main file1 >actual &&
cat <<-EOF >expected &&
- $(git rev-parse master)
+ $(git rev-parse main)
sub1/file1
EOF
test_cmp expected actual
diff --git a/t/t1514-rev-parse-push.sh b/t/t1514-rev-parse-push.sh
index 788cc91e45..e85b222e99 100755
--- a/t/t1514-rev-parse-push.sh
+++ b/t/t1514-rev-parse-push.sh
@@ -16,24 +16,24 @@ test_expect_success 'setup' '
git remote add other other.git &&
test_commit base &&
git push origin HEAD &&
- git branch --set-upstream-to=origin/master master &&
- git branch --track topic origin/master &&
+ git branch --set-upstream-to=origin/main main &&
+ git branch --track topic origin/main &&
git push origin topic &&
git push other topic
'
test_expect_success '@{push} with default=nothing' '
test_config push.default nothing &&
- test_must_fail git rev-parse master@{push} &&
- test_must_fail git rev-parse master@{PUSH} &&
- test_must_fail git rev-parse master@{PuSH}
+ test_must_fail git rev-parse main@{push} &&
+ test_must_fail git rev-parse main@{PUSH} &&
+ test_must_fail git rev-parse main@{PuSH}
'
test_expect_success '@{push} with default=simple' '
test_config push.default simple &&
- resolve master@{push} refs/remotes/origin/master &&
- resolve master@{PUSH} refs/remotes/origin/master &&
- resolve master@{pUSh} refs/remotes/origin/master
+ resolve main@{push} refs/remotes/origin/main &&
+ resolve main@{PUSH} refs/remotes/origin/main &&
+ resolve main@{pUSh} refs/remotes/origin/main
'
test_expect_success 'triangular @{push} fails with default=simple' '
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index 12a5568844..f3309045fe 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-index.sh
@@ -496,7 +496,7 @@ test_expect_success 'do not refresh null base index' '
test_commit initial &&
git checkout -b side-branch &&
test_commit extra &&
- git checkout master &&
+ git checkout main &&
git update-index --split-index &&
test_commit more &&
# must not write a new shareindex, or we wont catch the problem
diff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh
index fc9aad530e..d6468ad8f3 100755
--- a/t/t2007-checkout-symlink.sh
+++ b/t/t2007-checkout-symlink.sh
@@ -12,14 +12,14 @@ test_expect_success setup '
echo hello >frotz/filfre &&
git add frotz/filfre &&
test_tick &&
- git commit -m "master has file frotz/filfre" &&
+ git commit -m "main has file frotz/filfre" &&
git branch side &&
echo goodbye >nitfol &&
git add nitfol &&
test_tick &&
- git commit -m "master adds file nitfol" &&
+ git commit -m "main adds file nitfol" &&
git checkout side &&
@@ -34,13 +34,13 @@ test_expect_success setup '
test_expect_success 'switch from symlink to dir' '
- git checkout master
+ git checkout main
'
-test_expect_success 'Remove temporary directories & switch to master' '
+test_expect_success 'Remove temporary directories & switch to main' '
rm -fr frotz xyzzy nitfol &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'switch from dir to symlink' '
diff --git a/t/t2009-checkout-statinfo.sh b/t/t2009-checkout-statinfo.sh
index f3c2152087..91940f3c60 100755
--- a/t/t2009-checkout-statinfo.sh
+++ b/t/t2009-checkout-statinfo.sh
@@ -21,13 +21,13 @@ test_expect_success 'branch switching' '
git reset --hard &&
test "$(git diff-files --raw)" = "" &&
- git checkout master &&
+ git checkout main &&
test "$(git diff-files --raw)" = "" &&
git checkout side &&
test "$(git diff-files --raw)" = "" &&
- git checkout master &&
+ git checkout main &&
test "$(git diff-files --raw)" = ""
'
@@ -37,13 +37,13 @@ test_expect_success 'path checkout' '
git reset --hard &&
test "$(git diff-files --raw)" = "" &&
- git checkout master world &&
+ git checkout main world &&
test "$(git diff-files --raw)" = "" &&
git checkout side world &&
test "$(git diff-files --raw)" = "" &&
- git checkout master world &&
+ git checkout main world &&
test "$(git diff-files --raw)" = ""
'
diff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh
index 2e47fe01cf..64395479e8 100755
--- a/t/t2010-checkout-ambiguous.sh
+++ b/t/t2010-checkout-ambiguous.sh
@@ -17,7 +17,7 @@ test_expect_success 'reference must be a tree' '
'
test_expect_success 'branch switching' '
- test "refs/heads/master" = "$(git symbolic-ref HEAD)" &&
+ test "refs/heads/main" = "$(git symbolic-ref HEAD)" &&
git checkout world -- &&
test "refs/heads/world" = "$(git symbolic-ref HEAD)"
'
@@ -57,7 +57,7 @@ test_expect_success 'disambiguate checking out from a tree-ish' '
'
test_expect_success 'accurate error message with more than one ref' '
- test_must_fail git checkout HEAD master -- 2>actual &&
+ test_must_fail git checkout HEAD main -- 2>actual &&
test_i18ngrep 2 actual &&
test_i18ngrep "one reference expected, 2 given" actual
'
diff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh
index 0e8d56aa76..d92f8582ea 100755
--- a/t/t2011-checkout-invalid-head.sh
+++ b/t/t2011-checkout-invalid-head.sh
@@ -11,12 +11,12 @@ test_expect_success 'setup' '
'
test_expect_success 'checkout should not start branch from a tree' '
- test_must_fail git checkout -b newbranch master^{tree}
+ test_must_fail git checkout -b newbranch main^{tree}
'
-test_expect_success 'checkout master from invalid HEAD' '
+test_expect_success 'checkout main from invalid HEAD' '
echo $ZERO_OID >.git/HEAD &&
- git checkout master --
+ git checkout main --
'
test_expect_success 'checkout notices failure to lock HEAD' '
@@ -26,7 +26,7 @@ test_expect_success 'checkout notices failure to lock HEAD' '
'
test_expect_success 'create ref directory/file conflict scenario' '
- git update-ref refs/heads/outer/inner master &&
+ git update-ref refs/heads/outer/inner main &&
# do not rely on symbolic-ref to get a known state,
# as it may use the same code we are testing
@@ -37,12 +37,12 @@ test_expect_success 'create ref directory/file conflict scenario' '
test_expect_success 'checkout away from d/f HEAD (unpacked, to branch)' '
reset_to_df &&
- git checkout master
+ git checkout main
'
test_expect_success 'checkout away from d/f HEAD (unpacked, to detached)' '
reset_to_df &&
- git checkout --detach master
+ git checkout --detach main
'
test_expect_success 'pack refs' '
@@ -51,11 +51,11 @@ test_expect_success 'pack refs' '
test_expect_success 'checkout away from d/f HEAD (packed, to branch)' '
reset_to_df &&
- git checkout master
+ git checkout main
'
test_expect_success 'checkout away from d/f HEAD (packed, to detached)' '
reset_to_df &&
- git checkout --detach master
+ git checkout --detach main
'
test_done
diff --git a/t/t2012-checkout-last.sh b/t/t2012-checkout-last.sh
index e7ba8c505f..7a126337ca 100755
--- a/t/t2012-checkout-last.sh
+++ b/t/t2012-checkout-last.sh
@@ -24,7 +24,7 @@ test_expect_success 'first branch switch' '
test_expect_success '"checkout -" switches back' '
git checkout - &&
- test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
+ test "z$(git symbolic-ref HEAD)" = "zrefs/heads/main"
'
test_expect_success '"checkout -" switches forth' '
@@ -98,56 +98,56 @@ test_expect_success 'merge base test setup' '
git commit -m third
'
-test_expect_success 'another...master' '
+test_expect_success 'another...main' '
git checkout another &&
- git checkout another...master &&
- test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"
+ git checkout another...main &&
+ test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify main^)"
'
-test_expect_success '...master' '
+test_expect_success '...main' '
git checkout another &&
- git checkout ...master &&
- test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"
+ git checkout ...main &&
+ test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify main^)"
'
-test_expect_success 'master...' '
+test_expect_success 'main...' '
git checkout another &&
- git checkout master... &&
- test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"
+ git checkout main... &&
+ test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify main^)"
'
test_expect_success '"checkout -" works after a rebase A' '
- git checkout master &&
+ git checkout main &&
git checkout other &&
- git rebase master &&
+ git rebase main &&
git checkout - &&
- test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
+ test "z$(git symbolic-ref HEAD)" = "zrefs/heads/main"
'
test_expect_success '"checkout -" works after a rebase A B' '
- git branch moodle master~1 &&
- git checkout master &&
+ git branch moodle main~1 &&
+ git checkout main &&
git checkout other &&
- git rebase master moodle &&
+ git rebase main moodle &&
git checkout - &&
- test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
+ test "z$(git symbolic-ref HEAD)" = "zrefs/heads/main"
'
test_expect_success '"checkout -" works after a rebase -i A' '
- git checkout master &&
+ git checkout main &&
git checkout other &&
- git rebase -i master &&
+ git rebase -i main &&
git checkout - &&
- test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
+ test "z$(git symbolic-ref HEAD)" = "zrefs/heads/main"
'
test_expect_success '"checkout -" works after a rebase -i A B' '
- git branch foodle master~1 &&
- git checkout master &&
+ git branch foodle main~1 &&
+ git checkout main &&
git checkout other &&
- git rebase master foodle &&
+ git rebase main foodle &&
git checkout - &&
- test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
+ test "z$(git symbolic-ref HEAD)" = "zrefs/heads/main"
'
test_done
diff --git a/t/t2015-checkout-unborn.sh b/t/t2015-checkout-unborn.sh
index 37bdcedcc9..2b3e6dc27e 100755
--- a/t/t2015-checkout-unborn.sh
+++ b/t/t2015-checkout-unborn.sh
@@ -11,7 +11,7 @@ test_expect_success 'setup' '
git add file &&
git commit -m base
) &&
- git fetch parent master:origin
+ git fetch parent main:origin
'
test_expect_success 'checkout from unborn preserves untracked files' '
diff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh
index 655f278c5f..e2ce29c8e7 100755
--- a/t/t2017-checkout-orphan.sh
+++ b/t/t2017-checkout-orphan.sh
@@ -29,34 +29,34 @@ test_expect_success '--orphan creates a new orphan branch from HEAD' '
test_tick &&
git commit -m "Third Commit" &&
test_must_fail git rev-parse --verify HEAD^ &&
- git diff-tree --quiet master alpha
+ git diff-tree --quiet main alpha
'
test_expect_success '--orphan creates a new orphan branch from <start_point>' '
- git checkout master &&
- git checkout --orphan beta master^ &&
+ git checkout main &&
+ git checkout --orphan beta main^ &&
test_must_fail git rev-parse --verify HEAD &&
test "refs/heads/beta" = "$(git symbolic-ref HEAD)" &&
test_tick &&
git commit -m "Fourth Commit" &&
test_must_fail git rev-parse --verify HEAD^ &&
- git diff-tree --quiet master^ beta
+ git diff-tree --quiet main^ beta
'
test_expect_success '--orphan must be rejected with -b' '
- git checkout master &&
+ git checkout main &&
test_must_fail git checkout --orphan new -b newer &&
- test refs/heads/master = "$(git symbolic-ref HEAD)"
+ test refs/heads/main = "$(git symbolic-ref HEAD)"
'
test_expect_success '--orphan must be rejected with -t' '
- git checkout master &&
- test_must_fail git checkout --orphan new -t master &&
- test refs/heads/master = "$(git symbolic-ref HEAD)"
+ git checkout main &&
+ test_must_fail git checkout --orphan new -t main &&
+ test refs/heads/main = "$(git symbolic-ref HEAD)"
'
test_expect_success '--orphan ignores branch.autosetupmerge' '
- git checkout master &&
+ git checkout main &&
git config branch.autosetupmerge always &&
git checkout --orphan gamma &&
test -z "$(git config branch.gamma.merge)" &&
@@ -65,7 +65,7 @@ test_expect_success '--orphan ignores branch.autosetupmerge' '
'
test_expect_success '--orphan makes reflog by default' '
- git checkout master &&
+ git checkout main &&
git config --unset core.logAllRefUpdates &&
git checkout --orphan delta &&
test_must_fail git rev-parse --verify delta@{0} &&
@@ -74,7 +74,7 @@ test_expect_success '--orphan makes reflog by default' '
'
test_expect_success '--orphan does not make reflog when core.logAllRefUpdates = false' '
- git checkout master &&
+ git checkout main &&
git config core.logAllRefUpdates false &&
git checkout --orphan epsilon &&
test_must_fail git rev-parse --verify epsilon@{0} &&
@@ -83,7 +83,7 @@ test_expect_success '--orphan does not make reflog when core.logAllRefUpdates =
'
test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates = false' '
- git checkout master &&
+ git checkout main &&
git checkout -l --orphan zeta &&
test_must_fail git rev-parse --verify zeta@{0} &&
git commit -m Zeta &&
@@ -91,33 +91,33 @@ test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates =
'
test_expect_success 'giving up --orphan not committed when -l and core.logAllRefUpdates = false deletes reflog' '
- git checkout master &&
+ git checkout main &&
git checkout -l --orphan eta &&
test_must_fail git rev-parse --verify eta@{0} &&
- git checkout master &&
+ git checkout main &&
test_must_fail git rev-parse --verify eta@{0}
'
test_expect_success '--orphan is rejected with an existing name' '
- git checkout master &&
- test_must_fail git checkout --orphan master &&
- test refs/heads/master = "$(git symbolic-ref HEAD)"
+ git checkout main &&
+ test_must_fail git checkout --orphan main &&
+ test refs/heads/main = "$(git symbolic-ref HEAD)"
'
test_expect_success '--orphan refuses to switch if a merge is needed' '
- git checkout master &&
+ git checkout main &&
git reset --hard &&
echo local >>"$TEST_FILE" &&
cat "$TEST_FILE" >"$TEST_FILE.saved" &&
- test_must_fail git checkout --orphan new master^ &&
- test refs/heads/master = "$(git symbolic-ref HEAD)" &&
+ test_must_fail git checkout --orphan new main^ &&
+ test refs/heads/main = "$(git symbolic-ref HEAD)" &&
test_cmp "$TEST_FILE" "$TEST_FILE.saved" &&
git diff-index --quiet --cached HEAD &&
git reset --hard
'
test_expect_success 'cannot --detach on an unborn branch' '
- git checkout master &&
+ git checkout main &&
git checkout --orphan new &&
test_must_fail git checkout --detach
'
diff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh
index b748db9946..25885c3065 100755
--- a/t/t2020-checkout-detach.sh
+++ b/t/t2020-checkout-detach.sh
@@ -22,7 +22,7 @@ check_no_orphan_warning() {
}
reset () {
- git checkout master &&
+ git checkout main &&
check_not_detached
}
@@ -85,7 +85,7 @@ test_expect_success 'checkout --detach errors out for non-commit' '
test_expect_success 'checkout --detach errors out for extra argument' '
reset &&
- git checkout master &&
+ git checkout main &&
test_must_fail git checkout --detach tag one.t &&
check_not_detached
'
@@ -113,7 +113,7 @@ test_expect_success 'checkout warns on orphan commits' '
echo new content >orphan &&
git commit -a -m orphan2 &&
orphan2=$(git rev-parse HEAD) &&
- git checkout master 2>stderr
+ git checkout main 2>stderr
'
test_expect_success 'checkout warns on orphan commits: output' '
@@ -132,7 +132,7 @@ test_expect_success 'checkout warns orphaning 1 of 2 commits: output' '
test_expect_success 'checkout does not warn leaving ref tip' '
reset &&
git checkout --detach two &&
- git checkout master 2>stderr
+ git checkout main 2>stderr
'
test_expect_success 'checkout does not warn leaving ref tip' '
@@ -142,7 +142,7 @@ test_expect_success 'checkout does not warn leaving ref tip' '
test_expect_success 'checkout does not warn leaving reachable commit' '
reset &&
git checkout --detach HEAD^ &&
- git checkout master 2>stderr
+ git checkout main 2>stderr
'
test_expect_success 'checkout does not warn leaving reachable commit' '
@@ -150,14 +150,14 @@ test_expect_success 'checkout does not warn leaving reachable commit' '
'
cat >expect <<'EOF'
-Your branch is behind 'master' by 1 commit, and can be fast-forwarded.
+Your branch is behind 'main' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
EOF
test_expect_success 'tracking count is accurate after orphan check' '
reset &&
- git branch child master^ &&
+ git branch child main^ &&
git config branch.child.remote . &&
- git config branch.child.merge refs/heads/master &&
+ git config branch.child.merge refs/heads/main &&
git checkout child^ &&
git checkout child >stdout &&
test_i18ncmp expect stdout
@@ -189,9 +189,9 @@ test_expect_success 'no advice given for explicit detached head state' '
# Detached HEAD tests for GIT_PRINT_SHA1_ELLIPSIS (new format)
test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not asked to' "
- commit=$(git rev-parse --short=12 master^) &&
- commit2=$(git rev-parse --short=12 master~2) &&
- commit3=$(git rev-parse --short=12 master~3) &&
+ commit=$(git rev-parse --short=12 main^) &&
+ commit2=$(git rev-parse --short=12 main~2) &&
+ commit3=$(git rev-parse --short=12 main~3) &&
# The first detach operation is more chatty than the following ones.
cat >1st_detach <<-EOF &&
@@ -271,9 +271,9 @@ test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not as
# Detached HEAD tests for GIT_PRINT_SHA1_ELLIPSIS (old format)
test_expect_success 'describe_detached_head does print SHA-1 ellipsis when asked to' "
- commit=$(git rev-parse --short=12 master^) &&
- commit2=$(git rev-parse --short=12 master~2) &&
- commit3=$(git rev-parse --short=12 master~3) &&
+ commit=$(git rev-parse --short=12 main^) &&
+ commit2=$(git rev-parse --short=12 main~2) &&
+ commit3=$(git rev-parse --short=12 main~3) &&
# The first detach operation is more chatty than the following ones.
cat >1st_detach <<-EOF &&
diff --git a/t/t2022-checkout-paths.sh b/t/t2022-checkout-paths.sh
index 6844afafc0..4174620cf4 100755
--- a/t/t2022-checkout-paths.sh
+++ b/t/t2022-checkout-paths.sh
@@ -5,15 +5,15 @@ test_description='checkout $tree -- $paths'
test_expect_success setup '
mkdir dir &&
- >dir/master &&
+ >dir/main &&
echo common >dir/common &&
- git add dir/master dir/common &&
- test_tick && git commit -m "master has dir/master" &&
+ git add dir/main dir/common &&
+ test_tick && git commit -m "main has dir/main" &&
git checkout -b next &&
- git mv dir/master dir/next0 &&
+ git mv dir/main dir/next0 &&
echo next >dir/next1 &&
git add dir &&
- test_tick && git commit -m "next has dir/next but not dir/master"
+ test_tick && git commit -m "next has dir/next but not dir/main"
'
test_expect_success 'checking out paths out of a tree does not clobber unrelated paths' '
@@ -26,11 +26,11 @@ test_expect_success 'checking out paths out of a tree does not clobber unrelated
echo untracked >expect.next2 &&
cat expect.next2 >dir/next2 &&
- git checkout master dir &&
+ git checkout main dir &&
test_cmp expect.common dir/common &&
- test_path_is_file dir/master &&
- git diff --exit-code master dir/master &&
+ test_path_is_file dir/main &&
+ git diff --exit-code main dir/main &&
test_path_is_missing dir/next0 &&
test_cmp expect.next1 dir/next1 &&
@@ -52,11 +52,11 @@ test_expect_success 'do not touch unmerged entries matching $path but not in $tr
EOF
git update-index --index-info <expect.next0 &&
- git checkout master dir &&
+ git checkout main dir &&
test_cmp expect.common dir/common &&
- test_path_is_file dir/master &&
- git diff --exit-code master dir/master &&
+ test_path_is_file dir/main &&
+ git diff --exit-code main dir/main &&
git ls-files -s dir/next0 >actual.next0 &&
test_cmp expect.next0 actual.next0
'
diff --git a/t/t2023-checkout-m.sh b/t/t2023-checkout-m.sh
index fca3f85824..ddcfcc3e9b 100755
--- a/t/t2023-checkout-m.sh
+++ b/t/t2023-checkout-m.sh
@@ -10,15 +10,15 @@ test_expect_success setup '
test_tick &&
test_commit both.txt both.txt initial &&
git branch topic &&
- test_commit modified_in_master both.txt in_master &&
- test_commit added_in_master each.txt in_master &&
+ test_commit modified_in_main both.txt in_main &&
+ test_commit added_in_main each.txt in_main &&
git checkout topic &&
test_commit modified_in_topic both.txt in_topic &&
test_commit added_in_topic each.txt in_topic
'
-test_expect_success 'git merge master' '
- test_must_fail git merge master
+test_expect_success 'git merge main' '
+ test_must_fail git merge main
'
clean_branchnames () {
@@ -61,7 +61,7 @@ test_expect_success 'force checkout a conflict file creates stage zero entry' '
git checkout topic &&
echo c >a &&
C_OBJ=$(git hash-object a) &&
- git checkout -m master &&
+ git checkout -m main &&
test_cmp_rev :1:a $A_OBJ &&
test_cmp_rev :2:a $B_OBJ &&
test_cmp_rev :3:a $C_OBJ &&
diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh
index accfa9aa4b..e3940a541a 100755
--- a/t/t2024-checkout-dwim.sh
+++ b/t/t2024-checkout-dwim.sh
@@ -29,11 +29,11 @@ status_uno_is_clean () {
}
test_expect_success 'setup' '
- test_commit my_master &&
+ test_commit my_main &&
git init repo_a &&
(
cd repo_a &&
- test_commit a_master &&
+ test_commit a_main &&
git checkout -b foo &&
test_commit a_foo &&
git checkout -b bar &&
@@ -44,7 +44,7 @@ test_expect_success 'setup' '
git init repo_b &&
(
cd repo_b &&
- test_commit b_master &&
+ test_commit b_main &&
git checkout -b foo &&
test_commit b_foo &&
git checkout -b baz &&
@@ -60,23 +60,23 @@ test_expect_success 'setup' '
'
test_expect_success 'checkout of non-existing branch fails' '
- git checkout -B master &&
+ git checkout -B main &&
test_might_fail git branch -D xyzzy &&
test_must_fail git checkout xyzzy &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/xyzzy &&
- test_branch master
+ test_branch main
'
test_expect_success 'checkout of branch from multiple remotes fails #1' '
- git checkout -B master &&
+ git checkout -B main &&
test_might_fail git branch -D foo &&
test_must_fail git checkout foo &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/foo &&
- test_branch master
+ test_branch main
'
test_expect_success 'when arg matches multiple remotes, do not fallback to interpreting as pathspec' '
@@ -100,21 +100,21 @@ test_expect_success 'when arg matches multiple remotes, do not fallback to inter
'
test_expect_success 'checkout of branch from multiple remotes fails with advice' '
- git checkout -B master &&
+ git checkout -B main &&
test_might_fail git branch -D foo &&
test_must_fail git checkout foo 2>stderr &&
- test_branch master &&
+ test_branch main &&
status_uno_is_clean &&
test_i18ngrep "^hint: " stderr &&
test_must_fail git -c advice.checkoutAmbiguousRemoteBranchName=false \
checkout foo 2>stderr &&
- test_branch master &&
+ test_branch main &&
status_uno_is_clean &&
test_i18ngrep ! "^hint: " stderr
'
test_expect_success PERL 'checkout -p with multiple remotes does not print advice' '
- git checkout -B master &&
+ git checkout -B main &&
test_might_fail git branch -D foo &&
git checkout -p foo 2>stderr &&
@@ -123,7 +123,7 @@ test_expect_success PERL 'checkout -p with multiple remotes does not print advic
'
test_expect_success 'checkout of branch from multiple remotes succeeds with checkout.defaultRemote #1' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D foo &&
@@ -135,7 +135,7 @@ test_expect_success 'checkout of branch from multiple remotes succeeds with chec
'
test_expect_success 'checkout of branch from a single remote succeeds #1' '
- git checkout -B master &&
+ git checkout -B main &&
test_might_fail git branch -D bar &&
git checkout bar &&
@@ -146,7 +146,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #1' '
'
test_expect_success 'checkout of branch from a single remote succeeds #2' '
- git checkout -B master &&
+ git checkout -B main &&
test_might_fail git branch -D baz &&
git checkout baz &&
@@ -157,22 +157,22 @@ test_expect_success 'checkout of branch from a single remote succeeds #2' '
'
test_expect_success '--no-guess suppresses branch auto-vivification' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D bar &&
test_must_fail git checkout --no-guess bar &&
test_must_fail git rev-parse --verify refs/heads/bar &&
- test_branch master
+ test_branch main
'
test_expect_success 'setup more remotes with unconventional refspecs' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
git init repo_c &&
(
cd repo_c &&
- test_commit c_master &&
+ test_commit c_main &&
git checkout -b bar &&
test_commit c_bar &&
git checkout -b spam &&
@@ -181,7 +181,7 @@ test_expect_success 'setup more remotes with unconventional refspecs' '
git init repo_d &&
(
cd repo_d &&
- test_commit d_master &&
+ test_commit d_main &&
git checkout -b baz &&
test_commit d_baz &&
git checkout -b eggs &&
@@ -197,29 +197,29 @@ test_expect_success 'setup more remotes with unconventional refspecs' '
'
test_expect_success 'checkout of branch from multiple remotes fails #2' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D bar &&
test_must_fail git checkout bar &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/bar &&
- test_branch master
+ test_branch main
'
test_expect_success 'checkout of branch from multiple remotes fails #3' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D baz &&
test_must_fail git checkout baz &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/baz &&
- test_branch master
+ test_branch main
'
test_expect_success 'checkout of branch from a single remote succeeds #3' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D spam &&
@@ -231,7 +231,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #3' '
'
test_expect_success 'checkout of branch from a single remote succeeds #4' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D eggs &&
@@ -243,7 +243,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #4' '
'
test_expect_success 'checkout of branch with a file having the same name fails' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D spam &&
@@ -251,11 +251,11 @@ test_expect_success 'checkout of branch with a file having the same name fails'
test_must_fail git checkout spam &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/spam &&
- test_branch master
+ test_branch main
'
test_expect_success 'checkout of branch with a file in subdir having the same name fails' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D spam &&
@@ -265,11 +265,11 @@ test_expect_success 'checkout of branch with a file in subdir having the same na
test_must_fail git -C sub checkout spam &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/spam &&
- test_branch master
+ test_branch main
'
test_expect_success 'checkout <branch> -- succeeds, even if a file with the same name exists' '
- git checkout -B master &&
+ git checkout -B main &&
status_uno_is_clean &&
test_might_fail git branch -D spam &&
@@ -283,7 +283,7 @@ test_expect_success 'checkout <branch> -- succeeds, even if a file with the same
test_expect_success 'loosely defined local base branch is reported correctly' '
- git checkout master &&
+ git checkout main &&
status_uno_is_clean &&
git branch strict &&
git branch loose &&
@@ -291,8 +291,8 @@ test_expect_success 'loosely defined local base branch is reported correctly' '
test_config branch.strict.remote . &&
test_config branch.loose.remote . &&
- test_config branch.strict.merge refs/heads/master &&
- test_config branch.loose.merge master &&
+ test_config branch.strict.merge refs/heads/main &&
+ test_config branch.loose.merge main &&
git checkout strict | sed -e "s/strict/BRANCHNAME/g" >expect &&
status_uno_is_clean &&
diff --git a/t/t2027-checkout-track.sh b/t/t2027-checkout-track.sh
index bcba1bf90c..bc46c5a68e 100755
--- a/t/t2027-checkout-track.sh
+++ b/t/t2027-checkout-track.sh
@@ -10,14 +10,14 @@ test_expect_success 'setup' '
'
test_expect_success 'checkout --track -b creates a new tracking branch' '
- git checkout --track -b branch1 master &&
+ git checkout --track -b branch1 main &&
test $(git rev-parse --abbrev-ref HEAD) = branch1 &&
test $(git config --get branch.branch1.remote) = . &&
- test $(git config --get branch.branch1.merge) = refs/heads/master
+ test $(git config --get branch.branch1.merge) = refs/heads/main
'
test_expect_success 'checkout --track -b rejects an extra path argument' '
- test_must_fail git checkout --track -b branch2 master one.t 2>err &&
+ test_must_fail git checkout --track -b branch2 main one.t 2>err &&
test_i18ngrep "cannot be used with updating paths" err
'
diff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh
index 309199bca2..3cdd73c172 100755
--- a/t/t2030-unresolve-info.sh
+++ b/t/t2030-unresolve-info.sh
@@ -59,7 +59,7 @@ test_expect_success setup '
test_commit fourth fi/le fourth &&
git checkout add-add &&
test_commit fifth add-differently &&
- git checkout master
+ git checkout main
'
test_expect_success 'add records switch clears' '
@@ -183,8 +183,8 @@ test_expect_success 'rerere forget (binary)' '
'
test_expect_success 'rerere forget (add-add conflict)' '
- git checkout -f master &&
- echo master >add-differently &&
+ git checkout -f main &&
+ echo main >add-differently &&
git add add-differently &&
git commit -m "add differently" &&
test_must_fail git merge fifth &&
diff --git a/t/t2060-switch.sh b/t/t2060-switch.sh
index 2c1b8c0d6d..c50fab169d 100755
--- a/t/t2060-switch.sh
+++ b/t/t2060-switch.sh
@@ -23,41 +23,41 @@ test_expect_success 'switch branch' '
'
test_expect_success 'switch and detach' '
- test_when_finished git switch master &&
- test_must_fail git switch master^{commit} &&
- git switch --detach master^{commit} &&
+ test_when_finished git switch main &&
+ test_must_fail git switch main^{commit} &&
+ git switch --detach main^{commit} &&
test_must_fail git symbolic-ref HEAD
'
test_expect_success 'switch and detach current branch' '
- test_when_finished git switch master &&
- git switch master &&
+ test_when_finished git switch main &&
+ git switch main &&
git switch --detach &&
test_must_fail git symbolic-ref HEAD
'
test_expect_success 'switch and create branch' '
- test_when_finished git switch master &&
- git switch -c temp master^ &&
- test_cmp_rev master^ refs/heads/temp &&
+ test_when_finished git switch main &&
+ git switch -c temp main^ &&
+ test_cmp_rev main^ refs/heads/temp &&
echo refs/heads/temp >expected-branch &&
git symbolic-ref HEAD >actual-branch &&
test_cmp expected-branch actual-branch
'
test_expect_success 'force create branch from HEAD' '
- test_when_finished git switch master &&
- git switch --detach master &&
+ test_when_finished git switch main &&
+ git switch --detach main &&
test_must_fail git switch -c temp &&
git switch -C temp &&
- test_cmp_rev master refs/heads/temp &&
+ test_cmp_rev main refs/heads/temp &&
echo refs/heads/temp >expected-branch &&
git symbolic-ref HEAD >actual-branch &&
test_cmp expected-branch actual-branch
'
test_expect_success 'new orphan branch from empty' '
- test_when_finished git switch master &&
+ test_when_finished git switch main &&
test_must_fail git switch --orphan new-orphan HEAD &&
git switch --orphan new-orphan &&
test_commit orphan &&
@@ -69,7 +69,7 @@ test_expect_success 'new orphan branch from empty' '
'
test_expect_success 'orphan branch works with --discard-changes' '
- test_when_finished git switch master &&
+ test_when_finished git switch main &&
echo foo >foo.txt &&
git switch --discard-changes --orphan new-orphan2 &&
git ls-files >tracked-files &&
@@ -77,7 +77,7 @@ test_expect_success 'orphan branch works with --discard-changes' '
'
test_expect_success 'switching ignores file of same branch name' '
- test_when_finished git switch master &&
+ test_when_finished git switch main &&
: >first-branch &&
git switch first-branch &&
echo refs/heads/first-branch >expected &&
@@ -86,7 +86,7 @@ test_expect_success 'switching ignores file of same branch name' '
'
test_expect_success 'guess and create branch ' '
- test_when_finished git switch master &&
+ test_when_finished git switch main &&
test_must_fail git switch --no-guess foo &&
git switch foo &&
echo refs/heads/foo >expected &&
diff --git a/t/t2070-restore.sh b/t/t2070-restore.sh
index 89e5a142c9..46e27212d6 100755
--- a/t/t2070-restore.sh
+++ b/t/t2070-restore.sh
@@ -15,7 +15,7 @@ test_expect_success 'setup' '
echo ignored >ignored &&
echo /ignored >.gitignore &&
git add one two .gitignore &&
- git update-ref refs/heads/one master
+ git update-ref refs/heads/one main
'
test_expect_success 'restore without pathspec is not ok' '
@@ -91,7 +91,7 @@ test_expect_success 'restore --ignore-unmerged ignores unmerged entries' '
git switch -c first &&
echo first >unmerged &&
git commit -am first &&
- git switch -c second master &&
+ git switch -c second main &&
echo second >unmerged &&
git commit -am second &&
test_must_fail git merge first &&
diff --git a/t/t2106-update-index-assume-unchanged.sh b/t/t2106-update-index-assume-unchanged.sh
index 99d858c6b7..2b923824c9 100755
--- a/t/t2106-update-index-assume-unchanged.sh
+++ b/t/t2106-update-index-assume-unchanged.sh
@@ -19,6 +19,6 @@ test_expect_success 'do not switch branches with dirty file' \
git checkout other &&
echo dirt >file &&
git update-index --assume-unchanged file &&
- test_must_fail git checkout master'
+ test_must_fail git checkout main'
test_done
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh
index 5a7495474a..deca7b0271 100755
--- a/t/t2400-worktree-add.sh
+++ b/t/t2400-worktree-add.sh
@@ -12,12 +12,12 @@ test_expect_success 'setup' '
test_expect_success '"add" an existing worktree' '
mkdir -p existing/subtree &&
- test_must_fail git worktree add --detach existing master
+ test_must_fail git worktree add --detach existing main
'
test_expect_success '"add" an existing empty worktree' '
mkdir existing_empty &&
- git worktree add --detach existing_empty master
+ git worktree add --detach existing_empty main
'
test_expect_success '"add" using shorthand - fails when no previous branch' '
@@ -29,7 +29,7 @@ test_expect_success '"add" using - shorthand' '
echo hello >myworld &&
git add myworld &&
git commit -m myworld &&
- git checkout master &&
+ git checkout main &&
git worktree add short-hand - &&
echo refs/heads/newbranch >expect &&
git -C short-hand rev-parse --symbolic-full-name HEAD >actual &&
@@ -37,7 +37,7 @@ test_expect_success '"add" using - shorthand' '
'
test_expect_success '"add" refuses to checkout locked branch' '
- test_must_fail git worktree add zere master &&
+ test_must_fail git worktree add zere main &&
! test -d zere &&
! test -d .git/worktrees/zere
'
@@ -46,13 +46,13 @@ test_expect_success 'checking out paths not complaining about linked checkouts'
(
cd existing_empty &&
echo dirty >>init.t &&
- git checkout master -- init.t
+ git checkout main -- init.t
)
'
test_expect_success '"add" worktree' '
git rev-parse HEAD >expect &&
- git worktree add --detach here master &&
+ git worktree add --detach here main &&
(
cd here &&
test_cmp ../init.t init.t &&
@@ -65,7 +65,7 @@ test_expect_success '"add" worktree' '
test_expect_success '"add" worktree with lock' '
git rev-parse HEAD >expect &&
- git worktree add --detach --lock here-with-lock master &&
+ git worktree add --detach --lock here-with-lock main &&
test -f .git/worktrees/here-with-lock/locked
'
@@ -73,7 +73,7 @@ test_expect_success '"add" worktree from a subdir' '
(
mkdir sub &&
cd sub &&
- git worktree add --detach here master &&
+ git worktree add --detach here main &&
cd here &&
test_cmp ../../init.t init.t
)
@@ -82,19 +82,19 @@ test_expect_success '"add" worktree from a subdir' '
test_expect_success '"add" from a linked checkout' '
(
cd here &&
- git worktree add --detach nested-here master &&
+ git worktree add --detach nested-here main &&
cd nested-here &&
git fsck
)
'
test_expect_success '"add" worktree creating new branch' '
- git worktree add -b newmaster there master &&
+ git worktree add -b newmain there main &&
(
cd there &&
test_cmp ../init.t init.t &&
git symbolic-ref HEAD >actual &&
- echo refs/heads/newmaster >expect &&
+ echo refs/heads/newmain >expect &&
test_cmp expect actual &&
git fsck
)
@@ -103,7 +103,7 @@ test_expect_success '"add" worktree creating new branch' '
test_expect_success 'die the same branch is already checked out' '
(
cd here &&
- test_must_fail git checkout newmaster
+ test_must_fail git checkout newmain
)
'
@@ -112,20 +112,20 @@ test_expect_success SYMLINKS 'die the same branch is already checked out (symlin
ref=$(git -C there symbolic-ref HEAD) &&
rm "$head" &&
ln -s "$ref" "$head" &&
- test_must_fail git -C here checkout newmaster
+ test_must_fail git -C here checkout newmain
'
test_expect_success 'not die the same branch is already checked out' '
(
cd here &&
- git worktree add --force anothernewmaster newmaster
+ git worktree add --force anothernewmain newmain
)
'
test_expect_success 'not die on re-checking out current branch' '
(
cd there &&
- git checkout newmaster
+ git checkout newmain
)
'
@@ -133,14 +133,14 @@ test_expect_success '"add" from a bare repo' '
(
git clone --bare . bare &&
cd bare &&
- git worktree add -b bare-master ../there2 master
+ git worktree add -b bare-main ../there2 main
)
'
test_expect_success 'checkout from a bare repo without "add"' '
(
cd bare &&
- test_must_fail git checkout master
+ test_must_fail git checkout main
)
'
@@ -148,7 +148,7 @@ test_expect_success '"add" default branch of a bare repo' '
(
git clone --bare . bare2 &&
cd bare2 &&
- git worktree add ../there3 master
+ git worktree add ../there3 main
)
'
@@ -165,7 +165,7 @@ test_expect_success 'checkout with grafts' '
EOF
git log --format=%s -2 >actual &&
test_cmp expected actual &&
- git worktree add --detach grafted master &&
+ git worktree add --detach grafted main &&
git --git-dir=grafted/.git log --format=%s -2 >actual &&
test_cmp expected actual
'
@@ -226,34 +226,34 @@ test_expect_success '"add" no auto-vivify with --detach and <branch> omitted' '
'
test_expect_success '"add" -b/-B mutually exclusive' '
- test_must_fail git worktree add -b poodle -B poodle bamboo master
+ test_must_fail git worktree add -b poodle -B poodle bamboo main
'
test_expect_success '"add" -b/--detach mutually exclusive' '
- test_must_fail git worktree add -b poodle --detach bamboo master
+ test_must_fail git worktree add -b poodle --detach bamboo main
'
test_expect_success '"add" -B/--detach mutually exclusive' '
- test_must_fail git worktree add -B poodle --detach bamboo master
+ test_must_fail git worktree add -B poodle --detach bamboo main
'
test_expect_success '"add -B" fails if the branch is checked out' '
- git rev-parse newmaster >before &&
- test_must_fail git worktree add -B newmaster bamboo master &&
- git rev-parse newmaster >after &&
+ git rev-parse newmain >before &&
+ test_must_fail git worktree add -B newmain bamboo main &&
+ git rev-parse newmain >after &&
test_cmp before after
'
test_expect_success 'add -B' '
- git worktree add -B poodle bamboo2 master^ &&
+ git worktree add -B poodle bamboo2 main^ &&
git -C bamboo2 symbolic-ref HEAD >actual &&
echo refs/heads/poodle >expected &&
test_cmp expected actual &&
- test_cmp_rev master^ poodle
+ test_cmp_rev main^ poodle
'
test_expect_success 'add --quiet' '
- git worktree add --quiet another-worktree master 2>actual &&
+ git worktree add --quiet another-worktree main 2>actual &&
test_must_be_empty actual
'
@@ -348,24 +348,24 @@ test_branch_upstream () {
test_expect_success '--track sets up tracking' '
test_when_finished rm -rf track &&
- git worktree add --track -b track track master &&
- test_branch_upstream track . master
+ git worktree add --track -b track track main &&
+ test_branch_upstream track . main
'
# setup remote repository $1 and repository $2 with $1 set up as
-# remote. The remote has two branches, master and foo.
+# remote. The remote has two branches, main and foo.
setup_remote_repo () {
git init $1 &&
(
cd $1 &&
- test_commit $1_master &&
+ test_commit $1_main &&
git checkout -b foo &&
test_commit upstream_foo
) &&
git init $2 &&
(
cd $2 &&
- test_commit $2_master &&
+ test_commit $2_main &&
git remote add $1 ../$1 &&
git config remote.$1.fetch \
"refs/heads/*:refs/remotes/$1/*" &&
diff --git a/t/t2401-worktree-prune.sh b/t/t2401-worktree-prune.sh
index b7d6d5d45a..4059c3b2ce 100755
--- a/t/t2401-worktree-prune.sh
+++ b/t/t2401-worktree-prune.sh
@@ -87,7 +87,7 @@ test_expect_success 'not prune recent checkouts' '
test_expect_success 'not prune proper checkouts' '
test_when_finished rm -r .git/worktrees &&
- git worktree add --detach "$PWD/nop" master &&
+ git worktree add --detach "$PWD/nop" main &&
git worktree prune &&
test -d .git/worktrees/nop
'
diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh
index 52585ec2aa..b465a0fc23 100755
--- a/t/t2402-worktree-list.sh
+++ b/t/t2402-worktree-list.sh
@@ -21,7 +21,7 @@ test_expect_success 'rev-parse --git-common-dir on main worktree' '
test_expect_success 'rev-parse --git-path objects linked worktree' '
echo "$(git rev-parse --show-toplevel)/.git/objects" >expect &&
test_when_finished "rm -rf linked-tree actual expect && git worktree prune" &&
- git worktree add --detach linked-tree master &&
+ git worktree add --detach linked-tree main &&
git -C linked-tree rev-parse --git-path objects >actual &&
test_cmp expect actual
'
@@ -29,7 +29,7 @@ test_expect_success 'rev-parse --git-path objects linked worktree' '
test_expect_success '"list" all worktrees from main' '
echo "$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]" >expect &&
test_when_finished "rm -rf here out actual expect && git worktree prune" &&
- git worktree add --detach here master &&
+ git worktree add --detach here main &&
echo "$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)" >>expect &&
git worktree list >out &&
sed "s/ */ /g" <out >actual &&
@@ -39,7 +39,7 @@ test_expect_success '"list" all worktrees from main' '
test_expect_success '"list" all worktrees from linked' '
echo "$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]" >expect &&
test_when_finished "rm -rf here out actual expect && git worktree prune" &&
- git worktree add --detach here master &&
+ git worktree add --detach here main &&
echo "$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)" >>expect &&
git -C here worktree list >out &&
sed "s/ */ /g" <out >actual &&
@@ -52,7 +52,7 @@ test_expect_success '"list" all worktrees --porcelain' '
echo "branch $(git symbolic-ref HEAD)" >>expect &&
echo >>expect &&
test_when_finished "rm -rf here actual expect && git worktree prune" &&
- git worktree add --detach here master &&
+ git worktree add --detach here main &&
echo "worktree $(git -C here rev-parse --show-toplevel)" >>expect &&
echo "HEAD $(git rev-parse HEAD)" >>expect &&
echo "detached" >>expect &&
@@ -66,13 +66,13 @@ test_expect_success 'bare repo setup' '
echo "data" >file1 &&
git add file1 &&
git commit -m"File1: add data" &&
- git push bare1 master &&
+ git push bare1 main &&
git reset --hard HEAD^
'
test_expect_success '"list" all worktrees from bare main' '
test_when_finished "rm -rf there out actual expect && git -C bare1 worktree prune" &&
- git -C bare1 worktree add --detach ../there master &&
+ git -C bare1 worktree add --detach ../there main &&
echo "$(pwd)/bare1 (bare)" >expect &&
echo "$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)" >>expect &&
git -C bare1 worktree list >out &&
@@ -82,7 +82,7 @@ test_expect_success '"list" all worktrees from bare main' '
test_expect_success '"list" all worktrees --porcelain from bare main' '
test_when_finished "rm -rf there actual expect && git -C bare1 worktree prune" &&
- git -C bare1 worktree add --detach ../there master &&
+ git -C bare1 worktree add --detach ../there main &&
echo "worktree $(pwd)/bare1" >expect &&
echo "bare" >>expect &&
echo >>expect &&
@@ -96,7 +96,7 @@ test_expect_success '"list" all worktrees --porcelain from bare main' '
test_expect_success '"list" all worktrees from linked with a bare main' '
test_when_finished "rm -rf there out actual expect && git -C bare1 worktree prune" &&
- git -C bare1 worktree add --detach ../there master &&
+ git -C bare1 worktree add --detach ../there main &&
echo "$(pwd)/bare1 (bare)" >expect &&
echo "$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)" >>expect &&
git -C there worktree list >out &&
diff --git a/t/t2405-worktree-submodule.sh b/t/t2405-worktree-submodule.sh
index e1b2bfd87e..ccc47fae97 100755
--- a/t/t2405-worktree-submodule.sh
+++ b/t/t2405-worktree-submodule.sh
@@ -31,7 +31,7 @@ test_expect_success 'add superproject worktree' '
'
test_expect_failure 'submodule is checked out just after worktree add' '
- git -C worktree diff --submodule master"^!" >out &&
+ git -C worktree diff --submodule main"^!" >out &&
grep "file1 updated" out
'
@@ -41,7 +41,7 @@ test_expect_success 'add superproject worktree and initialize submodules' '
'
test_expect_success 'submodule is checked out just after submodule update in linked worktree' '
- git -C worktree-submodule-update diff --submodule master"^!" >out &&
+ git -C worktree-submodule-update diff --submodule main"^!" >out &&
grep "file1 updated" out
'
@@ -51,7 +51,7 @@ test_expect_success 'add superproject worktree and manually add submodule worktr
'
test_expect_success 'submodule is checked out after manually adding submodule worktree' '
- git -C linked_submodule diff --submodule master"^!" >out &&
+ git -C linked_submodule diff --submodule main"^!" >out &&
grep "file1 updated" out
'
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index d48d211a95..6a3bf4a201 100755
--- a/t/t3030-merge-recursive.sh
+++ b/t/t3030-merge-recursive.sh
@@ -34,7 +34,7 @@ test_expect_success 'setup 1' '
git add a d/e &&
test_tick &&
- git commit -m "master modifies a and d/e" &&
+ git commit -m "main modifies a and d/e" &&
c1=$(git rev-parse --verify HEAD) &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
@@ -465,7 +465,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not
git checkout -b branch1 &&
git commit --allow-empty -m "empty commit" &&
- git checkout master &&
+ git checkout main &&
git rm foo &&
mkdir foo &&
>foo/bar &&
@@ -474,7 +474,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not
git checkout branch1 &&
- git cherry-pick master &&
+ git cherry-pick main &&
test_path_is_dir foo &&
test_path_is_file foo/bar
)
@@ -489,8 +489,8 @@ test_expect_success 'reset and 3-way merge' '
test_expect_success 'reset and bind merge' '
- git reset --hard master &&
- git read-tree --prefix=M/ master &&
+ git reset --hard main &&
+ git read-tree --prefix=M/ main &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 M/a" &&
@@ -504,7 +504,7 @@ test_expect_success 'reset and bind merge' '
) >expected &&
test_cmp expected actual &&
- git read-tree --prefix=a1/ master &&
+ git read-tree --prefix=a1/ main &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 M/a" &&
@@ -522,7 +522,7 @@ test_expect_success 'reset and bind merge' '
) >expected &&
test_cmp expected actual &&
- git read-tree --prefix=z/ master &&
+ git read-tree --prefix=z/ main &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 M/a" &&
@@ -598,11 +598,11 @@ test_expect_success 'merge-recursive w/ empty work tree - theirs has rename' '
test_expect_success 'merge removes empty directories' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b rm &&
git rm d/e &&
git commit -mremoved-d/e &&
- git checkout master &&
+ git checkout main &&
git merge -s recursive rm &&
test_path_is_missing d
'
diff --git a/t/t3032-merge-recursive-space-options.sh b/t/t3032-merge-recursive-space-options.sh
index b56180ee4a..4eda1dd444 100755
--- a/t/t3032-merge-recursive-space-options.sh
+++ b/t/t3032-merge-recursive-space-options.sh
@@ -2,11 +2,11 @@
test_description='merge-recursive space options
-* [master] Clarify
+* [main] Clarify
! [remote] Remove cruft
--
+ [remote] Remove cruft
-* [master] Clarify
+* [main] Clarify
*+ [remote^] Initial revision
* ok 1: setup
'
@@ -87,7 +87,7 @@ test_expect_success 'setup' '
mv text.txt+ text.txt &&
git commit -a -m "Remove cruft" &&
- git checkout master &&
+ git checkout main &&
sed -e "
s/\(not in his right mind\),\(.*\)/\1;\2Q/
s/Quite correct\(.*\)/It is too correct\1Q/
diff --git a/t/t3033-merge-toplevel.sh b/t/t3033-merge-toplevel.sh
index e29c284b9b..fdbd095cde 100755
--- a/t/t3033-merge-toplevel.sh
+++ b/t/t3033-merge-toplevel.sh
@@ -5,7 +5,7 @@ test_description='"git merge" top-level frontend'
. ./test-lib.sh
t3033_reset () {
- git checkout -B master two &&
+ git checkout -B main two &&
git branch -f left three &&
git branch -f right four
}
@@ -21,7 +21,7 @@ test_expect_success setup '
test_commit four &&
git checkout --orphan newroot &&
test_commit five &&
- git checkout master
+ git checkout main
'
# Local branches
@@ -61,7 +61,7 @@ test_expect_success 'merge octopus, non-fast-forward (ff)' '
test_expect_success 'merge octopus, fast-forward (does not ff)' '
t3033_reset &&
git merge left right &&
- # two (master) is not an ancestor of three (left) and four (right)
+ # two (main) is not an ancestor of three (left) and four (right)
test_must_fail git rev-parse --verify HEAD^4 &&
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
git rev-parse two three four | sort >expect &&
@@ -118,7 +118,7 @@ test_expect_success 'merge FETCH_HEAD octopus fast-forward (does not ff)' '
t3033_reset &&
git fetch . left right &&
git merge FETCH_HEAD &&
- # two (master) is not an ancestor of three (left) and four (right)
+ # two (main) is not an ancestor of three (left) and four (right)
test_must_fail git rev-parse --verify HEAD^4 &&
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
git rev-parse two three four | sort >expect &&
diff --git a/t/t3034-merge-recursive-rename-options.sh b/t/t3034-merge-recursive-rename-options.sh
index 3d9fae68c4..1203984101 100755
--- a/t/t3034-merge-recursive-rename-options.sh
+++ b/t/t3034-merge-recursive-rename-options.sh
@@ -5,11 +5,11 @@ test_description='merge-recursive rename options
Test rename detection by examining rename/delete conflicts.
* (HEAD -> rename) rename
-| * (master) delete
+| * (main) delete
|/
* base
-git diff --name-status base master
+git diff --name-status base main
D 0-old
D 1-old
D 2-old
@@ -118,7 +118,7 @@ test_expect_success 'setup repo' '
get_expected_stages 2 &&
get_expected_stages 3 &&
check_50="false" &&
- tail="HEAD^ -- HEAD master"
+ tail="HEAD^ -- HEAD main"
'
test_expect_success 'setup thresholds' '
diff --git a/t/t3040-subprojects-basic.sh b/t/t3040-subprojects-basic.sh
index b81eb5fd6f..f3ea8dcf58 100755
--- a/t/t3040-subprojects-basic.sh
+++ b/t/t3040-subprojects-basic.sh
@@ -80,6 +80,6 @@ test_expect_success 'checkout in superproject' '
'
# just interesting what happened...
-# git diff --name-status -M save master
+# git diff --name-status -M save main
test_done
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 411a70b0ce..9aa86eb99b 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -28,7 +28,7 @@ test_expect_success 'branch -h in broken repository' '
(
cd broken &&
git init &&
- >.git/refs/heads/master &&
+ >.git/refs/heads/main &&
test_expect_code 129 git branch -h >usage 2>&1
) &&
test_i18ngrep "[Uu]sage" broken/usage
@@ -42,8 +42,8 @@ test_expect_success 'git branch a/b/c should create a branch' '
git branch a/b/c && test_path_is_file .git/refs/heads/a/b/c
'
-test_expect_success 'git branch mb master... should create a branch' '
- git branch mb master... && test_path_is_file .git/refs/heads/mb
+test_expect_success 'git branch mb main... should create a branch' '
+ git branch mb main... && test_path_is_file .git/refs/heads/mb
'
test_expect_success 'git branch HEAD should fail' '
@@ -51,7 +51,7 @@ test_expect_success 'git branch HEAD should fail' '
'
cat >expect <<EOF
-$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from main
EOF
test_expect_success 'git branch --create-reflog d/e/f should create a branch and a log' '
GIT_COMMITTER_DATE="2005-05-26 23:30" \
@@ -110,7 +110,7 @@ test_expect_success 'git branch -m n/n n should work' '
test_expect_success 'git branch -m bbb should rename checked out branch' '
test_when_finished git branch -D bbb &&
- test_when_finished git checkout master &&
+ test_when_finished git checkout main &&
git checkout -b aaa &&
git commit --allow-empty -m "a new commit" &&
git rev-parse aaa@{0} >expect &&
@@ -124,7 +124,7 @@ test_expect_success 'git branch -m bbb should rename checked out branch' '
test_expect_success 'renaming checked out branch works with d/f conflict' '
test_when_finished "git branch -D foo/bar || git branch -D foo" &&
- test_when_finished git checkout master &&
+ test_when_finished git checkout main &&
git checkout -b foo &&
git branch -m foo/bar &&
git symbolic-ref HEAD >actual &&
@@ -185,7 +185,7 @@ test_expect_success 'git branch -M should leave orphaned HEAD alone' '
git checkout --orphan lonely &&
grep lonely .git/HEAD &&
test_path_is_missing .git/refs/head/lonely &&
- git branch -M master mistress &&
+ git branch -M main mistress &&
grep lonely .git/HEAD
)
'
@@ -201,7 +201,7 @@ test_expect_success 'resulting reflog can be shown by log -g' '
'
test_expect_success 'git branch -M baz bam should succeed when baz is checked out as linked working tree' '
- git checkout master &&
+ git checkout main &&
git worktree add -b baz bazdir &&
git worktree add -f bazdir2 baz &&
git branch -M baz bam &&
@@ -224,20 +224,20 @@ test_expect_success 'git branch -M baz bam should succeed within a worktree in w
git worktree prune
'
-test_expect_success 'git branch -M master should work when master is checked out' '
- git checkout master &&
- git branch -M master
+test_expect_success 'git branch -M main should work when main is checked out' '
+ git checkout main &&
+ git branch -M main
'
-test_expect_success 'git branch -M master master should work when master is checked out' '
- git checkout master &&
- git branch -M master master
+test_expect_success 'git branch -M main main should work when main is checked out' '
+ git checkout main &&
+ git branch -M main main
'
-test_expect_success 'git branch -M master2 master2 should work when master is checked out' '
- git checkout master &&
- git branch master2 &&
- git branch -M master2 master2
+test_expect_success 'git branch -M main2 main2 should work when main is checked out' '
+ git checkout main &&
+ git branch main2 &&
+ git branch -M main2 main2
'
test_expect_success 'git branch -v -d t should work' '
@@ -292,8 +292,8 @@ test_expect_success 'bare main worktree has HEAD at branch deleted by secondary
git init nonbare &&
test_commit -C nonbare x &&
git clone --bare nonbare bare &&
- git -C bare worktree add --detach ../secondary master &&
- git -C secondary branch -D master
+ git -C bare worktree add --detach ../secondary main &&
+ git -C secondary branch -D main
'
test_expect_success 'git branch --list -v with --abbrev' '
@@ -324,8 +324,8 @@ test_expect_success 'git branch --list -v with --abbrev' '
test_expect_success 'git branch --column' '
COLUMNS=81 git branch --column=column >actual &&
cat >expected <<\EOF &&
- a/b/c bam foo l * master mb o/o q
- abc bar j/k m/m master2 n o/p r
+ a/b/c bam foo l * main mb o/o q
+ abc bar j/k m/m main2 n o/p r
EOF
test_cmp expected actual
'
@@ -345,8 +345,8 @@ test_expect_success 'git branch --column with an extremely long branch name' '
j/k
l
m/m
-* master
- master2
+* main
+ main2
mb
n
o/o
@@ -365,8 +365,8 @@ test_expect_success 'git branch with column.*' '
git config --unset column.branch &&
git config --unset column.ui &&
cat >expected <<\EOF &&
- a/b/c bam foo l * master mb o/o q
- abc bar j/k m/m master2 n o/p r
+ a/b/c bam foo l * main mb o/o q
+ abc bar j/k m/m main2 n o/p r
EOF
test_cmp expected actual
'
@@ -388,8 +388,8 @@ test_expect_success 'git branch -v with column.ui ignored' '
j/k
l
m/m
-* master
- master2
+* main
+ main2
mb
n
o/o
@@ -427,8 +427,8 @@ test_expect_success 'config information was renamed, too' '
'
test_expect_success 'git branch -m correctly renames multiple config sections' '
- test_when_finished "git checkout master" &&
- git checkout -b source master &&
+ test_when_finished "git checkout main" &&
+ git checkout -b source main &&
# Assert that a config file with multiple config sections has
# those sections preserved...
@@ -587,20 +587,20 @@ test_expect_success 'git branch -C c1 c2 should never touch HEAD' '
! grep "$msg$" .git/logs/HEAD
'
-test_expect_success 'git branch -C master should work when master is checked out' '
- git checkout master &&
- git branch -C master
+test_expect_success 'git branch -C main should work when main is checked out' '
+ git checkout main &&
+ git branch -C main
'
-test_expect_success 'git branch -C master master should work when master is checked out' '
- git checkout master &&
- git branch -C master master
+test_expect_success 'git branch -C main main should work when main is checked out' '
+ git checkout main &&
+ git branch -C main main
'
-test_expect_success 'git branch -C master5 master5 should work when master is checked out' '
- git checkout master &&
- git branch master5 &&
- git branch -C master5 master5
+test_expect_success 'git branch -C main5 main5 should work when main is checked out' '
+ git checkout main &&
+ git branch main5 &&
+ git branch -C main5 main5
'
test_expect_success 'git branch -C ab cd should overwrite existing config for cd' '
@@ -620,8 +620,8 @@ test_expect_success 'git branch -C ab cd should overwrite existing config for cd
test_expect_success 'git branch -c correctly copies multiple config sections' '
FOO=1 &&
export FOO &&
- test_when_finished "git checkout master" &&
- git checkout -b source2 master &&
+ test_when_finished "git checkout main" &&
+ git checkout -b source2 main &&
# Assert that a config file with multiple config sections has
# those sections preserved...
@@ -711,11 +711,11 @@ test_expect_success 'deleting a self-referential symref' '
'
test_expect_success 'renaming a symref is not allowed' '
- git symbolic-ref refs/heads/master2 refs/heads/master &&
- test_must_fail git branch -m master2 master3 &&
- git symbolic-ref refs/heads/master2 &&
- test_path_is_file .git/refs/heads/master &&
- test_path_is_missing .git/refs/heads/master3
+ git symbolic-ref refs/heads/main2 refs/heads/main &&
+ test_must_fail git branch -m main2 main3 &&
+ git symbolic-ref refs/heads/main2 &&
+ test_path_is_file .git/refs/heads/main &&
+ test_path_is_missing .git/refs/heads/main3
'
test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '
@@ -728,27 +728,27 @@ test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for
test_expect_success 'test tracking setup via --track' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track my1 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --track my1 local/main &&
test $(git config branch.my1.remote) = local &&
- test $(git config branch.my1.merge) = refs/heads/master
+ test $(git config branch.my1.merge) = refs/heads/main
'
test_expect_success 'test tracking setup (non-wildcard, matching)' '
git config remote.local.url . &&
- git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track my4 local/master &&
+ git config remote.local.fetch refs/heads/main:refs/remotes/local/main &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --track my4 local/main &&
test $(git config branch.my4.remote) = local &&
- test $(git config branch.my4.merge) = refs/heads/master
+ test $(git config branch.my4.merge) = refs/heads/main
'
test_expect_success 'tracking setup fails on non-matching refspec' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
- test_must_fail git branch --track my5 local/master &&
+ test_must_fail git branch --track my5 local/main &&
test_must_fail git config branch.my5.remote &&
test_must_fail git config branch.my5.merge
'
@@ -757,21 +757,21 @@ test_expect_success 'test tracking setup via config' '
git config branch.autosetupmerge true &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch my3 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch my3 local/main &&
test $(git config branch.my3.remote) = local &&
- test $(git config branch.my3.merge) = refs/heads/master
+ test $(git config branch.my3.merge) = refs/heads/main
'
test_expect_success 'test overriding tracking setup via --no-track' '
git config branch.autosetupmerge true &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --no-track my2 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --no-track my2 local/main &&
git config branch.autosetupmerge false &&
! test "$(git config branch.my2.remote)" = local &&
- ! test "$(git config branch.my2.merge)" = refs/heads/master
+ ! test "$(git config branch.my2.merge)" = refs/heads/main
'
test_expect_success 'no tracking without .fetch entries' '
@@ -835,21 +835,21 @@ test_expect_success 'branch from tag w/--track causes failure' '
'
test_expect_success '--set-upstream-to fails on multiple branches' '
- test_must_fail git branch --set-upstream-to master a b c
+ test_must_fail git branch --set-upstream-to main a b c
'
test_expect_success '--set-upstream-to fails on detached HEAD' '
git checkout HEAD^{} &&
- test_must_fail git branch --set-upstream-to master &&
+ test_must_fail git branch --set-upstream-to main &&
git checkout -
'
test_expect_success '--set-upstream-to fails on a missing dst branch' '
- test_must_fail git branch --set-upstream-to master does-not-exist
+ test_must_fail git branch --set-upstream-to main does-not-exist
'
test_expect_success '--set-upstream-to fails on a missing src branch' '
- test_must_fail git branch --set-upstream-to does-not-exist master
+ test_must_fail git branch --set-upstream-to does-not-exist main
'
test_expect_success '--set-upstream-to fails on a non-ref' '
@@ -864,20 +864,20 @@ test_expect_success '--set-upstream-to fails on locked config' '
'
test_expect_success 'use --set-upstream-to modify HEAD' '
- test_config branch.master.remote foo &&
- test_config branch.master.merge foo &&
+ test_config branch.main.remote foo &&
+ test_config branch.main.merge foo &&
git branch my12 &&
git branch --set-upstream-to my12 &&
- test "$(git config branch.master.remote)" = "." &&
- test "$(git config branch.master.merge)" = "refs/heads/my12"
+ test "$(git config branch.main.remote)" = "." &&
+ test "$(git config branch.main.merge)" = "refs/heads/my12"
'
test_expect_success 'use --set-upstream-to modify a particular branch' '
git branch my13 &&
- git branch --set-upstream-to master my13 &&
+ git branch --set-upstream-to main my13 &&
test_when_finished "git branch --unset-upstream my13" &&
test "$(git config branch.my13.remote)" = "." &&
- test "$(git config branch.my13.merge)" = "refs/heads/master"
+ test "$(git config branch.my13.merge)" = "refs/heads/main"
'
test_expect_success '--unset-upstream should fail if given a non-existent branch' '
@@ -893,12 +893,12 @@ test_expect_success '--unset-upstream should fail if config is locked' '
test_expect_success 'test --unset-upstream on HEAD' '
git branch my14 &&
- test_config branch.master.remote foo &&
- test_config branch.master.merge foo &&
+ test_config branch.main.remote foo &&
+ test_config branch.main.merge foo &&
git branch --set-upstream-to my14 &&
git branch --unset-upstream &&
- test_must_fail git config branch.master.remote &&
- test_must_fail git config branch.master.merge &&
+ test_must_fail git config branch.main.remote &&
+ test_must_fail git config branch.main.merge &&
# fail for a branch without upstream set
test_must_fail git branch --unset-upstream
'
@@ -915,14 +915,14 @@ test_expect_success '--unset-upstream should fail on detached HEAD' '
test_expect_success 'test --unset-upstream on a particular branch' '
git branch my15 &&
- git branch --set-upstream-to master my14 &&
+ git branch --set-upstream-to main my14 &&
git branch --unset-upstream my14 &&
test_must_fail git config branch.my14.remote &&
test_must_fail git config branch.my14.merge
'
test_expect_success 'disabled option --set-upstream fails' '
- test_must_fail git branch --set-upstream origin/master
+ test_must_fail git branch --set-upstream origin/main
'
test_expect_success '--set-upstream-to notices an error to set branch as own upstream' '
@@ -937,32 +937,32 @@ test_expect_success '--set-upstream-to notices an error to set branch as own ups
# Keep this test last, as it changes the current branch
cat >expect <<EOF
-$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from main
EOF
test_expect_success 'git checkout -b g/h/i -l should create a branch and a log' '
GIT_COMMITTER_DATE="2005-05-26 23:30" \
- git checkout -b g/h/i -l master &&
+ git checkout -b g/h/i -l main &&
test_path_is_file .git/refs/heads/g/h/i &&
test_path_is_file .git/logs/refs/heads/g/h/i &&
test_cmp expect .git/logs/refs/heads/g/h/i
'
test_expect_success 'checkout -b makes reflog by default' '
- git checkout master &&
+ git checkout main &&
git config --unset core.logAllRefUpdates &&
git checkout -b alpha &&
git rev-parse --verify alpha@{0}
'
test_expect_success 'checkout -b does not make reflog when core.logAllRefUpdates = false' '
- git checkout master &&
+ git checkout main &&
git config core.logAllRefUpdates false &&
git checkout -b beta &&
test_must_fail git rev-parse --verify beta@{0}
'
test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' '
- git checkout master &&
+ git checkout main &&
git checkout -lb gamma &&
git config --unset core.logAllRefUpdates &&
git rev-parse --verify gamma@{0}
@@ -971,10 +971,10 @@ test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates
test_expect_success 'avoid ambiguous track' '
git config branch.autosetupmerge true &&
git config remote.ambi1.url lalala &&
- git config remote.ambi1.fetch refs/heads/lalala:refs/heads/master &&
+ git config remote.ambi1.fetch refs/heads/lalala:refs/heads/main &&
git config remote.ambi2.url lilili &&
- git config remote.ambi2.fetch refs/heads/lilili:refs/heads/master &&
- test_must_fail git branch all1 master &&
+ git config remote.ambi2.fetch refs/heads/lilili:refs/heads/main &&
+ test_must_fail git branch all1 main &&
test -z "$(git config branch.all1.merge)"
'
@@ -1030,10 +1030,10 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase local &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track myr5 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --track myr5 local/main &&
test "$(git config branch.myr5.remote)" = local &&
- test "$(git config branch.myr5.merge)" = refs/heads/master &&
+ test "$(git config branch.myr5.merge)" = refs/heads/main &&
! test "$(git config branch.myr5.rebase)" = true
'
@@ -1041,10 +1041,10 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase never &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track myr6 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --track myr6 local/main &&
test "$(git config branch.myr6.remote)" = local &&
- test "$(git config branch.myr6.merge)" = refs/heads/master &&
+ test "$(git config branch.myr6.merge)" = refs/heads/main &&
! test "$(git config branch.myr6.rebase)" = true
'
@@ -1052,10 +1052,10 @@ test_expect_success 'autosetuprebase remote on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track myr7 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --track myr7 local/main &&
test "$(git config branch.myr7.remote)" = local &&
- test "$(git config branch.myr7.merge)" = refs/heads/master &&
+ test "$(git config branch.myr7.merge)" = refs/heads/main &&
test "$(git config branch.myr7.rebase)" = true
'
@@ -1063,10 +1063,10 @@ test_expect_success 'autosetuprebase always on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track myr8 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --track myr8 local/main &&
test "$(git config branch.myr8.remote)" = local &&
- test "$(git config branch.myr8.merge)" = refs/heads/master &&
+ test "$(git config branch.myr8.merge)" = refs/heads/main &&
test "$(git config branch.myr8.rebase)" = true
'
@@ -1074,10 +1074,10 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' '
git config --unset branch.autosetuprebase &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --track myr9 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --track myr9 local/main &&
test "$(git config branch.myr9.remote)" = local &&
- test "$(git config branch.myr9.merge)" = refs/heads/master &&
+ test "$(git config branch.myr9.merge)" = refs/heads/main &&
test "z$(git config branch.myr9.rebase)" = z
'
@@ -1095,7 +1095,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '
test_expect_success 'autosetuprebase unconfigured on untracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
git branch --no-track myr11 mybase2 &&
test "z$(git config branch.myr11.remote)" = z &&
test "z$(git config branch.myr11.merge)" = z &&
@@ -1105,8 +1105,8 @@ test_expect_success 'autosetuprebase unconfigured on untracked local branch' '
test_expect_success 'autosetuprebase unconfigured on untracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --no-track myr12 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --no-track myr12 local/main &&
test "z$(git config branch.myr12.remote)" = z &&
test "z$(git config branch.myr12.merge)" = z &&
test "z$(git config branch.myr12.rebase)" = z
@@ -1116,7 +1116,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' '
git config branch.autosetuprebase never &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
git branch --no-track myr13 mybase2 &&
test "z$(git config branch.myr13.remote)" = z &&
test "z$(git config branch.myr13.merge)" = z &&
@@ -1127,7 +1127,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' '
git config branch.autosetuprebase local &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
git branch --no-track myr14 mybase2 &&
test "z$(git config branch.myr14.remote)" = z &&
test "z$(git config branch.myr14.merge)" = z &&
@@ -1138,7 +1138,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' '
git config branch.autosetuprebase remote &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
git branch --no-track myr15 mybase2 &&
test "z$(git config branch.myr15.remote)" = z &&
test "z$(git config branch.myr15.merge)" = z &&
@@ -1149,7 +1149,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' '
git config branch.autosetuprebase always &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
git branch --no-track myr16 mybase2 &&
test "z$(git config branch.myr16.remote)" = z &&
test "z$(git config branch.myr16.merge)" = z &&
@@ -1160,8 +1160,8 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' '
git config branch.autosetuprebase never &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --no-track myr17 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --no-track myr17 local/main &&
test "z$(git config branch.myr17.remote)" = z &&
test "z$(git config branch.myr17.merge)" = z &&
test "z$(git config branch.myr17.rebase)" = z
@@ -1171,8 +1171,8 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' '
git config branch.autosetuprebase local &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --no-track myr18 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --no-track myr18 local/main &&
test "z$(git config branch.myr18.remote)" = z &&
test "z$(git config branch.myr18.merge)" = z &&
test "z$(git config branch.myr18.rebase)" = z
@@ -1182,8 +1182,8 @@ test_expect_success 'autosetuprebase remote on an untracked remote branch' '
git config branch.autosetuprebase remote &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --no-track myr19 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --no-track myr19 local/main &&
test "z$(git config branch.myr19.remote)" = z &&
test "z$(git config branch.myr19.merge)" = z &&
test "z$(git config branch.myr19.rebase)" = z
@@ -1193,8 +1193,8 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '
git config branch.autosetuprebase always &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
- git branch --no-track myr20 local/master &&
+ (git show-ref -q refs/remotes/local/main || git fetch local) &&
+ git branch --no-track myr20 local/main &&
test "z$(git config branch.myr20.remote)" = z &&
test "z$(git config branch.myr20.merge)" = z &&
test "z$(git config branch.myr20.rebase)" = z
@@ -1202,7 +1202,7 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '
test_expect_success 'autosetuprebase always on detached HEAD' '
git config branch.autosetupmerge always &&
- test_when_finished git checkout master &&
+ test_when_finished git checkout main &&
git checkout HEAD^0 &&
git branch my11 &&
test -z "$(git config branch.my11.remote)" &&
@@ -1230,18 +1230,18 @@ test_expect_success 'attempt to delete a branch without base and unmerged to HEA
test_expect_success 'attempt to delete a branch merged to its base' '
# we are on my9 which is the initial commit; traditionally
# we would not have allowed deleting my8 that is not merged
- # to my9, but it is set to track master that already has my8
- git config branch.my8.merge refs/heads/master &&
+ # to my9, but it is set to track main that already has my8
+ git config branch.my8.merge refs/heads/main &&
git branch -d my8
'
test_expect_success 'attempt to delete a branch merged to its base' '
- git checkout master &&
+ git checkout main &&
echo Third >>A &&
git commit -m "Third commit" A &&
git branch -t my10 my9 &&
git branch -f my10 HEAD^ &&
- # we are on master which is at the third commit, and my10
+ # we are on main which is at the third commit, and my10
# is behind us, so traditionally we would have allowed deleting
# it; but my10 is set to track my9 that is further behind.
test_must_fail git branch -d my10
@@ -1285,18 +1285,18 @@ test_expect_success '--merged is incompatible with --no-merged' '
test_expect_success '--list during rebase' '
test_when_finished "reset_rebase" &&
- git checkout master &&
+ git checkout main &&
FAKE_LINES="1 edit 2" &&
export FAKE_LINES &&
set_fake_editor &&
git rebase -i HEAD~2 &&
git branch --list >actual &&
- test_i18ngrep "rebasing master" actual
+ test_i18ngrep "rebasing main" actual
'
test_expect_success '--list during rebase from detached HEAD' '
- test_when_finished "reset_rebase && git checkout master" &&
- git checkout master^0 &&
+ test_when_finished "reset_rebase && git checkout main" &&
+ git checkout main^0 &&
oid=$(git rev-parse --short HEAD) &&
FAKE_LINES="1 edit 2" &&
export FAKE_LINES &&
@@ -1332,11 +1332,11 @@ test_expect_success 'tracking with unexpected .fetch refspec' '
git remote add c ../c &&
git config remote.c.fetch "+refs/remotes/*:refs/remotes/*" &&
git fetch c &&
- git branch --track local/a/master remotes/a/master &&
- test "$(git config branch.local/a/master.remote)" = "c" &&
- test "$(git config branch.local/a/master.merge)" = "refs/remotes/a/master" &&
+ git branch --track local/a/main remotes/a/main &&
+ test "$(git config branch.local/a/main.remote)" = "c" &&
+ test "$(git config branch.local/a/main.merge)" = "refs/remotes/a/main" &&
git rev-parse --verify a >expect &&
- git rev-parse --verify local/a/master >actual &&
+ git rev-parse --verify local/a/main >actual &&
test_cmp expect actual
)
'
@@ -1355,7 +1355,7 @@ test_expect_success 'configured committerdate sort' '
test_commit b &&
git branch >actual &&
cat >expect <<-\EOF &&
- master
+ main
a
c
* b
@@ -1373,7 +1373,7 @@ test_expect_success 'option override configured sort' '
a
* b
c
- master
+ main
EOF
test_cmp expect actual
)
diff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh
index 40251c9f8f..60c6f43b78 100755
--- a/t/t3201-branch-contains.sh
+++ b/t/t3201-branch-contains.sh
@@ -14,47 +14,47 @@ test_expect_success setup '
echo 1 >file &&
test_tick &&
- git commit -a -m "second on master" &&
+ git commit -a -m "second on main" &&
git checkout side &&
echo 1 >file &&
test_tick &&
git commit -a -m "second on side" &&
- git merge master
+ git merge main
'
-test_expect_success 'branch --contains=master' '
+test_expect_success 'branch --contains=main' '
- git branch --contains=master >actual &&
+ git branch --contains=main >actual &&
{
- echo " master" && echo "* side"
+ echo " main" && echo "* side"
} >expect &&
test_cmp expect actual
'
-test_expect_success 'branch --contains master' '
+test_expect_success 'branch --contains main' '
- git branch --contains master >actual &&
+ git branch --contains main >actual &&
{
- echo " master" && echo "* side"
+ echo " main" && echo "* side"
} >expect &&
test_cmp expect actual
'
-test_expect_success 'branch --no-contains=master' '
+test_expect_success 'branch --no-contains=main' '
- git branch --no-contains=master >actual &&
+ git branch --no-contains=main >actual &&
test_must_be_empty actual
'
-test_expect_success 'branch --no-contains master' '
+test_expect_success 'branch --no-contains main' '
- git branch --no-contains master >actual &&
+ git branch --no-contains main >actual &&
test_must_be_empty actual
'
@@ -73,7 +73,7 @@ test_expect_success 'branch --no-contains=side' '
git branch --no-contains=side >actual &&
{
- echo " master"
+ echo " main"
} >expect &&
test_cmp expect actual
@@ -81,9 +81,9 @@ test_expect_success 'branch --no-contains=side' '
test_expect_success 'branch --contains with pattern implies --list' '
- git branch --contains=master master >actual &&
+ git branch --contains=main main >actual &&
{
- echo " master"
+ echo " main"
} >expect &&
test_cmp expect actual
@@ -91,7 +91,7 @@ test_expect_success 'branch --contains with pattern implies --list' '
test_expect_success 'branch --no-contains with pattern implies --list' '
- git branch --no-contains=master master >actual &&
+ git branch --no-contains=main main >actual &&
test_must_be_empty actual
'
@@ -100,7 +100,7 @@ test_expect_success 'side: branch --merged' '
git branch --merged >actual &&
{
- echo " master" &&
+ echo " main" &&
echo "* side"
} >expect &&
test_cmp expect actual
@@ -109,9 +109,9 @@ test_expect_success 'side: branch --merged' '
test_expect_success 'branch --merged with pattern implies --list' '
- git branch --merged=side master >actual &&
+ git branch --merged=side main >actual &&
{
- echo " master"
+ echo " main"
} >expect &&
test_cmp expect actual
@@ -124,18 +124,18 @@ test_expect_success 'side: branch --no-merged' '
'
-test_expect_success 'master: branch --merged' '
+test_expect_success 'main: branch --merged' '
- git checkout master &&
+ git checkout main &&
git branch --merged >actual &&
{
- echo "* master"
+ echo "* main"
} >expect &&
test_cmp expect actual
'
-test_expect_success 'master: branch --no-merged' '
+test_expect_success 'main: branch --no-merged' '
git branch --no-merged >actual &&
{
@@ -147,22 +147,22 @@ test_expect_success 'master: branch --no-merged' '
test_expect_success 'branch --no-merged with pattern implies --list' '
- git branch --no-merged=master master >actual &&
+ git branch --no-merged=main main >actual &&
test_must_be_empty actual
'
test_expect_success 'implicit --list conflicts with modification options' '
- test_must_fail git branch --contains=master -d &&
- test_must_fail git branch --contains=master -m foo &&
- test_must_fail git branch --no-contains=master -d &&
- test_must_fail git branch --no-contains=master -m foo
+ test_must_fail git branch --contains=main -d &&
+ test_must_fail git branch --contains=main -m foo &&
+ test_must_fail git branch --no-contains=main -d &&
+ test_must_fail git branch --no-contains=main -m foo
'
test_expect_success 'Assert that --contains only works on commits, not trees & blobs' '
- test_must_fail git branch --contains master^{tree} &&
+ test_must_fail git branch --contains main^{tree} &&
blob=$(git hash-object -w --stdin <<-\EOF
Some blob
EOF
@@ -176,26 +176,26 @@ test_expect_success 'Assert that --contains only works on commits, not trees & b
# that the latter walk does not mess up our flag to see if it was
# merged).
#
-# Here "topic" tracks "master" with one extra commit, and "zzz" points to the
-# same tip as master The name "zzz" must come alphabetically after "topic"
+# Here "topic" tracks "main" with one extra commit, and "zzz" points to the
+# same tip as main The name "zzz" must come alphabetically after "topic"
# as we process them in that order.
test_expect_success 'branch --merged with --verbose' '
- git branch --track topic master &&
+ git branch --track topic main &&
git branch zzz topic &&
git checkout topic &&
test_commit foo &&
git branch --merged topic >actual &&
cat >expect <<-\EOF &&
- master
+ main
* topic
zzz
EOF
test_cmp expect actual &&
git branch --verbose --merged topic >actual &&
cat >expect <<-EOF &&
- master $(git rev-parse --short master) second on master
+ main $(git rev-parse --short main) second on main
* topic $(git rev-parse --short topic ) [ahead 1] foo
- zzz $(git rev-parse --short zzz ) second on master
+ zzz $(git rev-parse --short zzz ) second on main
EOF
test_i18ncmp expect actual
'
@@ -203,7 +203,7 @@ test_expect_success 'branch --merged with --verbose' '
test_expect_success 'branch --contains combined with --no-contains' '
git branch --contains zzz --no-contains topic >actual &&
cat >expect <<-\EOF &&
- master
+ main
side
zzz
EOF
diff --git a/t/t3202-show-branch-octopus.sh b/t/t3202-show-branch-octopus.sh
index 6adf47869c..97551016ad 100755
--- a/t/t3202-show-branch-octopus.sh
+++ b/t/t3202-show-branch-octopus.sh
@@ -15,7 +15,7 @@ test_expect_success 'setup' '
for i in $numbers
do
- git checkout -b branch$i master &&
+ git checkout -b branch$i main &&
> file$i &&
git add file$i &&
test_tick &&
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index 71818b90f0..61fd8f36e5 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -26,7 +26,7 @@ test_expect_success 'make remote branches' '
cat >expect <<'EOF'
branch-one
branch-two
-* master
+* main
EOF
test_expect_success 'git branch shows local branches' '
git branch >actual &&
@@ -60,7 +60,7 @@ test_expect_success 'git branch -r shows remote branches' '
cat >expect <<'EOF'
branch-one
branch-two
-* master
+* main
remotes/origin/HEAD -> origin/branch-one
remotes/origin/branch-one
remotes/origin/branch-two
@@ -152,7 +152,7 @@ test_expect_success 'git branch shows detached HEAD properly' '
* (HEAD detached at $(git rev-parse --short HEAD^0))
branch-one
branch-two
- master
+ main
EOF
git checkout HEAD^0 &&
git branch >actual &&
@@ -160,12 +160,12 @@ EOF
'
test_expect_success 'git branch shows detached HEAD properly after checkout --detach' '
- git checkout master &&
+ git checkout main &&
cat >expect <<EOF &&
* (HEAD detached at $(git rev-parse --short HEAD^0))
branch-one
branch-two
- master
+ main
EOF
git checkout --detach &&
git branch >actual &&
@@ -177,7 +177,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving' '
* (HEAD detached from $(git rev-parse --short HEAD))
branch-one
branch-two
- master
+ main
EOF
git reset --hard HEAD^1 &&
git branch >actual &&
@@ -189,9 +189,9 @@ test_expect_success 'git branch shows detached HEAD properly from tag' '
* (HEAD detached at fromtag)
branch-one
branch-two
- master
+ main
EOF
- git tag fromtag master &&
+ git tag fromtag main &&
git checkout fromtag &&
git branch >actual &&
test_i18ncmp expect actual
@@ -202,7 +202,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving from t
* (HEAD detached from fromtag)
branch-one
branch-two
- master
+ main
EOF
git reset --hard HEAD^1 &&
git branch >actual &&
@@ -214,7 +214,7 @@ test_expect_success 'git branch `--sort` option' '
* (HEAD detached from fromtag)
branch-two
branch-one
- master
+ main
EOF
git branch --sort=objectsize >actual &&
test_i18ncmp expect actual
@@ -223,7 +223,7 @@ test_expect_success 'git branch `--sort` option' '
test_expect_success 'git branch --points-at option' '
cat >expect <<-\EOF &&
branch-one
- master
+ main
EOF
git branch --points-at=branch-one >actual &&
test_cmp expect actual
@@ -260,14 +260,14 @@ test_expect_success 'sort branches, ignore case' '
cat >expected <<-\EOF &&
BRANCH-two
branch-one
- master
+ main
EOF
test_cmp expected actual &&
git branch --list -i | awk "{print \$NF}" >actual &&
cat >expected <<-\EOF &&
branch-one
BRANCH-two
- master
+ main
EOF
test_cmp expected actual
)
@@ -279,7 +279,7 @@ test_expect_success 'git branch --format option' '
Refname is refs/heads/ambiguous
Refname is refs/heads/branch-one
Refname is refs/heads/branch-two
- Refname is refs/heads/master
+ Refname is refs/heads/main
Refname is refs/heads/ref-to-branch
Refname is refs/heads/ref-to-remote
EOF
@@ -293,7 +293,7 @@ test_expect_success 'worktree colors correct' '
ambiguous<RESET>
branch-one<RESET>
+ <CYAN>branch-two<RESET>
- master<RESET>
+ main<RESET>
ref-to-branch<RESET> -> branch-one
ref-to-remote<RESET> -> origin/branch-one
EOF
@@ -306,9 +306,9 @@ test_expect_success 'worktree colors correct' '
'
test_expect_success "set up color tests" '
- echo "<RED>master<RESET>" >expect.color &&
- echo "master" >expect.bare &&
- color_args="--format=%(color:red)%(refname:short) --list master"
+ echo "<RED>main<RESET>" >expect.color &&
+ echo "main" >expect.bare &&
+ color_args="--format=%(color:red)%(refname:short) --list main"
'
test_expect_success '%(color) omitted without tty' '
@@ -331,13 +331,13 @@ test_expect_success '--color overrides auto-color' '
test_expect_success 'verbose output lists worktree path' '
one=$(git rev-parse --short HEAD) &&
- two=$(git rev-parse --short master) &&
+ two=$(git rev-parse --short main) &&
cat >expect <<-EOF &&
* (HEAD detached from fromtag) $one one
ambiguous $one one
branch-one $two two
+ branch-two $one ($(pwd)/worktree_dir) one
- master $two two
+ main $two two
ref-to-branch $two two
ref-to-remote $two two
EOF
diff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh
index 698d9cc4f3..e527e0b0c9 100755
--- a/t/t3204-branch-name-interpretation.sh
+++ b/t/t3204-branch-name-interpretation.sh
@@ -28,7 +28,7 @@ test_expect_success 'update branch via @{-1}' '
git branch previous one &&
git checkout previous &&
- git checkout master &&
+ git checkout main &&
git branch -f @{-1} two &&
expect_branch previous two
@@ -58,7 +58,7 @@ test_expect_success 'delete branch via @{-1}' '
git branch previous-del &&
git checkout previous-del &&
- git checkout master &&
+ git checkout main &&
git branch -D @{-1} &&
expect_deleted previous-del
@@ -98,7 +98,7 @@ test_expect_success 'disallow deleting remote branch via @{-1}' '
git update-ref refs/remotes/origin/previous one &&
git checkout -b origin/previous two &&
- git checkout master &&
+ git checkout main &&
test_must_fail git branch -r -D @{-1} &&
expect_branch refs/remotes/origin/previous one &&
diff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh
index 4f1e16bb44..b31772ef83 100755
--- a/t/t3205-branch-color.sh
+++ b/t/t3205-branch-color.sh
@@ -5,7 +5,7 @@ test_description='basic branch output coloring'
test_expect_success 'set up some sample branches' '
test_commit foo &&
- git update-ref refs/remotes/origin/master HEAD &&
+ git update-ref refs/remotes/origin/main HEAD &&
git update-ref refs/heads/other HEAD
'
@@ -19,9 +19,9 @@ test_expect_success 'set up some color config' '
test_expect_success 'regular output shows colors' '
cat >expect <<-\EOF &&
- * <CYAN>master<RESET>
+ * <CYAN>main<RESET>
<BLUE>other<RESET>
- <YELLOW>remotes/origin/master<RESET>
+ <YELLOW>remotes/origin/main<RESET>
EOF
git branch --color -a >actual.raw &&
test_decode_color <actual.raw >actual &&
@@ -31,9 +31,9 @@ test_expect_success 'regular output shows colors' '
test_expect_success 'verbose output shows colors' '
oid=$(git rev-parse --short HEAD) &&
cat >expect <<-EOF &&
- * <CYAN>master <RESET> $oid foo
+ * <CYAN>main <RESET> $oid foo
<BLUE>other <RESET> $oid foo
- <YELLOW>remotes/origin/master<RESET> $oid foo
+ <YELLOW>remotes/origin/main<RESET> $oid foo
EOF
git branch --color -v -a >actual.raw &&
test_decode_color <actual.raw >actual &&
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index e024cff65c..8c7ce3b3f3 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -127,7 +127,7 @@ test_expect_success 'setup' '
'
test_expect_success 'simple A..B A..C (unmodified)' '
- git range-diff --no-color master..topic master..unmodified \
+ git range-diff --no-color main..topic main..unmodified \
>actual &&
cat >expect <<-EOF &&
1: $(test_oid t1) = 1: $(test_oid u1) s/5/A/
@@ -145,13 +145,13 @@ test_expect_success 'simple B...C (unmodified)' '
'
test_expect_success 'simple A B C (unmodified)' '
- git range-diff --no-color master topic unmodified >actual &&
+ git range-diff --no-color main topic unmodified >actual &&
# same "expect" as above
test_cmp expect actual
'
test_expect_success 'trivial reordering' '
- git range-diff --no-color master topic reordered >actual &&
+ git range-diff --no-color main topic reordered >actual &&
cat >expect <<-EOF &&
1: $(test_oid t1) = 1: $(test_oid r1) s/5/A/
3: $(test_oid t3) = 2: $(test_oid r2) s/11/B/
@@ -162,7 +162,7 @@ test_expect_success 'trivial reordering' '
'
test_expect_success 'removed a commit' '
- git range-diff --no-color master topic removed >actual &&
+ git range-diff --no-color main topic removed >actual &&
cat >expect <<-EOF &&
1: $(test_oid t1) = 1: $(test_oid d1) s/5/A/
2: $(test_oid t2) < -: $(test_oid __) s/4/A/
@@ -173,7 +173,7 @@ test_expect_success 'removed a commit' '
'
test_expect_success 'added a commit' '
- git range-diff --no-color master topic added >actual &&
+ git range-diff --no-color main topic added >actual &&
cat >expect <<-EOF &&
1: $(test_oid t1) = 1: $(test_oid a1) s/5/A/
2: $(test_oid t2) = 2: $(test_oid a2) s/4/A/
@@ -185,7 +185,7 @@ test_expect_success 'added a commit' '
'
test_expect_success 'new base, A B C' '
- git range-diff --no-color master topic rebased >actual &&
+ git range-diff --no-color main topic rebased >actual &&
cat >expect <<-EOF &&
1: $(test_oid t1) = 1: $(test_oid b1) s/5/A/
2: $(test_oid t2) = 2: $(test_oid b2) s/4/A/
@@ -196,7 +196,7 @@ test_expect_success 'new base, A B C' '
'
test_expect_success 'new base, B...C' '
- # this syntax includes the commits from master!
+ # this syntax includes the commits from main!
git range-diff --no-color topic...rebased >actual &&
cat >expect <<-EOF &&
-: $(test_oid __) > 1: $(test_oid b5) unrelated
@@ -424,7 +424,7 @@ test_expect_success 'file added and later removed' '
test_expect_success 'no commits on one side' '
git commit --amend -m "new message" &&
- git range-diff master HEAD@{1} HEAD
+ git range-diff main HEAD@{1} HEAD
'
test_expect_success 'changed message' '
@@ -486,11 +486,11 @@ test_expect_success 'dual-coloring' '
test_cmp expect actual
'
-for prev in topic master..topic
+for prev in topic main..topic
do
test_expect_success "format-patch --range-diff=$prev" '
git format-patch --cover-letter --range-diff=$prev \
- master..unmodified >actual &&
+ main..unmodified >actual &&
test_when_finished "rm 000?-*" &&
test_line_count = 5 actual &&
test_i18ngrep "^Range-diff:$" 0000-* &&
@@ -515,19 +515,19 @@ test_expect_success 'range-diff overrides diff.noprefix internally' '
test_expect_success 'basic with modified format.pretty with suffix' '
git -c format.pretty="format:commit %H%d%n" range-diff \
- master..topic master..unmodified
+ main..topic main..unmodified
'
test_expect_success 'basic with modified format.pretty without "commit "' '
git -c format.pretty="format:%H%n" range-diff \
- master..topic master..unmodified
+ main..topic main..unmodified
'
test_expect_success 'range-diff compares notes by default' '
git notes add -m "topic note" topic &&
git notes add -m "unmodified note" unmodified &&
test_when_finished git notes remove topic unmodified &&
- git range-diff --no-color master..topic master..unmodified \
+ git range-diff --no-color main..topic main..unmodified \
>actual &&
sed s/Z/\ /g >expect <<-EOF &&
1: $(test_oid t1) = 1: $(test_oid u1) s/5/A/
@@ -551,7 +551,7 @@ test_expect_success 'range-diff with --no-notes' '
git notes add -m "topic note" topic &&
git notes add -m "unmodified note" unmodified &&
test_when_finished git notes remove topic unmodified &&
- git range-diff --no-color --no-notes master..topic master..unmodified \
+ git range-diff --no-color --no-notes main..topic main..unmodified \
>actual &&
cat >expect <<-EOF &&
1: $(test_oid t1) = 1: $(test_oid u1) s/5/A/
@@ -569,7 +569,7 @@ test_expect_success 'range-diff with multiple --notes' '
git notes --ref=note2 add -m "topic note2" topic &&
git notes --ref=note2 add -m "unmodified note2" unmodified &&
test_when_finished git notes --ref=note2 remove topic unmodified &&
- git range-diff --no-color --notes=note1 --notes=note2 master..topic master..unmodified \
+ git range-diff --no-color --notes=note1 --notes=note2 main..topic main..unmodified \
>actual &&
sed s/Z/\ /g >expect <<-EOF &&
1: $(test_oid t1) = 1: $(test_oid u1) s/5/A/
@@ -599,7 +599,7 @@ test_expect_success 'format-patch --range-diff does not compare notes by default
git notes add -m "unmodified note" unmodified &&
test_when_finished git notes remove topic unmodified &&
git format-patch --cover-letter --range-diff=$prev \
- master..unmodified >actual &&
+ main..unmodified >actual &&
test_when_finished "rm 000?-*" &&
test_line_count = 5 actual &&
test_i18ngrep "^Range-diff:$" 0000-* &&
@@ -616,7 +616,7 @@ test_expect_success 'format-patch --range-diff with --no-notes' '
git notes add -m "unmodified note" unmodified &&
test_when_finished git notes remove topic unmodified &&
git format-patch --no-notes --cover-letter --range-diff=$prev \
- master..unmodified >actual &&
+ main..unmodified >actual &&
test_when_finished "rm 000?-*" &&
test_line_count = 5 actual &&
test_i18ngrep "^Range-diff:$" 0000-* &&
@@ -633,7 +633,7 @@ test_expect_success 'format-patch --range-diff with --notes' '
git notes add -m "unmodified note" unmodified &&
test_when_finished git notes remove topic unmodified &&
git format-patch --notes --cover-letter --range-diff=$prev \
- master..unmodified >actual &&
+ main..unmodified >actual &&
test_when_finished "rm 000?-*" &&
test_line_count = 5 actual &&
test_i18ngrep "^Range-diff:$" 0000-* &&
@@ -662,7 +662,7 @@ test_expect_success 'format-patch --range-diff with format.notes config' '
test_when_finished git notes remove topic unmodified &&
test_config format.notes true &&
git format-patch --cover-letter --range-diff=$prev \
- master..unmodified >actual &&
+ main..unmodified >actual &&
test_when_finished "rm 000?-*" &&
test_line_count = 5 actual &&
test_i18ngrep "^Range-diff:$" 0000-* &&
@@ -693,7 +693,7 @@ test_expect_success 'format-patch --range-diff with multiple notes' '
git notes --ref=note2 add -m "unmodified note2" unmodified &&
test_when_finished git notes --ref=note2 remove topic unmodified &&
git format-patch --notes=note1 --notes=note2 --cover-letter --range-diff=$prev \
- master..unmodified >actual &&
+ main..unmodified >actual &&
test_when_finished "rm 000?-*" &&
test_line_count = 5 actual &&
test_i18ngrep "^Range-diff:$" 0000-* &&
diff --git a/t/t3206/history.export b/t/t3206/history.export
index 4c808e5b3b..4485adc37b 100644
--- a/t/t3206/history.export
+++ b/t/t3206/history.export
@@ -168,7 +168,7 @@ mark :11
data 10
unrelated
-commit refs/heads/master
+commit refs/heads/main
mark :12
author Thomas Rast <[email protected]> 1374485127 +0200
committer Thomas Rast <[email protected]> 1374485127 +0200
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index f41b2afb99..a0b188fa4d 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -135,7 +135,7 @@ test_expect_success 'delete ref with dangling packed version' '
git commit --allow-empty -m "future garbage" &&
git pack-refs --all &&
git reset --hard HEAD^ &&
- git checkout master &&
+ git checkout main &&
git reflog expire --expire=all --all &&
git prune --expire=all &&
git branch -d lamb 2>result &&
@@ -240,7 +240,7 @@ test_expect_success 'retry acquiring packed-refs.lock' '
test_expect_success SYMLINKS 'pack symlinked packed-refs' '
# First make sure that symlinking works when reading:
- git update-ref refs/heads/lossy refs/heads/master &&
+ git update-ref refs/heads/lossy refs/heads/main &&
git for-each-ref >all-refs-before &&
mv .git/packed-refs .git/my-deviant-packed-refs &&
ln -s my-deviant-packed-refs .git/packed-refs &&
diff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh
index 3b7caca421..73a914d194 100755
--- a/t/t3211-peel-ref.sh
+++ b/t/t3211-peel-ref.sh
@@ -19,7 +19,7 @@ print_ref() {
test_expect_success 'set up expected show-ref output' '
{
- print_ref "refs/heads/master" &&
+ print_ref "refs/heads/main" &&
print_ref "refs/outside/foo" &&
print_ref "refs/outside/foo^{}" &&
print_ref "refs/tags/base" &&
@@ -47,7 +47,7 @@ test_expect_success 'create old-style pack-refs without fully-peeled' '
# know we are emulating exactly what an older git would have written.
{
echo "# pack-refs with: peeled " &&
- print_ref "refs/heads/master" &&
+ print_ref "refs/heads/main" &&
print_ref "refs/outside/foo" &&
print_ref "refs/tags/base" &&
print_ref "refs/tags/foo" &&
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 8f43303007..2b685580b6 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -1295,11 +1295,11 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '
test_i18ngrep "too many parameters" error
'
-test_expect_success 'git notes get-ref expands refs/heads/master to refs/notes/refs/heads/master' '
+test_expect_success 'git notes get-ref expands refs/heads/main to refs/notes/refs/heads/main' '
test_unconfig core.notesRef &&
sane_unset GIT_NOTES_REF &&
- echo refs/notes/refs/heads/master >expect &&
- git notes --ref=refs/heads/master get-ref >actual &&
+ echo refs/notes/refs/heads/main >expect &&
+ git notes --ref=refs/heads/main get-ref >actual &&
test_cmp expect actual
'
diff --git a/t/t3302-notes-index-expensive.sh b/t/t3302-notes-index-expensive.sh
index 7217c5e222..1c1490ca68 100755
--- a/t/t3302-notes-index-expensive.sh
+++ b/t/t3302-notes-index-expensive.sh
@@ -20,7 +20,7 @@ create_repo () {
notemark=$(($mark+1))
test_tick &&
cat <<-INPUT_END &&
- commit refs/heads/master
+ commit refs/heads/main
mark :$mark
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
diff --git a/t/t3303-notes-subtrees.sh b/t/t3303-notes-subtrees.sh
index 704aee81ef..d994492469 100755
--- a/t/t3303-notes-subtrees.sh
+++ b/t/t3303-notes-subtrees.sh
@@ -40,7 +40,7 @@ test_expect_success "setup: create $number_of_commits commits" '
nr=$(($nr+1)) &&
test_tick &&
cat <<INPUT_END
-commit refs/heads/master
+commit refs/heads/main
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
commit #$nr
@@ -75,7 +75,7 @@ test_sha1_based () {
(
start_note_commit &&
nr=$number_of_commits &&
- git rev-list refs/heads/master |
+ git rev-list refs/heads/main |
while read sha1; do
note_path=$(echo "$sha1" | sed "$1")
cat <<INPUT_END &&
@@ -105,7 +105,7 @@ test_same_notes () {
(
start_note_commit &&
nr=$number_of_commits &&
- git rev-list refs/heads/master |
+ git rev-list refs/heads/main |
while read sha1; do
first_note_path=$(echo "$sha1" | sed "$1")
second_note_path=$(echo "$sha1" | sed "$2")
@@ -144,7 +144,7 @@ test_concatenated_notes () {
(
start_note_commit &&
nr=$number_of_commits &&
- git rev-list refs/heads/master |
+ git rev-list refs/heads/main |
while read sha1; do
first_note_path=$(echo "$sha1" | sed "$1")
second_note_path=$(echo "$sha1" | sed "$2")
diff --git a/t/t3304-notes-mixed.sh b/t/t3304-notes-mixed.sh
index 1709e8c00b..802e004016 100755
--- a/t/t3304-notes-mixed.sh
+++ b/t/t3304-notes-mixed.sh
@@ -36,7 +36,7 @@ test_expect_success "setup: create a couple of commits" '
test_tick &&
cat <<INPUT_END >input &&
-commit refs/heads/master
+commit refs/heads/main
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
commit #1
@@ -51,7 +51,7 @@ INPUT_END
test_tick &&
cat <<INPUT_END >>input &&
-commit refs/heads/master
+commit refs/heads/main
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
commit #2
@@ -68,8 +68,8 @@ INPUT_END
test_expect_success "create a notes tree with both notes and non-notes" '
- commit1=$(git rev-parse refs/heads/master^) &&
- commit2=$(git rev-parse refs/heads/master) &&
+ commit1=$(git rev-parse refs/heads/main^) &&
+ commit2=$(git rev-parse refs/heads/main) &&
test_tick &&
cat <<INPUT_END >input &&
commit refs/notes/commits
diff --git a/t/t3308-notes-merge.sh b/t/t3308-notes-merge.sh
index 790e292966..9064cd90ca 100755
--- a/t/t3308-notes-merge.sh
+++ b/t/t3308-notes-merge.sh
@@ -109,7 +109,7 @@ test_expect_success 'fail to merge into various non-notes refs' '
git update-ref refs/notes/dir/foo HEAD &&
test_must_fail git -c "core.notesRef=refs/notes/dir" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/dir/" notes merge x &&
- test_must_fail git -c "core.notesRef=refs/heads/master" notes merge x &&
+ test_must_fail git -c "core.notesRef=refs/heads/main" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/y:" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/y:foo" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/foo^{bar" notes merge x
diff --git a/t/t3320-notes-merge-worktrees.sh b/t/t3320-notes-merge-worktrees.sh
index 823fdbda1f..465145c487 100755
--- a/t/t3320-notes-merge-worktrees.sh
+++ b/t/t3320-notes-merge-worktrees.sh
@@ -36,8 +36,8 @@ test_expect_success 'modify notes ref ourselves (x)' '
'
test_expect_success 'create some new worktrees' '
- git worktree add -b newbranch worktree master &&
- git worktree add -b newbranch2 worktree2 master
+ git worktree add -b newbranch worktree main &&
+ git worktree add -b newbranch2 worktree2 main
'
test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 40d2975995..cdfc7e083a 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -24,15 +24,15 @@ test_expect_success 'prepare repository with topic branches' '
git update-index --add Y &&
git commit -m "Add Y." &&
git checkout -b filemove &&
- git reset --soft master &&
+ git reset --soft main &&
mkdir D &&
git mv A D/A &&
git commit -m "Move A." &&
- git checkout -b my-topic-branch master &&
+ git checkout -b my-topic-branch main &&
echo Second >B &&
git update-index --add B &&
git commit -m "Add B." &&
- git checkout -f master &&
+ git checkout -f main &&
echo Third >>A &&
git update-index A &&
git commit -m "Modify A." &&
@@ -46,23 +46,23 @@ test_expect_success 'prepare repository with topic branches' '
test_expect_success 'rebase on dirty worktree' '
echo dirty >>A &&
- test_must_fail git rebase master
+ test_must_fail git rebase main
'
test_expect_success 'rebase on dirty cache' '
git add A &&
- test_must_fail git rebase master
+ test_must_fail git rebase main
'
-test_expect_success 'rebase against master' '
+test_expect_success 'rebase against main' '
git reset --hard HEAD &&
- git rebase master
+ git rebase main
'
test_expect_success 'rebase sets ORIG_HEAD to pre-rebase state' '
git checkout -b orig-head topic &&
pre="$(git rev-parse --verify HEAD)" &&
- git rebase master &&
+ git rebase main &&
test_cmp_rev "$pre" ORIG_HEAD &&
test_cmp_rev ! "$pre" HEAD
'
@@ -93,19 +93,19 @@ test_expect_success 'HEAD was detached during rebase' '
test_expect_success 'rebase from ambiguous branch name' '
git checkout -b topic side &&
- git rebase master
+ git rebase main
'
test_expect_success 'rebase off of the previous branch using "-"' '
- git checkout master &&
+ git checkout main &&
git checkout HEAD^ &&
git rebase @{-1} >expect.messages &&
- git merge-base master HEAD >expect.forkpoint &&
+ git merge-base main HEAD >expect.forkpoint &&
- git checkout master &&
+ git checkout main &&
git checkout HEAD^ &&
git rebase - >actual.messages &&
- git merge-base master HEAD >actual.forkpoint &&
+ git merge-base main HEAD >actual.forkpoint &&
test_cmp expect.forkpoint actual.forkpoint &&
# the next one is dubious---we may want to say "-",
@@ -114,7 +114,7 @@ test_expect_success 'rebase off of the previous branch using "-"' '
'
test_expect_success 'rebase a single mode change' '
- git checkout master &&
+ git checkout main &&
git branch -D topic &&
echo 1 >X &&
git add X &&
@@ -126,7 +126,7 @@ test_expect_success 'rebase a single mode change' '
test_chmod +x A &&
test_tick &&
git commit -m modechange &&
- GIT_TRACE=1 git rebase master
+ GIT_TRACE=1 git rebase main
'
test_expect_success 'rebase is not broken by diff.renames' '
@@ -162,11 +162,11 @@ test_expect_success 'fail when upstream arg is missing and not configured' '
test_expect_success 'rebase works with format.useAutoBase' '
test_config format.useAutoBase true &&
git checkout topic &&
- git rebase master
+ git rebase main
'
test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--merge)' '
- git checkout -b default-base master &&
+ git checkout -b default-base main &&
git checkout -b default topic &&
git config branch.default.remote . &&
git config branch.default.merge refs/heads/default-base &&
@@ -184,7 +184,7 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea
'
test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--apply)' '
- git checkout -B default-base master &&
+ git checkout -B default-base main &&
git checkout -B default topic &&
git config branch.default.remote . &&
git config branch.default.merge refs/heads/default-base &&
@@ -226,13 +226,13 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
test_expect_success 'rebase --apply -q is quiet' '
git checkout -b quiet topic &&
- git rebase --apply -q master >output.out 2>&1 &&
+ git rebase --apply -q main >output.out 2>&1 &&
test_must_be_empty output.out
'
test_expect_success 'rebase --merge -q is quiet' '
git checkout -B quiet topic &&
- git rebase --merge -q master >output.out 2>&1 &&
+ git rebase --merge -q main >output.out 2>&1 &&
test_must_be_empty output.out
'
@@ -294,7 +294,7 @@ test_expect_success 'rebase commit with an ancient timestamp' '
'
test_expect_success 'rebase with "From " line in commit message' '
- git checkout -b preserve-from master~1 &&
+ git checkout -b preserve-from main~1 &&
cat >From_.msg <<EOF &&
Somebody embedded an mbox in a commit message
@@ -310,7 +310,7 @@ EOF
>From_ &&
git add From_ &&
git commit -F From_.msg &&
- git rebase master &&
+ git rebase main &&
git log -1 --pretty=format:%B >out &&
test_cmp From_.msg out
'
@@ -357,12 +357,12 @@ test_expect_success 'rebase --apply and .gitattributes' '
git cherry-pick test &&
git checkout test &&
- git rebase master &&
+ git rebase main &&
grep "smudged" a.txt &&
git checkout removal &&
git reset --hard &&
- git rebase master &&
+ git rebase main &&
grep "clean" a.txt
)
'
@@ -402,20 +402,20 @@ test_expect_success 'rebase -c rebase.useBuiltin=false warning' '
'
test_expect_success 'switch to branch checked out here' '
- git checkout master &&
- git rebase master master
+ git checkout main &&
+ git rebase main main
'
test_expect_success 'switch to branch not checked out' '
- git checkout master &&
+ git checkout main &&
git branch other &&
- git rebase master other
+ git rebase main other
'
test_expect_success 'refuse to switch to branch checked out elsewhere' '
- git checkout master &&
+ git checkout main &&
git worktree add wt &&
- test_must_fail git -C wt rebase master master 2>err &&
+ test_must_fail git -C wt rebase main main 2>err &&
test_i18ngrep "already checked out" err
'
diff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh
index 6e032716a6..ed7fcb5a6c 100755
--- a/t/t3402-rebase-merge.sh
+++ b/t/t3402-rebase-merge.sh
@@ -19,10 +19,10 @@ test_expect_success setup '
git commit -m"initial" &&
git branch side &&
echo "11 $T" >>original &&
- git commit -a -m"master updates a bit." &&
+ git commit -a -m"main updates a bit." &&
echo "12 $T" >>original &&
- git commit -a -m"master updates a bit more." &&
+ git commit -a -m"main updates a bit more." &&
git checkout side &&
(echo "0 $T" && cat original) >renamed &&
@@ -47,13 +47,13 @@ test_expect_success setup '
'
test_expect_success 'reference merge' '
- git merge -s recursive -m "reference merge" master
+ git merge -s recursive -m "reference merge" main
'
PRE_REBASE=$(git rev-parse test-rebase)
test_expect_success rebase '
git checkout test-rebase &&
- GIT_TRACE=1 git rebase --merge master
+ GIT_TRACE=1 git rebase --merge main
'
test_expect_success 'test-rebase@{1} is pre rebase' '
@@ -72,24 +72,24 @@ test_expect_success 'merge and rebase should match' '
'
test_expect_success 'rebase the other way' '
- git reset --hard master &&
+ git reset --hard main &&
git rebase --merge side
'
test_expect_success 'rebase -Xtheirs' '
- git checkout -b conflicting master~2 &&
+ git checkout -b conflicting main~2 &&
echo "AB $T" >> original &&
git commit -mconflicting original &&
- git rebase -Xtheirs master &&
+ git rebase -Xtheirs main &&
grep AB original &&
! grep 11 original
'
test_expect_success 'rebase -Xtheirs from orphan' '
- git checkout --orphan orphan-conflicting master~2 &&
+ git checkout --orphan orphan-conflicting main~2 &&
echo "AB $T" >> original &&
git commit -morphan-conflicting original &&
- git rebase -Xtheirs master &&
+ git rebase -Xtheirs main &&
grep AB original &&
! grep 11 original
'
@@ -107,9 +107,9 @@ test_expect_success 'merge and rebase should match' '
test_expect_success 'picking rebase' '
git reset --hard side &&
- git rebase --merge --onto master side^^ &&
- mb=$(git merge-base master HEAD) &&
- if test "$mb" = "$(git rev-parse master)"
+ git rebase --merge --onto main side^^ &&
+ mb=$(git merge-base main HEAD) &&
+ if test "$mb" = "$(git rev-parse main)"
then
echo happy
else
@@ -140,11 +140,11 @@ test_expect_success 'rebase -s funny -Xopt' '
EOF
chmod +x test-bin/git-merge-funny &&
git reset --hard &&
- git checkout -b test-funny master^ &&
+ git checkout -b test-funny main^ &&
test_commit funny &&
(
PATH=./test-bin:$PATH &&
- git rebase -s funny -Xopt master
+ git rebase -s funny -Xopt main
) &&
test -f funny.was.run
'
@@ -165,7 +165,7 @@ test_expect_success 'rebase --skip works with two conflicts in a row' '
test_expect_success '--reapply-cherry-picks' '
git init repo &&
- # O(1-10) -- O(1-11) -- O(0-10) master
+ # O(1-10) -- O(1-11) -- O(0-10) main
# \
# -- O(1-11) -- O(1-12) otherbranch
@@ -187,18 +187,18 @@ test_expect_success '--reapply-cherry-picks' '
git -C repo commit -a -m "add 12 in another branch" &&
# Regular rebase fails, because the 1-11 commit is deduplicated
- test_must_fail git -C repo rebase --merge master 2> err &&
+ test_must_fail git -C repo rebase --merge main 2> err &&
test_i18ngrep "error: could not apply.*add 12 in another branch" err &&
git -C repo rebase --abort &&
# With --reapply-cherry-picks, it works
- git -C repo rebase --merge --reapply-cherry-picks master
+ git -C repo rebase --merge --reapply-cherry-picks main
'
test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs' '
git init server &&
- # O(1-10) -- O(1-11) -- O(1-12) master
+ # O(1-10) -- O(1-11) -- O(1-12) main
# \
# -- O(0-10) otherbranch
@@ -220,18 +220,18 @@ test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs
test_config -C server uploadpack.allowanysha1inwant 1 &&
git clone --filter=blob:none "file://$(pwd)/server" client &&
- git -C client checkout origin/master &&
+ git -C client checkout origin/main &&
git -C client checkout origin/otherbranch &&
# Sanity check to ensure that the blobs from the merge base and "add
# 11" are missing
git -C client rev-list --objects --all --missing=print >missing_list &&
- MERGE_BASE_BLOB=$(git -C server rev-parse master^^:file.txt) &&
- ADD_11_BLOB=$(git -C server rev-parse master^:file.txt) &&
+ MERGE_BASE_BLOB=$(git -C server rev-parse main^^:file.txt) &&
+ ADD_11_BLOB=$(git -C server rev-parse main^:file.txt) &&
grep "[?]$MERGE_BASE_BLOB" missing_list &&
grep "[?]$ADD_11_BLOB" missing_list &&
- git -C client rebase --merge --reapply-cherry-picks origin/master &&
+ git -C client rebase --merge --reapply-cherry-picks origin/main &&
# The blob from the merge base had to be fetched, but not "add 11"
git -C client rev-list --objects --all --missing=print >missing_list &&
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index a927774910..360b46adef 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -48,7 +48,7 @@ test_expect_success setup '
'
test_expect_success 'rebase with git am -3 (default)' '
- test_must_fail git rebase master
+ test_must_fail git rebase main
'
test_expect_success 'rebase --skip can not be used with other options' '
@@ -64,7 +64,7 @@ test_expect_success 'rebase moves back to skip-reference' '
test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
git branch post-rebase &&
git reset --hard pre-rebase &&
- test_must_fail git rebase master &&
+ test_must_fail git rebase main &&
echo "hello" > hello &&
git add hello &&
git rebase --continue &&
@@ -75,7 +75,7 @@ test_expect_success 'rebase moves back to skip-reference' '
test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
test_expect_success 'rebase with --merge' '
- test_must_fail git rebase --merge master
+ test_must_fail git rebase --merge main
'
test_expect_success 'rebase --skip with --merge' '
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 4a7d21f898..97d57ed35e 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -12,7 +12,7 @@ Initial setup:
one - two - three - four (conflict-branch)
/
- A - B - C - D - E (master)
+ A - B - C - D - E (main)
| \
| F - G - H (branch1)
| \
@@ -65,7 +65,7 @@ SHELL=
export SHELL
test_expect_success 'rebase --keep-empty' '
- git checkout -b emptybranch master &&
+ git checkout -b emptybranch main &&
git commit --allow-empty -m "empty" &&
git rebase --keep-empty -i HEAD~2 &&
git log --oneline >actual &&
@@ -86,7 +86,7 @@ test_expect_success 'rebase -i with empty todo list' '
'
test_expect_success 'rebase -i with the exec command' '
- git checkout master &&
+ git checkout main &&
(
set_fake_editor &&
FAKE_LINES="1 exec_>touch-one
@@ -103,12 +103,12 @@ test_expect_success 'rebase -i with the exec command' '
test_path_is_file touch-three &&
test_path_is_file "touch-file name with spaces" &&
test_path_is_file touch-after-semicolon &&
- test_cmp_rev master HEAD &&
+ test_cmp_rev main HEAD &&
rm -f touch-*
'
test_expect_success 'rebase -i with the exec command runs from tree root' '
- git checkout master &&
+ git checkout main &&
mkdir subdir && (cd subdir &&
set_fake_editor &&
FAKE_LINES="1 exec_>touch-subdir" \
@@ -121,7 +121,7 @@ test_expect_success 'rebase -i with the exec command runs from tree root' '
test_expect_success 'rebase -i with exec allows git commands in subdirs' '
test_when_finished "rm -rf subdir" &&
test_when_finished "git rebase --abort ||:" &&
- git checkout master &&
+ git checkout main &&
mkdir subdir && (cd subdir &&
set_fake_editor &&
FAKE_LINES="1 x_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
@@ -139,13 +139,13 @@ test_expect_success 'rebase -i sets work tree properly' '
'
test_expect_success 'rebase -i with the exec command checks tree cleanness' '
- git checkout master &&
+ git checkout main &&
(
set_fake_editor &&
test_must_fail env FAKE_LINES="exec_echo_foo_>file1 1" \
git rebase -i HEAD^
) &&
- test_cmp_rev master^ HEAD &&
+ test_cmp_rev main^ HEAD &&
git reset --hard &&
git rebase --continue
'
@@ -168,7 +168,7 @@ test_expect_success 'rebase -x with newline in command fails' '
'
test_expect_success 'rebase -i with exec of inexistent command' '
- git checkout master &&
+ git checkout main &&
test_when_finished "git rebase --abort" &&
(
set_fake_editor &&
@@ -259,8 +259,8 @@ test_expect_success 'stop on conflicting pick' '
>>>>>>> $commit... G
EOF
git tag new-branch1 &&
- test_must_fail git rebase -i master &&
- test "$(git rev-parse HEAD~3)" = "$(git rev-parse master)" &&
+ test_must_fail git rebase -i main &&
+ test "$(git rev-parse HEAD~3)" = "$(git rev-parse main)" &&
test_cmp expect .git/rebase-merge/patch &&
test_cmp expect2 file1 &&
test "$(git diff --name-status |
@@ -287,7 +287,7 @@ test_expect_success 'abort' '
test_expect_success 'abort with error when new base cannot be checked out' '
git rm --cached file1 &&
git commit -m "remove file in base" &&
- test_must_fail git rebase -i master > output 2>&1 &&
+ test_must_fail git rebase -i main > output 2>&1 &&
test_i18ngrep "The following untracked working tree files would be overwritten by checkout:" \
output &&
test_i18ngrep "file1" output &&
@@ -301,7 +301,7 @@ test_expect_success 'retain authorship' '
test_tick &&
GIT_AUTHOR_NAME="Twerp Snog" git commit -m "different author" &&
git tag twerp &&
- git rebase -i --onto master HEAD^ &&
+ git rebase -i --onto main HEAD^ &&
git show HEAD | grep "^Author: Twerp Snog"
'
@@ -336,10 +336,10 @@ test_expect_success 'squash' '
(
set_fake_editor &&
FAKE_LINES="1 squash 2" EXPECT_HEADER_COUNT=2 \
- git rebase -i --onto master HEAD~2
+ git rebase -i --onto main HEAD~2
) &&
test B = $(cat file7) &&
- test_cmp_rev HEAD^ master
+ test_cmp_rev HEAD^ main
'
test_expect_success 'retain authorship when squashing' '
@@ -366,12 +366,12 @@ test_expect_failure REBASE_P 'exchange two commits with -p' '
'
test_expect_success REBASE_P 'preserve merges with -p' '
- git checkout -b to-be-preserved master^ &&
+ git checkout -b to-be-preserved main^ &&
: > unrelated-file &&
git add unrelated-file &&
test_tick &&
git commit -m "unrelated" &&
- git checkout -b another-branch master &&
+ git checkout -b another-branch main &&
echo B > file1 &&
test_tick &&
git commit -m J file1 &&
@@ -394,7 +394,7 @@ test_expect_success REBASE_P 'preserve merges with -p' '
git commit -m M file1 &&
git checkout -b to-be-rebased &&
test_tick &&
- git rebase -i -p --onto branch1 master &&
+ git rebase -i -p --onto branch1 main &&
git update-index --refresh &&
git diff-files --quiet &&
git diff-index --quiet --cached HEAD -- &&
@@ -437,7 +437,7 @@ test_expect_success '--continue tries to commit' '
'
test_expect_success 'verbose flag is heeded, even after --continue' '
- git reset --hard master@{1} &&
+ git reset --hard main@{1} &&
test_tick &&
test_must_fail git rebase -v -i --onto new-branch1 HEAD^ &&
echo resolved > file1 &&
@@ -802,7 +802,7 @@ test_expect_success 'rebase -i continue with unstaged submodule' '
'
test_expect_success 'avoid unnecessary reset' '
- git checkout master &&
+ git checkout main &&
git reset --hard &&
test-tool chmtime =123456789 file3 &&
git update-index --refresh &&
@@ -814,14 +814,14 @@ test_expect_success 'avoid unnecessary reset' '
'
test_expect_success 'reword' '
- git checkout -b reword-branch master &&
+ git checkout -b reword-branch main &&
(
set_fake_editor &&
FAKE_LINES="1 2 3 reword 4" FAKE_COMMIT_MESSAGE="E changed" \
git rebase -i A &&
git show HEAD | grep "E changed" &&
- test $(git rev-parse master) != $(git rev-parse HEAD) &&
- test_cmp_rev master^ HEAD^ &&
+ test $(git rev-parse main) != $(git rev-parse HEAD) &&
+ test_cmp_rev main^ HEAD^ &&
FAKE_LINES="1 2 reword 3 4" FAKE_COMMIT_MESSAGE="D changed" \
git rebase -i A &&
git show HEAD^ | grep "D changed" &&
@@ -918,7 +918,7 @@ test_expect_success 'rebase-i history with funny messages' '
'
test_expect_success 'prepare for rebase -i --exec' '
- git checkout master &&
+ git checkout main &&
git checkout -b execute &&
test_commit one_exec main.txt one_exec &&
test_commit two_exec main.txt two_exec &&
@@ -1027,7 +1027,7 @@ test_expect_success 'rebase -i --exec without <CMD>' '
git reset --hard execute &&
test_must_fail git rebase -i --exec 2>actual &&
test_i18ngrep "requires a value" actual &&
- git checkout master
+ git checkout main
'
test_expect_success 'rebase -i --root re-order and drop commits' '
@@ -1079,7 +1079,7 @@ test_expect_success 'rebase -i --root fixup root commit' '
test_expect_success 'rebase -i --root reword original root commit' '
test_when_finished "test_might_fail git rebase --abort" &&
- git checkout -b reword-original-root-branch master &&
+ git checkout -b reword-original-root-branch main &&
(
set_fake_editor &&
FAKE_LINES="reword 1 2" FAKE_COMMIT_MESSAGE="A changed" \
@@ -1091,7 +1091,7 @@ test_expect_success 'rebase -i --root reword original root commit' '
test_expect_success 'rebase -i --root reword new root commit' '
test_when_finished "test_might_fail git rebase --abort" &&
- git checkout -b reword-now-root-branch master &&
+ git checkout -b reword-now-root-branch main &&
(
set_fake_editor &&
FAKE_LINES="reword 3 1" FAKE_COMMIT_MESSAGE="C changed" \
@@ -1251,7 +1251,7 @@ test_expect_success 'rebase -i error on commits with \ in message' '
'
test_expect_success SHA1 'short SHA-1 setup' '
- test_when_finished "git checkout master" &&
+ test_when_finished "git checkout main" &&
git checkout --orphan collide &&
git rm -rf . &&
(
@@ -1263,7 +1263,7 @@ test_expect_success SHA1 'short SHA-1 setup' '
'
test_expect_success SHA1 'short SHA-1 collide' '
- test_when_finished "reset_rebase && git checkout master" &&
+ test_when_finished "reset_rebase && git checkout main" &&
git checkout collide &&
colliding_sha1=6bcda37 &&
test $colliding_sha1 = "$(git rev-parse HEAD | cut -c 1-7)" &&
@@ -1385,11 +1385,11 @@ test_expect_success 'rebase --continue removes CHERRY_PICK_HEAD' '
rebase_setup_and_clean () {
test_when_finished "
- git checkout master &&
+ git checkout main &&
test_might_fail git branch -D $1 &&
test_might_fail git rebase --abort
" &&
- git checkout -b $1 ${2:-master}
+ git checkout -b $1 ${2:-main}
}
test_expect_success 'drop' '
@@ -1420,7 +1420,7 @@ test_expect_success 'rebase -i respects rebase.missingCommitsCheck = warn' '
cat >expect <<-EOF &&
Warning: some commits may have been dropped accidentally.
Dropped commits (newer to older):
- - $(git rev-list --pretty=oneline --abbrev-commit -1 master)
+ - $(git rev-list --pretty=oneline --abbrev-commit -1 main)
To avoid this message, use "drop" to explicitly remove a commit.
EOF
test_config rebase.missingCommitsCheck warn &&
@@ -1438,8 +1438,8 @@ test_expect_success 'rebase -i respects rebase.missingCommitsCheck = error' '
cat >expect <<-EOF &&
Warning: some commits may have been dropped accidentally.
Dropped commits (newer to older):
- - $(git rev-list --pretty=oneline --abbrev-commit -1 master)
- - $(git rev-list --pretty=oneline --abbrev-commit -1 master~2)
+ - $(git rev-list --pretty=oneline --abbrev-commit -1 main)
+ - $(git rev-list --pretty=oneline --abbrev-commit -1 main~2)
To avoid this message, use "drop" to explicitly remove a commit.
Use '\''git config rebase.missingCommitsCheck'\'' to change the level of warnings.
@@ -1481,11 +1481,11 @@ test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = ig
test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = warn' '
cat >expect <<-EOF &&
- error: invalid line 1: badcmd $(git rev-list --pretty=oneline --abbrev-commit -1 master~4)
+ error: invalid line 1: badcmd $(git rev-list --pretty=oneline --abbrev-commit -1 main~4)
Warning: some commits may have been dropped accidentally.
Dropped commits (newer to older):
- - $(git rev-list --pretty=oneline --abbrev-commit -1 master)
- - $(git rev-list --pretty=oneline --abbrev-commit -1 master~4)
+ - $(git rev-list --pretty=oneline --abbrev-commit -1 main)
+ - $(git rev-list --pretty=oneline --abbrev-commit -1 main~4)
To avoid this message, use "drop" to explicitly remove a commit.
EOF
head -n4 expect >expect.2 &&
@@ -1515,11 +1515,11 @@ test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = wa
test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = error' '
cat >expect <<-EOF &&
- error: invalid line 1: badcmd $(git rev-list --pretty=oneline --abbrev-commit -1 master~4)
+ error: invalid line 1: badcmd $(git rev-list --pretty=oneline --abbrev-commit -1 main~4)
Warning: some commits may have been dropped accidentally.
Dropped commits (newer to older):
- - $(git rev-list --pretty=oneline --abbrev-commit -1 master)
- - $(git rev-list --pretty=oneline --abbrev-commit -1 master~4)
+ - $(git rev-list --pretty=oneline --abbrev-commit -1 main)
+ - $(git rev-list --pretty=oneline --abbrev-commit -1 main~4)
To avoid this message, use "drop" to explicitly remove a commit.
Use '\''git config rebase.missingCommitsCheck'\'' to change the level of warnings.
@@ -1604,7 +1604,7 @@ test_expect_success 'respects rebase.abbreviateCommands with fixup, squash and e
(
set_cat_todo_editor &&
test_must_fail git rebase -i --exec "git show HEAD" \
- --autosquash master >actual
+ --autosquash main >actual
) &&
test_cmp expected actual
'
@@ -1615,7 +1615,7 @@ test_expect_success 'static check of bad command' '
set_fake_editor &&
test_must_fail env FAKE_LINES="1 2 3 bad 4 5" \
git rebase -i --root 2>actual &&
- test_i18ngrep "badcmd $(git rev-list --oneline -1 master~1)" \
+ test_i18ngrep "badcmd $(git rev-list --oneline -1 main~1)" \
actual &&
test_i18ngrep "You can fix this with .git rebase --edit-todo.." \
actual &&
diff --git a/t/t3405-rebase-malformed.sh b/t/t3405-rebase-malformed.sh
index 860e63e444..7ef8bfa0ac 100755
--- a/t/t3405-rebase-malformed.sh
+++ b/t/t3405-rebase-malformed.sh
@@ -52,7 +52,7 @@ test_expect_success setup '
git add file3 &&
git commit --allow-empty-message -m "" &&
- git checkout master &&
+ git checkout main &&
echo One >file1 &&
test_tick &&
@@ -62,7 +62,7 @@ test_expect_success setup '
test_expect_success 'rebase commit with multi-line subject' '
- git rebase master multi-line-subject &&
+ git rebase main multi-line-subject &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >F1 &&
test_cmp F0 F1 &&
@@ -70,14 +70,14 @@ test_expect_success 'rebase commit with multi-line subject' '
'
test_expect_success 'rebase commit with diff in message' '
- git rebase master diff-in-message &&
+ git rebase main diff-in-message &&
git cat-file commit HEAD | sed -e "1,/^$/d" >G1 &&
test_cmp G0 G1 &&
test_cmp G G0
'
test_expect_success 'rebase -m commit with empty message' '
- git rebase -m master empty-message-merge
+ git rebase -m main empty-message-merge
'
test_expect_success 'rebase -i commit with empty message' '
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index 927a4f4a4e..3a08c1133e 100755
--- a/t/t3406-rebase-message.sh
+++ b/t/t3406-rebase-message.sh
@@ -18,27 +18,27 @@ test_expect_success 'setup' '
'
test_expect_success 'rebase -m' '
- git rebase -m master >actual &&
+ git rebase -m main >actual &&
test_must_be_empty actual
'
-test_expect_success 'rebase against master twice' '
- git rebase --apply master >out &&
+test_expect_success 'rebase against main twice' '
+ git rebase --apply main >out &&
test_i18ngrep "Current branch topic is up to date" out
'
-test_expect_success 'rebase against master twice with --force' '
- git rebase --force-rebase --apply master >out &&
+test_expect_success 'rebase against main twice with --force' '
+ git rebase --force-rebase --apply main >out &&
test_i18ngrep "Current branch topic is up to date, rebase forced" out
'
-test_expect_success 'rebase against master twice from another branch' '
+test_expect_success 'rebase against main twice from another branch' '
git checkout topic^ &&
- git rebase --apply master topic >out &&
+ git rebase --apply main topic >out &&
test_i18ngrep "Current branch topic is up to date" out
'
-test_expect_success 'rebase fast-forward to master' '
+test_expect_success 'rebase fast-forward to main' '
git checkout topic^ &&
git rebase --apply topic >out &&
test_i18ngrep "Fast-forwarded HEAD to topic" out
@@ -46,21 +46,21 @@ test_expect_success 'rebase fast-forward to master' '
test_expect_success 'rebase --stat' '
git reset --hard start &&
- git rebase --stat master >diffstat.txt &&
+ git rebase --stat main >diffstat.txt &&
grep "^ fileX | *1 +$" diffstat.txt
'
test_expect_success 'rebase w/config rebase.stat' '
git reset --hard start &&
git config rebase.stat true &&
- git rebase master >diffstat.txt &&
+ git rebase main >diffstat.txt &&
grep "^ fileX | *1 +$" diffstat.txt
'
test_expect_success 'rebase -n overrides config rebase.stat config' '
git reset --hard start &&
git config rebase.stat true &&
- git rebase -n master >diffstat.txt &&
+ git rebase -n main >diffstat.txt &&
! grep "^ fileX | *1 +$" diffstat.txt
'
@@ -113,7 +113,7 @@ test_expect_success 'rebase -i onto unrelated history' '
git init unrelated &&
test_commit -C unrelated 1 &&
git -C unrelated remote add -f origin "$PWD" &&
- git -C unrelated branch --set-upstream-to=origin/master &&
+ git -C unrelated branch --set-upstream-to=origin/main &&
git -C unrelated -c core.editor=true rebase -i -v --stat >actual &&
test_i18ngrep "Changes to " actual &&
test_i18ngrep "5 files changed" actual
diff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh
index 97efea0f56..2c2a5b9c10 100755
--- a/t/t3407-rebase-abort.sh
+++ b/t/t3407-rebase-abort.sh
@@ -37,7 +37,7 @@ testrebase() {
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
- test_must_fail git rebase$type master &&
+ test_must_fail git rebase$type main &&
test_path_is_dir "$dotest" &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
@@ -48,10 +48,10 @@ testrebase() {
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
- test_must_fail git rebase$type master &&
+ test_must_fail git rebase$type main &&
test_path_is_dir "$dotest" &&
test_must_fail git rebase --skip &&
- test $(git rev-parse HEAD) = $(git rev-parse master) &&
+ test $(git rev-parse HEAD) = $(git rev-parse main) &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
@@ -61,13 +61,13 @@ testrebase() {
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
- test_must_fail git rebase$type master &&
+ test_must_fail git rebase$type main &&
test_path_is_dir "$dotest" &&
echo c > a &&
echo d >> a &&
git add a &&
test_must_fail git rebase --continue &&
- test $(git rev-parse HEAD) != $(git rev-parse master) &&
+ test $(git rev-parse HEAD) != $(git rev-parse main) &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
@@ -78,7 +78,7 @@ testrebase() {
# Clean up the state from the previous one
git reset --hard pre-rebase &&
git reflog show to-rebase > reflog_before &&
- test_must_fail git rebase$type master &&
+ test_must_fail git rebase$type main &&
git rebase --abort &&
git reflog show to-rebase > reflog_after &&
test_cmp reflog_before reflog_after &&
@@ -89,7 +89,7 @@ testrebase() {
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
- test_must_fail git rebase$type master &&
+ test_must_fail git rebase$type main &&
test_must_fail git rebase -v --abort &&
test_must_fail git rebase --abort -v &&
git rebase --abort
@@ -103,7 +103,7 @@ test_expect_success 'rebase --apply --quit' '
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
- test_must_fail git rebase --apply master &&
+ test_must_fail git rebase --apply main &&
test_path_is_dir .git/rebase-apply &&
head_before=$(git rev-parse HEAD) &&
git rebase --quit &&
@@ -115,7 +115,7 @@ test_expect_success 'rebase --merge --quit' '
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
- test_must_fail git rebase --merge master &&
+ test_must_fail git rebase --merge main &&
test_path_is_dir .git/rebase-merge &&
head_before=$(git rev-parse HEAD) &&
git rebase --quit &&
diff --git a/t/t3408-rebase-multi-line.sh b/t/t3408-rebase-multi-line.sh
index d2bd7c17b0..1cba82f001 100755
--- a/t/t3408-rebase-multi-line.sh
+++ b/t/t3408-rebase-multi-line.sh
@@ -46,7 +46,7 @@ But otherwise with a sane description." side2 &&
test_expect_success rebase '
git checkout side &&
- git rebase master &&
+ git rebase main &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect &&
test_cmp expect actual
diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh
index 3b340f1ece..b078985b95 100755
--- a/t/t3409-rebase-preserve-merges.sh
+++ b/t/t3409-rebase-preserve-merges.sh
@@ -18,7 +18,7 @@ export GIT_AUTHOR_EMAIL
# Clone 2 (conflicting merge):
#
-# A1--A2--B3 <-- origin/master
+# A1--A2--B3 <-- origin/main
# \ \
# B1------M <-- topic
# \
@@ -26,7 +26,7 @@ export GIT_AUTHOR_EMAIL
#
# Clone 3 (no-ff merge):
#
-# A1--A2--B3 <-- origin/master
+# A1--A2--B3 <-- origin/main
# \
# B1------M <-- topic
# \ /
@@ -44,7 +44,7 @@ test_expect_success 'setup for merge-preserving rebase' \
echo Second > B &&
git add B &&
git commit -m "Add B1" &&
- git checkout -f master &&
+ git checkout -f main &&
echo Third >> A &&
git commit -a -m "Modify A2" &&
echo Fifth > B &&
@@ -55,10 +55,10 @@ test_expect_success 'setup for merge-preserving rebase' \
(
cd clone2 &&
git checkout -b topic origin/topic &&
- test_must_fail git merge origin/master &&
+ test_must_fail git merge origin/main &&
echo Resolved >B &&
git add B &&
- git commit -m "Merge origin/master into topic"
+ git commit -m "Merge origin/main into topic"
) &&
git clone ./. clone3 &&
diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh
index 21632a984e..120315ac0e 100755
--- a/t/t3412-rebase-root.sh
+++ b/t/t3412-rebase-root.sh
@@ -24,7 +24,7 @@ test_expect_success 'prepare repository' '
test_expect_success 'rebase --root fails with too many args' '
git checkout -B fail other &&
- test_must_fail git rebase --onto master --root fail fail
+ test_must_fail git rebase --onto main --root fail fail
'
test_expect_success 'setup pre-rebase hook' '
@@ -44,7 +44,7 @@ EOF
test_expect_success 'rebase --root --onto <newbase>' '
git checkout -b work other &&
- git rebase --root --onto master &&
+ git rebase --root --onto main &&
git log --pretty=tformat:"%s" > rebased &&
test_cmp expect rebased
'
@@ -55,7 +55,7 @@ test_expect_success 'pre-rebase got correct input (1)' '
test_expect_success 'rebase --root --onto <newbase> <branch>' '
git branch work2 other &&
- git rebase --root --onto master work2 &&
+ git rebase --root --onto main work2 &&
git log --pretty=tformat:"%s" > rebased2 &&
test_cmp expect rebased2
'
@@ -66,7 +66,7 @@ test_expect_success 'pre-rebase got correct input (2)' '
test_expect_success 'rebase -i --root --onto <newbase>' '
git checkout -b work3 other &&
- git rebase -i --root --onto master &&
+ git rebase -i --root --onto main &&
git log --pretty=tformat:"%s" > rebased3 &&
test_cmp expect rebased3
'
@@ -77,7 +77,7 @@ test_expect_success 'pre-rebase got correct input (3)' '
test_expect_success 'rebase -i --root --onto <newbase> <branch>' '
git branch work4 other &&
- git rebase -i --root --onto master work4 &&
+ git rebase -i --root --onto main work4 &&
git log --pretty=tformat:"%s" > rebased4 &&
test_cmp expect rebased4
'
@@ -88,7 +88,7 @@ test_expect_success 'pre-rebase got correct input (4)' '
test_expect_success REBASE_P 'rebase -i -p with linear history' '
git checkout -b work5 other &&
- git rebase -i -p --root --onto master &&
+ git rebase -i -p --root --onto main &&
git log --pretty=tformat:"%s" > rebased5 &&
test_cmp expect rebased5
'
@@ -122,7 +122,7 @@ EOF
test_expect_success REBASE_P 'rebase -i -p with merge' '
git checkout -b work6 other &&
- git rebase -i -p --root --onto master &&
+ git rebase -i -p --root --onto main &&
log_with_names work6 > rebased6 &&
test_cmp expect-side rebased6
'
@@ -157,7 +157,7 @@ EOF
test_expect_success REBASE_P 'rebase -i -p with two roots' '
git checkout -b work7 other &&
- git rebase -i -p --root --onto master &&
+ git rebase -i -p --root --onto main &&
log_with_names work7 > rebased7 &&
test_cmp expect-third rebased7
'
@@ -173,14 +173,14 @@ EOF
test_expect_success 'pre-rebase hook stops rebase' '
git checkout -b stops1 other &&
- test_must_fail git rebase --root --onto master &&
+ test_must_fail git rebase --root --onto main &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops1 &&
test 0 = $(git rev-list other...stops1 | wc -l)
'
test_expect_success 'pre-rebase hook stops rebase -i' '
git checkout -b stops2 other &&
- test_must_fail git rebase --root --onto master &&
+ test_must_fail git rebase --root --onto main &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops2 &&
test 0 = $(git rev-list other...stops2 | wc -l)
'
@@ -190,7 +190,7 @@ test_expect_success 'remove pre-rebase hook' '
'
test_expect_success 'set up a conflict' '
- git checkout master &&
+ git checkout main &&
echo conflict > B &&
git add B &&
git commit -m conflict
@@ -198,7 +198,7 @@ test_expect_success 'set up a conflict' '
test_expect_success 'rebase --root with conflict (first part)' '
git checkout -b conflict1 other &&
- test_must_fail git rebase --root --onto master &&
+ test_must_fail git rebase --root --onto main &&
git ls-files -u | grep "B$"
'
@@ -225,7 +225,7 @@ test_expect_success 'rebase --root with conflict (second part)' '
test_expect_success 'rebase -i --root with conflict (first part)' '
git checkout -b conflict2 other &&
- test_must_fail git rebase -i --root --onto master &&
+ test_must_fail git rebase -i --root --onto main &&
git ls-files -u | grep "B$"
'
@@ -263,7 +263,7 @@ EOF
test_expect_success REBASE_P 'rebase -i -p --root with conflict (first part)' '
git checkout -b conflict3 other &&
- test_must_fail git rebase -i -p --root --onto master &&
+ test_must_fail git rebase -i -p --root --onto main &&
git ls-files -u | grep "B$"
'
diff --git a/t/t3413-rebase-hook.sh b/t/t3413-rebase-hook.sh
index b6833e9a5f..b5b8d3556e 100755
--- a/t/t3413-rebase-hook.sh
+++ b/t/t3413-rebase-hook.sh
@@ -18,7 +18,7 @@ test_expect_success setup '
git add git &&
test_tick &&
git commit -m side &&
- git checkout master &&
+ git checkout main &&
git log --pretty=oneline --abbrev-commit --graph --all &&
git branch test side
'
@@ -26,14 +26,14 @@ test_expect_success setup '
test_expect_success 'rebase' '
git checkout test &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
test "z$(cat git)" = zworld
'
test_expect_success 'rebase -i' '
git checkout test &&
git reset --hard side &&
- EDITOR=true git rebase -i master &&
+ EDITOR=true git rebase -i main &&
test "z$(cat git)" = zworld
'
@@ -49,53 +49,53 @@ EOF
test_expect_success 'pre-rebase hook gets correct input (1)' '
git checkout test &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
test "z$(cat git)" = zworld &&
- test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,
+ test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,
'
test_expect_success 'pre-rebase hook gets correct input (2)' '
git checkout test &&
git reset --hard side &&
- git rebase master test &&
+ git rebase main test &&
test "z$(cat git)" = zworld &&
- test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
+ test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,test
'
test_expect_success 'pre-rebase hook gets correct input (3)' '
git checkout test &&
git reset --hard side &&
- git checkout master &&
- git rebase master test &&
+ git checkout main &&
+ git rebase main test &&
test "z$(cat git)" = zworld &&
- test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
+ test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,test
'
test_expect_success 'pre-rebase hook gets correct input (4)' '
git checkout test &&
git reset --hard side &&
- EDITOR=true git rebase -i master &&
+ EDITOR=true git rebase -i main &&
test "z$(cat git)" = zworld &&
- test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,
+ test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,
'
test_expect_success 'pre-rebase hook gets correct input (5)' '
git checkout test &&
git reset --hard side &&
- EDITOR=true git rebase -i master test &&
+ EDITOR=true git rebase -i main test &&
test "z$(cat git)" = zworld &&
- test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
+ test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,test
'
test_expect_success 'pre-rebase hook gets correct input (6)' '
git checkout test &&
git reset --hard side &&
- git checkout master &&
- EDITOR=true git rebase -i master test &&
+ git checkout main &&
+ EDITOR=true git rebase -i main test &&
test "z$(cat git)" = zworld &&
- test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
+ test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,test
'
test_expect_success 'setup pre-rebase hook that fails' '
@@ -110,7 +110,7 @@ EOF
test_expect_success 'pre-rebase hook stops rebase (1)' '
git checkout test &&
git reset --hard side &&
- test_must_fail git rebase master &&
+ test_must_fail git rebase main &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test 0 = $(git rev-list HEAD...side | wc -l)
'
@@ -118,7 +118,7 @@ test_expect_success 'pre-rebase hook stops rebase (1)' '
test_expect_success 'pre-rebase hook stops rebase (2)' '
git checkout test &&
git reset --hard side &&
- test_must_fail env EDITOR=: git rebase -i master &&
+ test_must_fail env EDITOR=: git rebase -i main &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test 0 = $(git rev-list HEAD...side | wc -l)
'
@@ -126,7 +126,7 @@ test_expect_success 'pre-rebase hook stops rebase (2)' '
test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '
git checkout test &&
git reset --hard side &&
- git rebase --no-verify master &&
+ git rebase --no-verify main &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test "z$(cat git)" = zworld
'
@@ -134,7 +134,7 @@ test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '
test_expect_success 'rebase --no-verify overrides pre-rebase (2)' '
git checkout test &&
git reset --hard side &&
- EDITOR=true git rebase --no-verify -i master &&
+ EDITOR=true git rebase --no-verify -i main &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test "z$(cat git)" = zworld
'
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 7bab6000dc..40bb7ac649 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -407,7 +407,7 @@ test_expect_success 'wrapped original subject' '
test_expect_success 'abort last squash' '
test_when_finished "test_might_fail git rebase --abort" &&
- test_when_finished "git checkout master" &&
+ test_when_finished "git checkout main" &&
git checkout -b some-squashes &&
git commit --allow-empty -m first &&
diff --git a/t/t3416-rebase-onto-threedots.sh b/t/t3416-rebase-onto-threedots.sh
index 9c2548423b..4e78ee8f91 100755
--- a/t/t3416-rebase-onto-threedots.sh
+++ b/t/t3416-rebase-onto-threedots.sh
@@ -5,14 +5,14 @@ test_description='git rebase --onto A...B'
. ./test-lib.sh
. "$TEST_DIRECTORY/lib-rebase.sh"
-# Rebase only the tip commit of "topic" on merge base between "master"
-# and "topic". Cannot do this for "side" with "master" because there
+# Rebase only the tip commit of "topic" on merge base between "main"
+# and "topic". Cannot do this for "side" with "main" because there
# is no single merge base.
#
#
# F---G topic G'
# / /
-# A---B---C---D---E master --> A---B---C---D---E
+# A---B---C---D---E main --> A---B---C---D---E
# \ \ /
# \ x
# \ / \
@@ -26,7 +26,7 @@ test_expect_success setup '
git branch topic &&
git checkout side &&
test_commit H &&
- git checkout master &&
+ git checkout main &&
test_tick &&
git merge H &&
git tag D &&
@@ -42,83 +42,83 @@ test_expect_success setup '
test_commit K
'
-test_expect_success 'rebase --onto master...topic' '
+test_expect_success 'rebase --onto main...topic' '
git reset --hard &&
git checkout topic &&
git reset --hard G &&
- git rebase --onto master...topic F &&
+ git rebase --onto main...topic F &&
git rev-parse HEAD^1 >actual &&
git rev-parse C^0 >expect &&
test_cmp expect actual
'
-test_expect_success 'rebase --onto master...' '
+test_expect_success 'rebase --onto main...' '
git reset --hard &&
git checkout topic &&
git reset --hard G &&
- git rebase --onto master... F &&
+ git rebase --onto main... F &&
git rev-parse HEAD^1 >actual &&
git rev-parse C^0 >expect &&
test_cmp expect actual
'
-test_expect_success 'rebase --onto master...side' '
+test_expect_success 'rebase --onto main...side' '
git reset --hard &&
git checkout side &&
git reset --hard K &&
- test_must_fail git rebase --onto master...side J
+ test_must_fail git rebase --onto main...side J
'
-test_expect_success 'rebase -i --onto master...topic' '
+test_expect_success 'rebase -i --onto main...topic' '
git reset --hard &&
git checkout topic &&
git reset --hard G &&
set_fake_editor &&
- EXPECT_COUNT=1 git rebase -i --onto master...topic F &&
+ EXPECT_COUNT=1 git rebase -i --onto main...topic F &&
git rev-parse HEAD^1 >actual &&
git rev-parse C^0 >expect &&
test_cmp expect actual
'
-test_expect_success 'rebase -i --onto master...' '
+test_expect_success 'rebase -i --onto main...' '
git reset --hard &&
git checkout topic &&
git reset --hard G &&
set_fake_editor &&
- EXPECT_COUNT=1 git rebase -i --onto master... F &&
+ EXPECT_COUNT=1 git rebase -i --onto main... F &&
git rev-parse HEAD^1 >actual &&
git rev-parse C^0 >expect &&
test_cmp expect actual
'
-test_expect_success 'rebase -i --onto master...side' '
+test_expect_success 'rebase -i --onto main...side' '
git reset --hard &&
git checkout side &&
git reset --hard K &&
set_fake_editor &&
- test_must_fail git rebase -i --onto master...side J
+ test_must_fail git rebase -i --onto main...side J
'
test_expect_success 'rebase --keep-base --onto incompatible' '
- test_must_fail git rebase --keep-base --onto master...
+ test_must_fail git rebase --keep-base --onto main...
'
test_expect_success 'rebase --keep-base --root incompatible' '
test_must_fail git rebase --keep-base --root
'
-test_expect_success 'rebase --keep-base master from topic' '
+test_expect_success 'rebase --keep-base main from topic' '
git reset --hard &&
git checkout topic &&
git reset --hard G &&
- git rebase --keep-base master &&
+ git rebase --keep-base main &&
git rev-parse C >base.expect &&
- git merge-base master HEAD >base.actual &&
+ git merge-base main HEAD >base.actual &&
test_cmp base.expect base.actual &&
git rev-parse HEAD~2 >actual &&
@@ -126,23 +126,23 @@ test_expect_success 'rebase --keep-base master from topic' '
test_cmp expect actual
'
-test_expect_success 'rebase --keep-base master from side' '
+test_expect_success 'rebase --keep-base main from side' '
git reset --hard &&
git checkout side &&
git reset --hard K &&
- test_must_fail git rebase --keep-base master
+ test_must_fail git rebase --keep-base main
'
-test_expect_success 'rebase -i --keep-base master from topic' '
+test_expect_success 'rebase -i --keep-base main from topic' '
git reset --hard &&
git checkout topic &&
git reset --hard G &&
set_fake_editor &&
- EXPECT_COUNT=2 git rebase -i --keep-base master &&
+ EXPECT_COUNT=2 git rebase -i --keep-base main &&
git rev-parse C >base.expect &&
- git merge-base master HEAD >base.actual &&
+ git merge-base main HEAD >base.actual &&
test_cmp base.expect base.actual &&
git rev-parse HEAD~2 >actual &&
@@ -150,13 +150,13 @@ test_expect_success 'rebase -i --keep-base master from topic' '
test_cmp expect actual
'
-test_expect_success 'rebase -i --keep-base master from side' '
+test_expect_success 'rebase -i --keep-base main from side' '
git reset --hard &&
git checkout side &&
git reset --hard K &&
set_fake_editor &&
- test_must_fail git rebase -i --keep-base master
+ test_must_fail git rebase -i --keep-base main
'
test_done
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
index 7a2da972fd..b9e059e168 100755
--- a/t/t3418-rebase-continue.sh
+++ b/t/t3418-rebase-continue.sh
@@ -15,13 +15,13 @@ test_expect_success 'setup' '
git checkout -b topic HEAD^ &&
test_commit "commit-new-file-F2-on-topic-branch" F2 22 &&
- git checkout master
+ git checkout main
'
test_expect_success 'interactive rebase --continue works with touched file' '
rm -fr .git/rebase-* &&
git reset --hard &&
- git checkout master &&
+ git checkout main &&
FAKE_LINES="edit 1" git rebase -i HEAD^ &&
test-tool chmtime =-60 F1 &&
@@ -31,9 +31,9 @@ test_expect_success 'interactive rebase --continue works with touched file' '
test_expect_success 'non-interactive rebase --continue works with touched file' '
rm -fr .git/rebase-* &&
git reset --hard &&
- git checkout master &&
+ git checkout main &&
- test_must_fail git rebase --onto master master topic &&
+ test_must_fail git rebase --onto main main topic &&
echo "Resolved" >F2 &&
git add F2 &&
test-tool chmtime =-60 F1 &&
@@ -61,7 +61,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
chmod +x test-bin/git-merge-funny &&
(
PATH=./test-bin:$PATH &&
- test_must_fail git rebase -s funny -Xopt master topic
+ test_must_fail git rebase -s funny -Xopt main topic
) &&
test -f funny.was.run &&
rm funny.was.run &&
@@ -93,7 +93,7 @@ test_expect_success 'rebase -i --continue handles merge strategy and options' '
chmod +x test-bin/git-merge-funny &&
(
PATH=./test-bin:$PATH &&
- test_must_fail git rebase -i -s funny -Xopt -Xfoo master topic
+ test_must_fail git rebase -i -s funny -Xopt -Xfoo main topic
) &&
test -f funny.was.run &&
rm funny.was.run &&
@@ -188,11 +188,11 @@ test_expect_success '--skip after failed fixup cleans commit message' '
test_expect_success 'setup rerere database' '
rm -fr .git/rebase-* &&
git reset --hard commit-new-file-F3-on-topic-branch &&
- git checkout master &&
+ git checkout main &&
test_commit "commit-new-file-F3" F3 3 &&
test_config rerere.enabled true &&
git update-ref refs/heads/topic commit-new-file-F3-on-topic-branch &&
- test_must_fail git rebase -m master topic &&
+ test_must_fail git rebase -m main topic &&
echo "Resolved" >F2 &&
cp F2 expected-F2 &&
git add F2 &&
@@ -207,7 +207,7 @@ test_expect_success 'setup rerere database' '
prepare () {
rm -fr .git/rebase-* &&
git reset --hard commit-new-file-F3-on-topic-branch &&
- git checkout master &&
+ git checkout main &&
test_config rerere.enabled true
}
@@ -215,7 +215,7 @@ test_rerere_autoupdate () {
action=$1 &&
test_expect_success "rebase $action --continue remembers --rerere-autoupdate" '
prepare &&
- test_must_fail git rebase $action --rerere-autoupdate master topic &&
+ test_must_fail git rebase $action --rerere-autoupdate main topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
@@ -227,7 +227,7 @@ test_rerere_autoupdate () {
test_expect_success "rebase $action --continue honors rerere.autoUpdate" '
prepare &&
test_config rerere.autoupdate true &&
- test_must_fail git rebase $action master topic &&
+ test_must_fail git rebase $action main topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
@@ -239,7 +239,7 @@ test_rerere_autoupdate () {
test_expect_success "rebase $action --continue remembers --no-rerere-autoupdate" '
prepare &&
test_config rerere.autoupdate true &&
- test_must_fail git rebase $action --no-rerere-autoupdate master topic &&
+ test_must_fail git rebase $action --no-rerere-autoupdate main topic &&
test_cmp expected-F2 F2 &&
test_must_fail git diff-files --quiet &&
git add F2 &&
diff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh
index 1f32faa4a4..29fa76be4d 100755
--- a/t/t3419-rebase-patch-id.sh
+++ b/t/t3419-rebase-patch-id.sh
@@ -24,7 +24,7 @@ test_expect_success 'setup' '
test_expect_success 'setup: 500 lines' '
rm -f .gitattributes &&
- git checkout -q -f master &&
+ git checkout -q -f main &&
git reset --hard root &&
test_seq 500 >file &&
git add file &&
@@ -40,7 +40,7 @@ test_expect_success 'setup: 500 lines' '
git add newfile &&
git commit -q -m "add small file" &&
- git cherry-pick master >/dev/null 2>&1
+ git cherry-pick main >/dev/null 2>&1
'
test_expect_success 'setup attributes' '
@@ -48,18 +48,18 @@ test_expect_success 'setup attributes' '
'
test_expect_success 'detect upstream patch' '
- git checkout -q master &&
+ git checkout -q main &&
scramble file &&
git add file &&
git commit -q -m "change big file again" &&
git checkout -q other^{} &&
- git rebase master &&
- git rev-list master...HEAD~ >revs &&
+ git rebase main &&
+ git rev-list main...HEAD~ >revs &&
test_must_be_empty revs
'
test_expect_success 'do not drop patch' '
- git branch -f squashed master &&
+ git branch -f squashed main &&
git checkout -q -f squashed &&
git reset -q --soft HEAD~2 &&
git commit -q -m squashed &&
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index ca331733fb..b1263e5a47 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -21,12 +21,12 @@ test_expect_success setup '
git add . &&
test_tick &&
git commit -m "third commit" &&
- git checkout -b unrelated-onto-branch master &&
+ git checkout -b unrelated-onto-branch main &&
echo unrelated >file4 &&
git add . &&
test_tick &&
git commit -m "unrelated commit" &&
- git checkout -b related-onto-branch master &&
+ git checkout -b related-onto-branch main &&
echo conflicting-change >file2 &&
git add . &&
test_tick &&
@@ -305,7 +305,7 @@ test_expect_success 'autostash is saved on editor failure with conflict' '
'
test_expect_success 'autostash with dirty submodules' '
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
git checkout -b with-submodule &&
git submodule add ./ sub &&
test_tick &&
@@ -324,7 +324,7 @@ test_expect_success 'branch is left alone when possible' '
test_expect_success 'never change active branch' '
git checkout -b not-the-feature-branch unrelated-onto-branch &&
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
echo changed >file0 &&
git rebase --autostash not-the-feature-branch feature-branch &&
test_cmp_rev not-the-feature-branch unrelated-onto-branch
diff --git a/t/t3423-rebase-reword.sh b/t/t3423-rebase-reword.sh
index 6963750794..4859bb8f72 100755
--- a/t/t3423-rebase-reword.sh
+++ b/t/t3423-rebase-reword.sh
@@ -7,7 +7,7 @@ test_description='git rebase interactive with rewording'
. "$TEST_DIRECTORY"/lib-rebase.sh
test_expect_success 'setup' '
- test_commit master file-1 test &&
+ test_commit main file-1 test &&
git checkout -b stuff &&
@@ -22,7 +22,7 @@ test_expect_success 'reword without issues functions as intended' '
set_fake_editor &&
FAKE_LINES="pick 1 reword 2" FAKE_COMMIT_MESSAGE="feature_b_reworded" \
- git rebase -i -v master &&
+ git rebase -i -v main &&
test "$(git log -1 --format=%B)" = "feature_b_reworded" &&
test $(git rev-list --count HEAD) = 3
@@ -35,7 +35,7 @@ test_expect_success 'reword after a conflict preserves commit' '
set_fake_editor &&
test_must_fail env FAKE_LINES="reword 2" \
- git rebase -i -v master &&
+ git rebase -i -v main &&
git checkout --theirs file-2 &&
git add file-2 &&
diff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh
index 79e43a370b..329786051e 100755
--- a/t/t3427-rebase-subtree.sh
+++ b/t/t3427-rebase-subtree.sh
@@ -15,12 +15,12 @@ commit_message() {
# this test script tries to document them. First, the following commit history
# is generated (the onelines are shown, time flows from left to right):
#
-# master1 - master2 - master3
+# main1 - main2 - main3
# \
-# README ---------------------- Add subproject master - master4 - files_subtree/master5
+# README ---------------------- Add subproject main - main4 - files_subtree/main5
#
-# Where the merge moves the files master[123].t into the subdirectory
-# files_subtree/ and master4 as well as files_subtree/master5 add files to that
+# Where the merge moves the files main[123].t into the subdirectory
+# files_subtree/ and main4 as well as files_subtree/main5 add files to that
# directory directly.
#
# Then, in subsequent test cases, `git filter-branch` is used to distill just
@@ -28,11 +28,11 @@ commit_message() {
# an empty commit is added on top. The pre-rebase commit history looks like
# this:
#
-# Add subproject master - master4 - files_subtree/master5 - Empty commit
+# Add subproject main - main4 - files_subtree/main5 - Empty commit
#
-# where the root commit adds three files: master1.t, master2.t and master3.t.
+# where the root commit adds three files: main1.t, main2.t and main3.t.
#
-# This commit history is then rebased onto `master3` with the
+# This commit history is then rebased onto `main3` with the
# `-Xsubtree=files_subtree` option in three different ways:
#
# 1. using `--preserve-merges`
@@ -43,20 +43,20 @@ test_expect_success 'setup' '
test_commit README &&
git init files &&
- test_commit -C files master1 &&
- test_commit -C files master2 &&
- test_commit -C files master3 &&
+ test_commit -C files main1 &&
+ test_commit -C files main2 &&
+ test_commit -C files main3 &&
: perform subtree merge into files_subtree/ &&
- git fetch files refs/heads/master:refs/heads/files-master &&
+ git fetch files refs/heads/main:refs/heads/files-main &&
git merge -s ours --no-commit --allow-unrelated-histories \
- files-master &&
- git read-tree --prefix=files_subtree -u files-master &&
- git commit -m "Add subproject master" &&
+ files-main &&
+ git read-tree --prefix=files_subtree -u files-main &&
+ git commit -m "Add subproject main" &&
: add two extra commits to rebase &&
- test_commit -C files_subtree master4 &&
- test_commit files_subtree/master5 &&
+ test_commit -C files_subtree main4 &&
+ test_commit files_subtree/main5 &&
git checkout -b to-rebase &&
git fast-export --no-data HEAD -- files_subtree/ |
@@ -66,44 +66,44 @@ test_expect_success 'setup' '
git commit -m "Empty commit" --allow-empty
'
-# FAILURE: Does not preserve master4.
+# FAILURE: Does not preserve main4.
test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit' '
reset_rebase &&
git checkout -b rebase-preserve-merges to-rebase &&
- git rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&
- verbose test "$(commit_message HEAD~)" = "master4" &&
- verbose test "$(commit_message HEAD)" = "files_subtree/master5"
+ git rebase -Xsubtree=files_subtree --preserve-merges --onto files-main main &&
+ verbose test "$(commit_message HEAD~)" = "main4" &&
+ verbose test "$(commit_message HEAD)" = "files_subtree/main5"
'
-# FAILURE: Does not preserve master4.
+# FAILURE: Does not preserve main4.
test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit' '
reset_rebase &&
git checkout -b rebase-keep-empty to-rebase &&
- git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&
- verbose test "$(commit_message HEAD~2)" = "master4" &&
- verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
+ git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-main main &&
+ verbose test "$(commit_message HEAD~2)" = "main4" &&
+ verbose test "$(commit_message HEAD~)" = "files_subtree/main5" &&
verbose test "$(commit_message HEAD)" = "Empty commit"
'
test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '
reset_rebase &&
git checkout -b rebase-onto to-rebase &&
- test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-master master &&
+ test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-main main &&
: first pick results in no changes &&
git rebase --skip &&
- verbose test "$(commit_message HEAD~2)" = "master4" &&
- verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
+ verbose test "$(commit_message HEAD~2)" = "main4" &&
+ verbose test "$(commit_message HEAD~)" = "files_subtree/main5" &&
verbose test "$(commit_message HEAD)" = "Empty commit"
'
test_expect_success 'Rebase -Xsubtree --empty=ask --rebase-merges --onto commit' '
reset_rebase &&
git checkout -b rebase-merges-onto to-rebase &&
- test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-master --root &&
+ test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-main --root &&
: first pick results in no changes &&
git rebase --skip &&
- verbose test "$(commit_message HEAD~2)" = "master4" &&
- verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
+ verbose test "$(commit_message HEAD~2)" = "main4" &&
+ verbose test "$(commit_message HEAD~)" = "files_subtree/main5" &&
verbose test "$(commit_message HEAD)" = "Empty commit"
'
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh
index a1bc3e2001..b6e1165dc7 100755
--- a/t/t3430-rebase-merges.sh
+++ b/t/t3430-rebase-merges.sh
@@ -12,7 +12,7 @@ Initial setup:
-- B -- (first)
/ \
- A - C - D - E - H (master)
+ A - C - D - E - H (main)
\ \ /
\ F - G (second)
\
@@ -37,7 +37,7 @@ test_expect_success 'setup' '
git checkout -b first &&
test_commit B &&
b=$(git rev-parse --short HEAD) &&
- git checkout master &&
+ git checkout main &&
test_commit C &&
c=$(git rev-parse --short HEAD) &&
test_commit D &&
@@ -52,7 +52,7 @@ test_expect_success 'setup' '
f=$(git rev-parse --short HEAD) &&
test_commit G &&
g=$(git rev-parse --short HEAD) &&
- git checkout master &&
+ git checkout main &&
git merge --no-commit G &&
test_tick &&
git commit -m H &&
@@ -82,7 +82,7 @@ test_expect_success 'create completely different structure' '
EOF
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_tick &&
- git rebase -i -r A master &&
+ git rebase -i -r A main &&
test_cmp_graph <<-\EOF
* Merge the topic branch '\''onebranch'\''
|\
@@ -183,7 +183,7 @@ test_expect_success 'fast-forward merge -c still rewords' '
'
test_expect_success 'with a branch tip that was cherry-picked already' '
- git checkout -b already-upstream master &&
+ git checkout -b already-upstream main &&
base="$(git rev-parse --verify HEAD)" &&
test_commit A1 &&
@@ -211,7 +211,7 @@ test_expect_success 'with a branch tip that was cherry-picked already' '
'
test_expect_success 'do not rebase cousins unless asked for' '
- git checkout -b cousins master &&
+ git checkout -b cousins main &&
before="$(git rev-parse --verify HEAD)" &&
test_tick &&
git rebase -r HEAD^ &&
@@ -340,7 +340,7 @@ test_expect_success 'a "merge" into a root commit is a fast-forward' '
test_expect_success 'A root commit can be a cousin, treat it that way' '
git checkout --orphan khnum &&
test_commit yama &&
- git checkout -b asherah master &&
+ git checkout -b asherah main &&
test_commit shamkat &&
git merge --allow-unrelated-histories khnum &&
test_tick &&
@@ -367,7 +367,7 @@ test_expect_success 'labels that are object IDs are rewritten' '
git checkout -b third B &&
test_commit I &&
third=$(git rev-parse HEAD) &&
- git checkout -b labels master &&
+ git checkout -b labels main &&
git merge --no-commit third &&
test_tick &&
git commit -m "Merge commit '\''$third'\'' into labels" &&
diff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh
index 172562789e..d5d9b2304d 100755
--- a/t/t3431-rebase-fork-point.sh
+++ b/t/t3431-rebase-fork-point.sh
@@ -7,11 +7,11 @@ test_description='git rebase --fork-point test'
. ./test-lib.sh
-# A---B---D---E (master)
+# A---B---D---E (main)
# \
# C*---F---G (side)
#
-# C was formerly part of master but master was rewound to remove C
+# C was formerly part of main but main was rewound to remove C
#
test_expect_success setup '
test_commit A &&
@@ -30,7 +30,7 @@ test_rebase () {
expected="$1" &&
shift &&
test_expect_success "git rebase $*" "
- git checkout master &&
+ git checkout main &&
git reset --hard E &&
git checkout side &&
git reset --hard G &&
@@ -48,26 +48,26 @@ test_rebase 'G F C E D B A' --no-fork-point
test_rebase 'G F C D B A' --no-fork-point --onto D
test_rebase 'G F C B A' --no-fork-point --keep-base
-test_rebase 'G F E D B A' --fork-point refs/heads/master
-test_rebase 'G F E D B A' --fork-point master
+test_rebase 'G F E D B A' --fork-point refs/heads/main
+test_rebase 'G F E D B A' --fork-point main
-test_rebase 'G F D B A' --fork-point --onto D refs/heads/master
-test_rebase 'G F D B A' --fork-point --onto D master
+test_rebase 'G F D B A' --fork-point --onto D refs/heads/main
+test_rebase 'G F D B A' --fork-point --onto D main
-test_rebase 'G F B A' --fork-point --keep-base refs/heads/master
-test_rebase 'G F B A' --fork-point --keep-base master
+test_rebase 'G F B A' --fork-point --keep-base refs/heads/main
+test_rebase 'G F B A' --fork-point --keep-base main
-test_rebase 'G F C E D B A' refs/heads/master
-test_rebase 'G F C E D B A' master
+test_rebase 'G F C E D B A' refs/heads/main
+test_rebase 'G F C E D B A' main
-test_rebase 'G F C D B A' --onto D refs/heads/master
-test_rebase 'G F C D B A' --onto D master
+test_rebase 'G F C D B A' --onto D refs/heads/main
+test_rebase 'G F C D B A' --onto D main
-test_rebase 'G F C B A' --keep-base refs/heads/master
-test_rebase 'G F C B A' --keep-base master
+test_rebase 'G F C B A' --keep-base refs/heads/main
+test_rebase 'G F C B A' --keep-base main
test_expect_success 'git rebase --fork-point with ambigous refname' '
- git checkout master &&
+ git checkout main &&
git checkout -b one &&
git checkout side &&
git tag one &&
diff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh
index 6f0452c0ea..0ca2549870 100755
--- a/t/t3432-rebase-fast-forward.sh
+++ b/t/t3432-rebase-fast-forward.sh
@@ -83,19 +83,19 @@ test_rebase_same_head_ () {
changes='no changes'
test_rebase_same_head success noop same success work same
-test_rebase_same_head success noop same success work same master
+test_rebase_same_head success noop same success work same main
test_rebase_same_head success noop same success work diff --onto B B
test_rebase_same_head success noop same success work diff --onto B... B
-test_rebase_same_head success noop same success work same --onto master... master
-test_rebase_same_head success noop same success work same --keep-base master
+test_rebase_same_head success noop same success work same --onto main... main
+test_rebase_same_head success noop same success work same --keep-base main
test_rebase_same_head success noop same success work same --keep-base
test_rebase_same_head success noop same success work same --no-fork-point
test_rebase_same_head success noop same success work same --keep-base --no-fork-point
-test_rebase_same_head success noop same success work same --fork-point master
+test_rebase_same_head success noop same success work same --fork-point main
test_rebase_same_head success noop same success work diff --fork-point --onto B B
test_rebase_same_head success noop same success work diff --fork-point --onto B... B
-test_rebase_same_head success noop same success work same --fork-point --onto master... master
-test_rebase_same_head success noop same success work same --keep-base --keep-base master
+test_rebase_same_head success noop same success work same --fork-point --onto main... main
+test_rebase_same_head success noop same success work same --keep-base --keep-base main
test_expect_success 'add work same to side' '
test_commit E
@@ -103,22 +103,22 @@ test_expect_success 'add work same to side' '
changes='our changes'
test_rebase_same_head success noop same success work same
-test_rebase_same_head success noop same success work same master
+test_rebase_same_head success noop same success work same main
test_rebase_same_head success noop same success work diff --onto B B
test_rebase_same_head success noop same success work diff --onto B... B
-test_rebase_same_head success noop same success work same --onto master... master
-test_rebase_same_head success noop same success work same --keep-base master
+test_rebase_same_head success noop same success work same --onto main... main
+test_rebase_same_head success noop same success work same --keep-base main
test_rebase_same_head success noop same success work same --keep-base
test_rebase_same_head success noop same success work same --no-fork-point
test_rebase_same_head success noop same success work same --keep-base --no-fork-point
-test_rebase_same_head success noop same success work same --fork-point master
+test_rebase_same_head success noop same success work same --fork-point main
test_rebase_same_head success noop same success work diff --fork-point --onto B B
test_rebase_same_head success noop same success work diff --fork-point --onto B... B
-test_rebase_same_head success noop same success work same --fork-point --onto master... master
-test_rebase_same_head success noop same success work same --fork-point --keep-base master
+test_rebase_same_head success noop same success work same --fork-point --onto main... main
+test_rebase_same_head success noop same success work same --fork-point --keep-base main
test_expect_success 'add work same to upstream' '
- git checkout master &&
+ git checkout main &&
test_commit F &&
git checkout side
'
@@ -126,12 +126,12 @@ test_expect_success 'add work same to upstream' '
changes='our and their changes'
test_rebase_same_head success noop same success work diff --onto B B
test_rebase_same_head success noop same success work diff --onto B... B
-test_rebase_same_head success noop same success work diff --onto master... master
-test_rebase_same_head success noop same success work diff --keep-base master
+test_rebase_same_head success noop same success work diff --onto main... main
+test_rebase_same_head success noop same success work diff --keep-base main
test_rebase_same_head success noop same success work diff --keep-base
test_rebase_same_head failure work same success work diff --fork-point --onto B B
test_rebase_same_head failure work same success work diff --fork-point --onto B... B
-test_rebase_same_head success noop same success work diff --fork-point --onto master... master
-test_rebase_same_head success noop same success work diff --fork-point --keep-base master
+test_rebase_same_head success noop same success work diff --fork-point --onto main... main
+test_rebase_same_head success noop same success work diff --fork-point --keep-base main
test_done
diff --git a/t/t3434-rebase-i18n.sh b/t/t3434-rebase-i18n.sh
index c7c835cde9..a252908d02 100755
--- a/t/t3434-rebase-i18n.sh
+++ b/t/t3434-rebase-i18n.sh
@@ -7,7 +7,7 @@ test_description='rebase with changing encoding
Initial setup:
-1 - 2 master
+1 - 2 main
\
3 - 4 first
\
@@ -41,7 +41,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '
git config i18n.commitencoding eucJP &&
git merge -F "$TEST_DIRECTORY/t3434/eucJP.txt" second &&
git config i18n.commitencoding UTF-8 &&
- git rebase --rebase-merges master &&
+ git rebase --rebase-merges main &&
compare_msg eucJP.txt eucJP UTF-8
'
@@ -50,7 +50,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP
git config i18n.commitencoding eucJP &&
git merge -F "$TEST_DIRECTORY/t3434/eucJP.txt" second &&
git config i18n.commitencoding ISO-2022-JP &&
- git rebase --rebase-merges master &&
+ git rebase --rebase-merges main &&
compare_msg eucJP.txt eucJP ISO-2022-JP
'
@@ -66,7 +66,7 @@ test_rebase_continue_update_encode () {
git config i18n.commitencoding $old &&
git commit -F "$TEST_DIRECTORY/t3434/$msgfile" &&
git config i18n.commitencoding $new &&
- test_must_fail git rebase -m master &&
+ test_must_fail git rebase -m main &&
test -f .git/rebase-merge/message &&
git stripspace <.git/rebase-merge/message >two.t &&
git add two.t &&
diff --git a/t/t3435-rebase-gpg-sign.sh b/t/t3435-rebase-gpg-sign.sh
index b47c59c190..97507d0d5e 100755
--- a/t/t3435-rebase-gpg-sign.sh
+++ b/t/t3435-rebase-gpg-sign.sh
@@ -46,7 +46,7 @@ test_expect_success 'setup: merge commit' '
test_commit fork-point &&
git switch -c side &&
test_commit three &&
- git switch master &&
+ git switch main &&
git merge --no-ff side &&
git tag merged
'
@@ -64,7 +64,7 @@ test_rebase_gpg_sign false -i --no-gpg-sign --gpg-sign
test_expect_failure 'rebase -p --no-gpg-sign override commit.gpgsign' '
git reset --hard merged &&
git config commit.gpgsign true &&
- git rebase -p --no-gpg-sign --onto=one fork-point master &&
+ git rebase -p --no-gpg-sign --onto=one fork-point main &&
test_must_fail git verify-commit HEAD
'
diff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh
index f038f34b7c..6237ca6205 100755
--- a/t/t3500-cherry.sh
+++ b/t/t3500-cherry.sh
@@ -5,7 +5,7 @@
test_description='git cherry should detect patches integrated upstream
-This test cherry-picks one local change of two into master branch, and
+This test cherry-picks one local change of two into main branch, and
checks that git cherry only returns the second patch in the local branch
'
. ./test-lib.sh
@@ -32,7 +32,7 @@ test_expect_success \
test_tick &&
git commit -m "Add C." &&
- git checkout -f master &&
+ git checkout -f main &&
rm -f B C &&
echo Third >> A &&
@@ -40,19 +40,19 @@ test_expect_success \
test_tick &&
git commit -m "Modify A." &&
- expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*"
+ expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* + .*"
'
test_expect_success \
'check that cherry with limit returns only the top patch'\
- 'expr "$(echo $(git cherry master my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
+ 'expr "$(echo $(git cherry main my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
'
test_expect_success \
'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \
'git cherry-pick my-topic-branch^0 &&
- echo $(git cherry master my-topic-branch) &&
- expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* - .*"
+ echo $(git cherry main my-topic-branch) &&
+ expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* - .*"
'
test_done
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index 7c1da21df1..2cd535fb6f 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -112,7 +112,7 @@ test_expect_success 'cherry-pick on unborn branch' '
test_expect_success 'cherry-pick "-" to pick from previous branch' '
git checkout unborn &&
test_commit to-pick actual content &&
- git checkout master &&
+ git checkout main &&
git cherry-pick - &&
echo content >expect &&
test_cmp expect actual
@@ -132,7 +132,7 @@ test_expect_success 'cherry-pick "-" is meaningless without checkout' '
test_expect_success 'cherry-pick "-" works with arguments' '
git checkout -b side-branch &&
test_commit change actual change &&
- git checkout master &&
+ git checkout main &&
git cherry-pick -s - &&
echo "Signed-off-by: C O Mitter <[email protected]>" >expect &&
git cat-file commit HEAD | grep ^Signed-off-by: >signoff &&
diff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh
index 8b635a196d..4d6ff14eb6 100755
--- a/t/t3502-cherry-pick-merge.sh
+++ b/t/t3502-cherry-pick-merge.sh
@@ -25,7 +25,7 @@ test_expect_success setup '
echo new line >B &&
git commit -m "add line to B" B &&
git tag b &&
- git checkout master &&
+ git checkout main &&
git merge side &&
git tag c
diff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh
index e27f39d1e5..59496a56b7 100755
--- a/t/t3503-cherry-pick-root.sh
+++ b/t/t3503-cherry-pick-root.sh
@@ -30,7 +30,7 @@ test_expect_success setup '
test_expect_success 'cherry-pick a root commit' '
git checkout second^0 &&
- git cherry-pick master &&
+ git cherry-pick main &&
echo first >expect &&
test_cmp expect file1
@@ -38,14 +38,14 @@ test_expect_success 'cherry-pick a root commit' '
test_expect_success 'revert a root commit' '
- git revert master &&
+ git revert main &&
test_path_is_missing file1
'
test_expect_success 'cherry-pick a root commit with an external strategy' '
- git cherry-pick --strategy=resolve master &&
+ git cherry-pick --strategy=resolve main &&
echo first >expect &&
test_cmp expect file1
@@ -53,7 +53,7 @@ test_expect_success 'cherry-pick a root commit with an external strategy' '
test_expect_success 'revert a root commit with an external strategy' '
- git revert --strategy=resolve master &&
+ git revert --strategy=resolve main &&
test_path_is_missing file1
'
@@ -65,7 +65,7 @@ test_expect_success 'cherry-pick two root commits' '
echo third >expect.file3 &&
git checkout second^0 &&
- git cherry-pick master third &&
+ git cherry-pick main third &&
test_cmp expect.file1 file1 &&
test_cmp expect.file2 file2 &&
diff --git a/t/t3504-cherry-pick-rerere.sh b/t/t3504-cherry-pick-rerere.sh
index 80a0d08706..3804527e2e 100755
--- a/t/t3504-cherry-pick-rerere.sh
+++ b/t/t3504-cherry-pick-rerere.sh
@@ -6,8 +6,8 @@ test_description='cherry-pick should rerere for conflicts'
test_expect_success setup '
test_commit foo &&
- test_commit foo-master foo &&
- test_commit bar-master bar &&
+ test_commit foo-main foo &&
+ test_commit bar-main bar &&
git checkout -b dev foo &&
test_commit foo-dev foo &&
@@ -16,7 +16,7 @@ test_expect_success setup '
'
test_expect_success 'conflicting merge' '
- test_must_fail git merge master
+ test_must_fail git merge main
'
test_expect_success 'fixup' '
@@ -29,7 +29,7 @@ test_expect_success 'fixup' '
'
test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '
- test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue &&
@@ -41,7 +41,7 @@ test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '
test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '
test_config rerere.autoUpdate true &&
- test_must_fail git cherry-pick foo..bar-master &&
+ test_must_fail git cherry-pick foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue &&
@@ -53,7 +53,7 @@ test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '
test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '
test_config rerere.autoUpdate true &&
- test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
test_must_fail git diff-files --quiet &&
git add foo &&
@@ -66,7 +66,7 @@ test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '
'
test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '
- test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue --rerere-autoupdate >actual 2>&1 &&
@@ -79,25 +79,25 @@ test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '
'
test_expect_success 'cherry-pick --rerere-autoupdate more than once' '
- test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
git cherry-pick --abort &&
- test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
git cherry-pick --abort &&
- test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-main &&
test_must_fail git diff-files --quiet &&
git cherry-pick --abort
'
test_expect_success 'cherry-pick conflict without rerere' '
test_config rerere.enabled false &&
- test_must_fail git cherry-pick foo-master &&
+ test_must_fail git cherry-pick foo-main &&
grep ===== foo &&
grep foo-dev foo &&
- grep foo-master foo
+ grep foo-main foo
'
test_done
diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh
index 5f911bb529..07419a4e4a 100755
--- a/t/t3505-cherry-pick-empty.sh
+++ b/t/t3505-cherry-pick-empty.sh
@@ -17,7 +17,7 @@ test_expect_success setup '
test_tick &&
git commit --allow-empty-message -m "" &&
- git checkout master &&
+ git checkout main &&
git checkout -b empty-change-branch &&
test_tick &&
git commit --allow-empty -m "empty"
@@ -25,7 +25,7 @@ test_expect_success setup '
'
test_expect_success 'cherry-pick an empty commit' '
- git checkout master &&
+ git checkout main &&
test_expect_code 1 git cherry-pick empty-change-branch
'
@@ -35,7 +35,7 @@ test_expect_success 'index lockfile was removed' '
test_expect_success 'cherry-pick a commit with an empty message' '
test_when_finished "git reset --hard empty-message-branch~1" &&
- git checkout master &&
+ git checkout main &&
git cherry-pick empty-message-branch
'
@@ -44,12 +44,12 @@ test_expect_success 'index lockfile was removed' '
'
test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '
- git checkout -f master &&
+ git checkout -f main &&
git cherry-pick --allow-empty-message empty-message-branch
'
test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '
- git checkout master &&
+ git checkout main &&
echo fourth >>file2 &&
git add file2 &&
git commit -m "fourth" &&
@@ -57,22 +57,22 @@ test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '
'
test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' '
- git checkout master &&
+ git checkout main &&
git cherry-pick --allow-empty empty-change-branch
'
test_expect_success 'cherry pick with --keep-redundant-commits' '
- git checkout master &&
+ git checkout main &&
git cherry-pick --keep-redundant-commits HEAD^
'
test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '
- git checkout master &&
+ git checkout main &&
git branch fork &&
echo foo >file2 &&
git add file2 &&
test_tick &&
- git commit -m "add file2 on master" &&
+ git commit -m "add file2 on main" &&
git checkout fork &&
echo foo >file2 &&
@@ -84,15 +84,15 @@ test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '
test_expect_success 'cherry-pick a no-op without --keep-redundant' '
git reset --hard &&
git checkout fork^0 &&
- test_must_fail git cherry-pick master
+ test_must_fail git cherry-pick main
'
test_expect_success 'cherry-pick a no-op with --keep-redundant' '
git reset --hard &&
git checkout fork^0 &&
- git cherry-pick --keep-redundant-commits master &&
+ git cherry-pick --keep-redundant-commits main &&
git show -s --format=%s >actual &&
- echo "add file2 on master" >expect &&
+ echo "add file2 on main" >expect &&
test_cmp expect actual
'
diff --git a/t/t3506-cherry-pick-ff.sh b/t/t3506-cherry-pick-ff.sh
index 9d5adbc130..08b461dfcf 100755
--- a/t/t3506-cherry-pick-ff.sh
+++ b/t/t3506-cherry-pick-ff.sh
@@ -24,7 +24,7 @@ test_expect_success setup '
'
test_expect_success 'cherry-pick using --ff fast forwards' '
- git checkout master &&
+ git checkout main &&
git reset --hard first &&
test_tick &&
git cherry-pick --ff second &&
@@ -32,7 +32,7 @@ test_expect_success 'cherry-pick using --ff fast forwards' '
'
test_expect_success 'cherry-pick not using --ff does not fast forwards' '
- git checkout master &&
+ git checkout main &&
git reset --hard first &&
test_tick &&
git cherry-pick second &&
@@ -49,7 +49,7 @@ test_expect_success 'cherry-pick not using --ff does not fast forwards' '
# (This has been taken from t3502-cherry-pick-merge.sh)
#
test_expect_success 'merge setup' '
- git checkout master &&
+ git checkout main &&
git reset --hard first &&
echo new line >A &&
git add A &&
@@ -62,7 +62,7 @@ test_expect_success 'merge setup' '
test_tick &&
git commit -m "add line to B" B &&
git tag B &&
- git checkout master &&
+ git checkout main &&
git merge side &&
git tag C &&
git checkout -b new A
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
index 752bc43487..8c5e762ff8 100755
--- a/t/t3507-cherry-pick-conflict.sh
+++ b/t/t3507-cherry-pick-conflict.sh
@@ -29,7 +29,7 @@ test_expect_success setup '
test_commit redundant-pick foo c redundant &&
git commit --allow-empty --allow-empty-message &&
git tag empty &&
- git checkout master &&
+ git checkout main &&
git config advice.detachedhead false
'
diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh
index 23070a7b73..bdb995235f 100755
--- a/t/t3508-cherry-pick-many-commits.sh
+++ b/t/t3508-cherry-pick-many-commits.sh
@@ -31,7 +31,7 @@ test_expect_success setup '
'
test_expect_success 'cherry-pick first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick first..fourth &&
@@ -45,7 +45,7 @@ test_expect_success 'cherry-pick three one two works' '
test_commit one &&
test_commit two &&
test_commit three &&
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
git cherry-pick three one two &&
git diff --quiet three &&
@@ -56,28 +56,28 @@ two"
'
test_expect_success 'cherry-pick three one two: fails' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_must_fail git cherry-pick three one two:
'
test_expect_success 'output to keep user entertained during multi-pick' '
cat <<-\EOF >expected &&
- [master OBJID] second
+ [main OBJID] second
Author: A U Thor <[email protected]>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
- [master OBJID] third
+ [main OBJID] third
Author: A U Thor <[email protected]>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
- [master OBJID] fourth
+ [main OBJID] fourth
Author: A U Thor <[email protected]>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
EOF
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick first..fourth >actual &&
@@ -87,7 +87,7 @@ test_expect_success 'output to keep user entertained during multi-pick' '
'
test_expect_success 'cherry-pick --strategy resolve first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick --strategy resolve first..fourth &&
@@ -99,23 +99,23 @@ test_expect_success 'cherry-pick --strategy resolve first..fourth works' '
test_expect_success 'output during multi-pick indicates merge strategy' '
cat <<-\EOF >expected &&
Trying simple merge.
- [master OBJID] second
+ [main OBJID] second
Author: A U Thor <[email protected]>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
Trying simple merge.
- [master OBJID] third
+ [main OBJID] third
Author: A U Thor <[email protected]>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
Trying simple merge.
- [master OBJID] fourth
+ [main OBJID] fourth
Author: A U Thor <[email protected]>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
EOF
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick --strategy resolve first..fourth >actual &&
@@ -124,7 +124,7 @@ test_expect_success 'output during multi-pick indicates merge strategy' '
'
test_expect_success 'cherry-pick --ff first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick --ff first..fourth &&
@@ -134,7 +134,7 @@ test_expect_success 'cherry-pick --ff first..fourth works' '
'
test_expect_success 'cherry-pick -n first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick -n first..fourth &&
@@ -144,7 +144,7 @@ test_expect_success 'cherry-pick -n first..fourth works' '
'
test_expect_success 'revert first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard fourth &&
test_tick &&
git revert first..fourth &&
@@ -154,7 +154,7 @@ test_expect_success 'revert first..fourth works' '
'
test_expect_success 'revert ^first fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard fourth &&
test_tick &&
git revert ^first fourth &&
@@ -164,7 +164,7 @@ test_expect_success 'revert ^first fourth works' '
'
test_expect_success 'revert fourth fourth~1 fourth~2 works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard fourth &&
test_tick &&
git revert fourth fourth~1 fourth~2 &&
@@ -174,7 +174,7 @@ test_expect_success 'revert fourth fourth~1 fourth~2 works' '
'
test_expect_success 'cherry-pick -3 fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick -3 fourth &&
@@ -184,7 +184,7 @@ test_expect_success 'cherry-pick -3 fourth works' '
'
test_expect_success 'cherry-pick --stdin works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git rev-list --reverse first..fourth | git cherry-pick --stdin &&
diff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh
index 1e5b3948df..dfc5e9f914 100755
--- a/t/t3509-cherry-pick-merge-df.sh
+++ b/t/t3509-cherry-pick-merge-df.sh
@@ -28,7 +28,7 @@ test_expect_success 'Setup rename across paths each below D/F conflicts' '
test_expect_success 'Cherry-pick succeeds with rename across D/F conflicts' '
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
git cherry-pick branch
'
diff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh
index bd78287841..357db4b405 100755
--- a/t/t3512-cherry-pick-submodule.sh
+++ b/t/t3512-cherry-pick-submodule.sh
@@ -35,7 +35,7 @@ test_expect_success 'unrelated submodule/file conflict is ignored' '
git add a_file &&
git commit -m "modify a file" &&
- git checkout master &&
+ git checkout main &&
git submodule add ../sub sub &&
git submodule update sub &&
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index f2c0168941..c87807a420 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -484,16 +484,16 @@ test_expect_success 'setup submodule conflict' '
echo 1 >nitfol &&
git add nitfol &&
git commit -m "added nitfol 1" &&
- git checkout -b branch2 master &&
+ git checkout -b branch2 main &&
echo 2 >nitfol &&
git add nitfol &&
git commit -m "added nitfol 2" &&
- git checkout -b conflict1 master &&
+ git checkout -b conflict1 main &&
git -C submod fetch &&
git -C submod checkout branch1 &&
git add submod &&
git commit -m "submod 1" &&
- git checkout -b conflict2 master &&
+ git checkout -b conflict2 main &&
git -C submod checkout branch2 &&
git add submod &&
git commit -m "submod 2"
@@ -605,7 +605,7 @@ test_expect_success 'rm of a conflicted unpopulated submodule succeeds' '
'
test_expect_success 'rm of a populated submodule with a .git directory migrates git dir' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard &&
git submodule update &&
(
@@ -718,7 +718,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
git checkout HEAD^ &&
git submodule update &&
git checkout -q HEAD^ &&
- git checkout -q master 2>actual &&
+ git checkout -q main 2>actual &&
test_i18ngrep "^warning: unable to rmdir '\''submod'\'':" actual &&
git status -s submod >actual &&
echo "?? submod/" >expected &&
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 49decbac71..73527208ba 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -540,8 +540,8 @@ test_expect_success 'patch mode ignores unmerged entries' '
test_commit non-conflict &&
git checkout -b side &&
test_commit side conflict.t &&
- git checkout master &&
- test_commit master conflict.t &&
+ git checkout main &&
+ test_commit main conflict.t &&
test_must_fail git merge side &&
echo changed >non-conflict.t &&
echo y | git add -p >output &&
diff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh
index 923eb01f0e..6a96959e06 100755
--- a/t/t3901-i18n-patch.sh
+++ b/t/t3901-i18n-patch.sh
@@ -45,7 +45,7 @@ test_expect_success setup '
# the first commit on the side branch is UTF-8
test_tick &&
- git checkout -b side master^ &&
+ git checkout -b side main^ &&
echo Another file >yours &&
git add yours &&
git commit -s -m "Second on side" &&
@@ -69,7 +69,7 @@ test_expect_success setup '
test_expect_success 'format-patch output (ISO-8859-1)' '
git config i18n.logoutputencoding ISO8859-1 &&
- git format-patch --stdout master..HEAD^ >out-l1 &&
+ git format-patch --stdout main..HEAD^ >out-l1 &&
git format-patch --stdout HEAD^ >out-l2 &&
grep "^Content-Type: text/plain; charset=ISO8859-1" out-l1 &&
grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
@@ -80,7 +80,7 @@ test_expect_success 'format-patch output (ISO-8859-1)' '
test_expect_success 'format-patch output (UTF-8)' '
git config i18n.logoutputencoding UTF-8 &&
- git format-patch --stdout master..HEAD^ >out-u1 &&
+ git format-patch --stdout main..HEAD^ >out-u1 &&
git format-patch --stdout HEAD^ >out-u2 &&
grep "^Content-Type: text/plain; charset=UTF-8" out-u1 &&
grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" out-u1 &&
@@ -102,7 +102,7 @@ test_expect_success 'rebase (U/U)' '
# we want UTF-8 encoded name.
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git checkout -b test &&
- git rebase master &&
+ git rebase main &&
check_encoding 2
'
@@ -113,7 +113,7 @@ test_expect_success 'rebase (U/L)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2
'
@@ -125,7 +125,7 @@ test_expect_success !MINGW 'rebase (L/L)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2 8859
'
@@ -138,7 +138,7 @@ test_expect_success !MINGW 'rebase (L/U)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2 8859
'
@@ -150,7 +150,7 @@ test_expect_success 'cherry-pick(U/U)' '
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -165,7 +165,7 @@ test_expect_success !MINGW 'cherry-pick(L/L)' '
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -180,7 +180,7 @@ test_expect_success 'cherry-pick(U/L)' '
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -196,7 +196,7 @@ test_expect_success !MINGW 'cherry-pick(L/U)' '
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -210,7 +210,7 @@ test_expect_success 'rebase --merge (U/U)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2
'
@@ -221,7 +221,7 @@ test_expect_success 'rebase --merge (U/L)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2
'
@@ -233,7 +233,7 @@ test_expect_success 'rebase --merge (L/L)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2 8859
'
@@ -246,7 +246,7 @@ test_expect_success 'rebase --merge (L/U)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2 8859
'
@@ -256,7 +256,7 @@ test_expect_success 'am (U/U)' '
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git am out-u1 out-u2 &&
check_encoding 2
@@ -267,7 +267,7 @@ test_expect_success !MINGW 'am (L/L)' '
git config i18n.commitencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git am out-l1 out-l2 &&
check_encoding 2 8859
@@ -277,7 +277,7 @@ test_expect_success 'am (U/L)' '
# Apply ISO-8859-1 patches with UTF-8 commitencoding
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
# am specifies --utf8 by default.
git am out-l1 out-l2 &&
@@ -290,7 +290,7 @@ test_expect_success 'am --no-utf8 (U/L)' '
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git am --no-utf8 out-l1 out-l2 2>err &&
# commit-tree will warn that the commit message does not contain valid UTF-8
@@ -305,7 +305,7 @@ test_expect_success !MINGW 'am (L/U)' '
git config i18n.commitencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
# mailinfo will re-code the commit message to the charset specified by
# i18n.commitencoding
git am out-u1 out-u2 &&
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 9f7ca98967..97374f393a 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -220,14 +220,14 @@ test_expect_success 'stash branch' '
git commit file -m second &&
git stash branch stashbranch &&
test refs/heads/stashbranch = $(git symbolic-ref HEAD) &&
- test $(git rev-parse HEAD) = $(git rev-parse master^) &&
+ test $(git rev-parse HEAD) = $(git rev-parse main^) &&
git diff --cached >output &&
diff_cmp expect output &&
git diff >output &&
diff_cmp expect1 output &&
git add file &&
git commit -m alternate\ second &&
- git diff master..stashbranch >output &&
+ git diff main..stashbranch >output &&
diff_cmp output expect2 &&
test 0 = $(git stash list | wc -l)
'
@@ -520,7 +520,7 @@ test_expect_success 'stash branch - no stashes on stack, stash-like argument' '
STASH_ID=$(git stash create) &&
git reset --hard &&
git stash branch stash-branch ${STASH_ID} &&
- test_when_finished "git reset --hard HEAD && git checkout master &&
+ test_when_finished "git reset --hard HEAD && git checkout main &&
git branch -D stash-branch" &&
test $(git ls-files --modified | wc -l) -eq 1
'
@@ -536,7 +536,7 @@ test_expect_success 'stash branch - stashes on stack, stash-like argument' '
STASH_ID=$(git stash create) &&
git reset --hard &&
git stash branch stash-branch ${STASH_ID} &&
- test_when_finished "git reset --hard HEAD && git checkout master &&
+ test_when_finished "git reset --hard HEAD && git checkout main &&
git branch -D stash-branch" &&
test $(git ls-files --modified | wc -l) -eq 1
'
@@ -738,7 +738,7 @@ test_expect_success 'valid ref of the form "n", n < N' '
git stash &&
git stash show 0 &&
git stash branch tmp 0 &&
- git checkout master &&
+ git checkout main &&
git stash &&
git stash apply 0 &&
git reset --hard &&
@@ -755,7 +755,7 @@ test_expect_success 'branch: do not drop the stash if the branch exists' '
git commit -m initial &&
echo bar >file &&
git stash &&
- test_must_fail git stash branch master stash@{0} &&
+ test_must_fail git stash branch main stash@{0} &&
git rev-parse stash@{0} --
'
@@ -768,7 +768,7 @@ test_expect_success 'branch: should not drop the stash if the apply fails' '
echo bar >file &&
git stash &&
echo baz >file &&
- test_when_finished "git checkout master" &&
+ test_when_finished "git checkout main" &&
test_must_fail git stash branch new_branch stash@{0} &&
git rev-parse stash@{0} --
'
@@ -902,7 +902,7 @@ test_expect_success 'push -m shows right message' '
>foo &&
git add foo &&
git stash push -m "test message" &&
- echo "stash@{0}: On master: test message" >expect &&
+ echo "stash@{0}: On main: test message" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
'
@@ -911,7 +911,7 @@ test_expect_success 'push -m also works without space' '
>foo &&
git add foo &&
git stash push -m"unspaced test message" &&
- echo "stash@{0}: On master: unspaced test message" >expect &&
+ echo "stash@{0}: On main: unspaced test message" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
'
@@ -968,7 +968,7 @@ test_expect_success 'push -mfoo uses right message' '
>foo &&
git add foo &&
git stash push -m"test mfoo" &&
- echo "stash@{0}: On master: test mfoo" >expect &&
+ echo "stash@{0}: On main: test mfoo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
'
@@ -977,7 +977,7 @@ test_expect_success 'push --message foo is synonym for -mfoo' '
>foo &&
git add foo &&
git stash push --message "test message foo" &&
- echo "stash@{0}: On master: test message foo" >expect &&
+ echo "stash@{0}: On main: test message foo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
'
@@ -986,7 +986,7 @@ test_expect_success 'push --message=foo is synonym for -mfoo' '
>foo &&
git add foo &&
git stash push --message="test message=foo" &&
- echo "stash@{0}: On master: test message=foo" >expect &&
+ echo "stash@{0}: On main: test message=foo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
'
@@ -995,7 +995,7 @@ test_expect_success 'push -m shows right message' '
>foo &&
git add foo &&
git stash push -m "test m foo" &&
- echo "stash@{0}: On master: test m foo" >expect &&
+ echo "stash@{0}: On main: test m foo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
'
@@ -1004,7 +1004,7 @@ test_expect_success 'create stores correct message' '
>foo &&
git add foo &&
STASH_ID=$(git stash create "create test message") &&
- echo "On master: create test message" >expect &&
+ echo "On main: create test message" >expect &&
git show --pretty=%s -s ${STASH_ID} >actual &&
test_cmp expect actual
'
@@ -1013,13 +1013,13 @@ test_expect_success 'create with multiple arguments for the message' '
>foo &&
git add foo &&
STASH_ID=$(git stash create test untracked) &&
- echo "On master: test untracked" >expect &&
+ echo "On main: test untracked" >expect &&
git show --pretty=%s -s ${STASH_ID} >actual &&
test_cmp expect actual
'
test_expect_success 'create in a detached state' '
- test_when_finished "git checkout master" &&
+ test_when_finished "git checkout main" &&
git checkout HEAD~1 &&
>foo &&
git add foo &&
diff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh
index 54ce19e353..7e03823537 100755
--- a/t/t3910-mac-os-precompose.sh
+++ b/t/t3910-mac-os-precompose.sh
@@ -151,7 +151,7 @@ test_expect_success "git checkout link nfd" '
git checkout l.$Odiarnfd
'
test_expect_success "setup case mac2" '
- git checkout master &&
+ git checkout main &&
git reset --hard &&
git checkout -b mac_os_2
'
@@ -163,7 +163,7 @@ test_expect_success "commit file d2.Adiarnfd/f.Adiarnfd" '
git commit -m "add d2.$Adiarnfd/f.$Adiarnfd" -- d2.$Adiarnfd/f.$Adiarnfd
'
test_expect_success "setup for long decomposed filename" '
- git checkout master &&
+ git checkout main &&
git reset --hard &&
git checkout -b mac_os_long_nfd_fn
'
@@ -173,7 +173,7 @@ test_expect_success "Add long decomposed filename" '
git commit -m "Long filename"
'
test_expect_success "setup for long precomposed filename" '
- git checkout master &&
+ git checkout main &&
git reset --hard &&
git checkout -b mac_os_long_nfc_fn
'
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 3f60f7d96c..7704d411b1 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -60,7 +60,7 @@ test_expect_success setup '
GIT_COMMITTER_DATE="2006-06-26 00:04:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
- git checkout master &&
+ git checkout main &&
git pull -s ours . side &&
GIT_AUTHOR_DATE="2006-06-26 00:05:00 +0000" &&
@@ -85,7 +85,7 @@ test_expect_success setup '
for i in B A; do echo $i; done >dir/sub &&
git add dir/sub &&
git commit -m "Rearranged lines in dir/sub" &&
- git checkout master &&
+ git checkout main &&
GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" &&
@@ -93,7 +93,7 @@ test_expect_success setup '
git checkout -b mode initial &&
git update-index --chmod=+x file0 &&
git commit -m "update mode" &&
- git checkout -f master &&
+ git checkout -f main &&
GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" &&
@@ -102,12 +102,12 @@ test_expect_success setup '
git update-index --chmod=+x file2 &&
git commit -m "update mode (file2)" &&
git notes add -m "note" &&
- git checkout -f master &&
+ git checkout -f main &&
- # Same merge as master, but with parents reversed. Hide it in a
+ # Same merge as main, but with parents reversed. Hide it in a
# pseudo-ref to avoid impacting tests with --all.
commit=$(echo reverse |
- git commit-tree -p master^2 -p master^1 master^{tree}) &&
+ git commit-tree -p main^2 -p main^1 main^{tree}) &&
git update-ref REVERSE $commit &&
git config diff.renames false &&
@@ -117,15 +117,15 @@ test_expect_success setup '
: <<\EOF
! [initial] Initial
- * [master] Merge branch 'side'
+ * [main] Merge branch 'side'
! [rearrange] Rearranged lines in dir/sub
! [side] Side
----
+ [rearrange] Rearranged lines in dir/sub
- - [master] Merge branch 'side'
+ - [main] Merge branch 'side'
* + [side] Side
- * [master^] Third
- * [master~2] Second
+ * [main^] Third
+ * [main~2] Second
+*++ [initial] Initial
EOF
@@ -262,88 +262,88 @@ diff-tree initial mode
diff-tree --stat initial mode
diff-tree --summary initial mode
-diff-tree master
-diff-tree -p master
-diff-tree -p -m master
-diff-tree -c master
-diff-tree -c --abbrev master
-:noellipses diff-tree -c --abbrev master
-diff-tree --cc master
+diff-tree main
+diff-tree -p main
+diff-tree -p -m main
+diff-tree -c main
+diff-tree -c --abbrev main
+:noellipses diff-tree -c --abbrev main
+diff-tree --cc main
# stat only should show the diffstat with the first parent
-diff-tree -c --stat master
-diff-tree --cc --stat master
-diff-tree -c --stat --summary master
-diff-tree --cc --stat --summary master
+diff-tree -c --stat main
+diff-tree --cc --stat main
+diff-tree -c --stat --summary main
+diff-tree --cc --stat --summary main
# stat summary should show the diffstat and summary with the first parent
diff-tree -c --stat --summary side
diff-tree --cc --stat --summary side
-diff-tree --cc --shortstat master
+diff-tree --cc --shortstat main
diff-tree --cc --summary REVERSE
# improved by Timo's patch
-diff-tree --cc --patch-with-stat master
+diff-tree --cc --patch-with-stat main
# improved by Timo's patch
-diff-tree --cc --patch-with-stat --summary master
+diff-tree --cc --patch-with-stat --summary main
# this is correct
diff-tree --cc --patch-with-stat --summary side
-log master
-log -p master
-log --root master
-log --root -p master
-log --patch-with-stat master
-log --root --patch-with-stat master
-log --root --patch-with-stat --summary master
+log main
+log -p main
+log --root main
+log --root -p main
+log --patch-with-stat main
+log --root --patch-with-stat main
+log --root --patch-with-stat --summary main
# improved by Timo's patch
-log --root -c --patch-with-stat --summary master
+log --root -c --patch-with-stat --summary main
# improved by Timo's patch
-log --root --cc --patch-with-stat --summary master
-log -p --first-parent master
-log -m -p --first-parent master
-log -m -p master
-log -SF master
-log -S F master
-log -SF -p master
-log -SF master --max-count=0
-log -SF master --max-count=1
-log -SF master --max-count=2
-log -GF master
-log -GF -p master
-log -GF -p --pickaxe-all master
+log --root --cc --patch-with-stat --summary main
+log -p --first-parent main
+log -m -p --first-parent main
+log -m -p main
+log -SF main
+log -S F main
+log -SF -p main
+log -SF main --max-count=0
+log -SF main --max-count=1
+log -SF main --max-count=2
+log -GF main
+log -GF -p main
+log -GF -p --pickaxe-all main
log --decorate --all
log --decorate=full --all
rev-list --parents HEAD
rev-list --children HEAD
-whatchanged master
-:noellipses whatchanged master
-whatchanged -p master
-whatchanged --root master
-:noellipses whatchanged --root master
-whatchanged --root -p master
-whatchanged --patch-with-stat master
-whatchanged --root --patch-with-stat master
-whatchanged --root --patch-with-stat --summary master
+whatchanged main
+:noellipses whatchanged main
+whatchanged -p main
+whatchanged --root main
+:noellipses whatchanged --root main
+whatchanged --root -p main
+whatchanged --patch-with-stat main
+whatchanged --root --patch-with-stat main
+whatchanged --root --patch-with-stat --summary main
# improved by Timo's patch
-whatchanged --root -c --patch-with-stat --summary master
+whatchanged --root -c --patch-with-stat --summary main
# improved by Timo's patch
-whatchanged --root --cc --patch-with-stat --summary master
-whatchanged -SF master
-:noellipses whatchanged -SF master
-whatchanged -SF -p master
+whatchanged --root --cc --patch-with-stat --summary main
+whatchanged -SF main
+:noellipses whatchanged -SF main
+whatchanged -SF -p main
-log --patch-with-stat master -- dir/
-whatchanged --patch-with-stat master -- dir/
-log --patch-with-stat --summary master -- dir/
-whatchanged --patch-with-stat --summary master -- dir/
+log --patch-with-stat main -- dir/
+whatchanged --patch-with-stat main -- dir/
+log --patch-with-stat --summary main -- dir/
+whatchanged --patch-with-stat --summary main -- dir/
show initial
show --root initial
show side
-show master
-show -c master
-show -m master
-show --first-parent master
+show main
+show -c main
+show -m main
+show --first-parent main
show --stat side
show --stat --summary side
show --patch-with-stat side
@@ -352,22 +352,22 @@ show --patch-with-raw side
show --patch-with-stat --summary side
format-patch --stdout initial..side
-format-patch --stdout initial..master^
-format-patch --stdout initial..master
-format-patch --stdout --no-numbered initial..master
-format-patch --stdout --numbered initial..master
+format-patch --stdout initial..main^
+format-patch --stdout initial..main
+format-patch --stdout --no-numbered initial..main
+format-patch --stdout --numbered initial..main
format-patch --attach --stdout initial..side
format-patch --attach --stdout --suffix=.diff initial..side
-format-patch --attach --stdout initial..master^
-format-patch --attach --stdout initial..master
+format-patch --attach --stdout initial..main^
+format-patch --attach --stdout initial..main
format-patch --inline --stdout initial..side
-format-patch --inline --stdout initial..master^
-format-patch --inline --stdout --numbered-files initial..master
-format-patch --inline --stdout initial..master
-format-patch --inline --stdout --subject-prefix=TESTCASE initial..master
+format-patch --inline --stdout initial..main^
+format-patch --inline --stdout --numbered-files initial..main
+format-patch --inline --stdout initial..main
+format-patch --inline --stdout --subject-prefix=TESTCASE initial..main
config format.subjectprefix DIFFERENT_PREFIX
-format-patch --inline --stdout initial..master^^
-format-patch --stdout --cover-letter -n initial..master^
+format-patch --inline --stdout initial..main^^
+format-patch --stdout --cover-letter -n initial..main^
diff --abbrev initial..side
diff -U initial..side
@@ -386,13 +386,13 @@ diff --name-status dir2 dir
diff --no-index --name-status dir2 dir
diff --no-index --name-status -- dir2 dir
diff --no-index dir dir3
-diff master master^ side
+diff main main^ side
# Can't use spaces...
-diff --line-prefix=abc master master^ side
-diff --dirstat master~1 master~2
+diff --line-prefix=abc main main^ side
+diff --dirstat main~1 main~2
diff --dirstat initial rearrange
diff --dirstat-by-file initial rearrange
-diff --dirstat --cc master~1 master
+diff --dirstat --cc main~1 main
# No-index --abbrev and --no-abbrev
diff --raw initial
:noellipses diff --raw initial
@@ -445,7 +445,7 @@ test_expect_success 'diff-tree --stdin with log formatting' '
Third
Second
EOF
- git rev-list master | git diff-tree --stdin --format=%s -s >actual &&
+ git rev-list main | git diff-tree --stdin --format=%s -s >actual &&
test_cmp expect actual
'
diff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main
similarity index 86%
rename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master
rename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main
index 9951e3677d..af1cf20f4c 100644
--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main
@@ -1,4 +1,4 @@
-$ git diff-tree --cc --patch-with-stat --summary master
+$ git diff-tree --cc --patch-with-stat --summary main
59d314ad6f356dd08601a4cd5e530381da3e3c64
dir/sub | 2 ++
file0 | 3 +++
diff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main
similarity index 89%
rename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_master
rename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_main
index db3c0a7b2c..0ec6042097 100644
--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master
+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main
@@ -1,4 +1,4 @@
-$ git diff-tree --cc --patch-with-stat master
+$ git diff-tree --cc --patch-with-stat main
59d314ad6f356dd08601a4cd5e530381da3e3c64
dir/sub | 2 ++
file0 | 3 +++
diff --git a/t/t4013/diff.diff-tree_--cc_--shortstat_master b/t/t4013/diff.diff-tree_--cc_--shortstat_main
similarity index 65%
rename from t/t4013/diff.diff-tree_--cc_--shortstat_master
rename to t/t4013/diff.diff-tree_--cc_--shortstat_main
index a4ca42df2a..9a4ef03197 100644
--- a/t/t4013/diff.diff-tree_--cc_--shortstat_master
+++ b/t/t4013/diff.diff-tree_--cc_--shortstat_main
@@ -1,4 +1,4 @@
-$ git diff-tree --cc --shortstat master
+$ git diff-tree --cc --shortstat main
59d314ad6f356dd08601a4cd5e530381da3e3c64
2 files changed, 5 insertions(+)
$
diff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main
similarity index 71%
rename from t/t4013/diff.diff-tree_-c_--stat_--summary_master
rename to t/t4013/diff.diff-tree_--cc_--stat_--summary_main
index 81c3021541..9db08a4aa9 100644
--- a/t/t4013/diff.diff-tree_-c_--stat_--summary_master
+++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main
@@ -1,4 +1,4 @@
-$ git diff-tree -c --stat --summary master
+$ git diff-tree --cc --stat --summary main
59d314ad6f356dd08601a4cd5e530381da3e3c64
dir/sub | 2 ++
file0 | 3 +++
diff --git a/t/t4013/diff.diff-tree_-c_--stat_master b/t/t4013/diff.diff-tree_--cc_--stat_main
similarity index 76%
rename from t/t4013/diff.diff-tree_-c_--stat_master
rename to t/t4013/diff.diff-tree_--cc_--stat_main
index 89d59b1548..7ecc67a524 100644
--- a/t/t4013/diff.diff-tree_-c_--stat_master
+++ b/t/t4013/diff.diff-tree_--cc_--stat_main
@@ -1,4 +1,4 @@
-$ git diff-tree -c --stat master
+$ git diff-tree --cc --stat main
59d314ad6f356dd08601a4cd5e530381da3e3c64
dir/sub | 2 ++
file0 | 3 +++
diff --git a/t/t4013/diff.diff-tree_--cc_master b/t/t4013/diff.diff-tree_--cc_main
similarity index 91%
rename from t/t4013/diff.diff-tree_--cc_master
rename to t/t4013/diff.diff-tree_--cc_main
index 5ecb4e14ae..1a962856ad 100644
--- a/t/t4013/diff.diff-tree_--cc_master
+++ b/t/t4013/diff.diff-tree_--cc_main
@@ -1,4 +1,4 @@
-$ git diff-tree --cc master
+$ git diff-tree --cc main
59d314ad6f356dd08601a4cd5e530381da3e3c64
diff --cc dir/sub
index cead32e,7289e35..992913c
diff --git a/t/t4013/diff.diff-tree_-c_--abbrev_master b/t/t4013/diff.diff-tree_-c_--abbrev_main
similarity index 83%
rename from t/t4013/diff.diff-tree_-c_--abbrev_master
rename to t/t4013/diff.diff-tree_-c_--abbrev_main
index b8e4aa2530..039d127cf2 100644
--- a/t/t4013/diff.diff-tree_-c_--abbrev_master
+++ b/t/t4013/diff.diff-tree_-c_--abbrev_main
@@ -1,4 +1,4 @@
-$ git diff-tree -c --abbrev master
+$ git diff-tree -c --abbrev main
59d314ad6f356dd08601a4cd5e530381da3e3c64
::100644 100644 100644 cead32e... 7289e35... 992913c... MM dir/sub
::100644 100644 100644 b414108... f4615da... 10a8a9f... MM file0
diff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master b/t/t4013/diff.diff-tree_-c_--stat_--summary_main
similarity index 70%
rename from t/t4013/diff.diff-tree_--cc_--stat_--summary_master
rename to t/t4013/diff.diff-tree_-c_--stat_--summary_main
index d019867dd9..05a8d16ba7 100644
--- a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master
+++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_main
@@ -1,4 +1,4 @@
-$ git diff-tree --cc --stat --summary master
+$ git diff-tree -c --stat --summary main
59d314ad6f356dd08601a4cd5e530381da3e3c64
dir/sub | 2 ++
file0 | 3 +++
diff --git a/t/t4013/diff.diff-tree_--cc_--stat_master b/t/t4013/diff.diff-tree_-c_--stat_main
similarity index 75%
rename from t/t4013/diff.diff-tree_--cc_--stat_master
rename to t/t4013/diff.diff-tree_-c_--stat_main
index 40b91796b3..61d9f450df 100644
--- a/t/t4013/diff.diff-tree_--cc_--stat_master
+++ b/t/t4013/diff.diff-tree_-c_--stat_main
@@ -1,4 +1,4 @@
-$ git diff-tree --cc --stat master
+$ git diff-tree -c --stat main
59d314ad6f356dd08601a4cd5e530381da3e3c64
dir/sub | 2 ++
file0 | 3 +++
diff --git a/t/t4013/diff.diff-tree_-c_master b/t/t4013/diff.diff-tree_-c_main
similarity index 93%
rename from t/t4013/diff.diff-tree_-c_master
rename to t/t4013/diff.diff-tree_-c_main
index e2d2bb2611..a84e1185cf 100644
--- a/t/t4013/diff.diff-tree_-c_master
+++ b/t/t4013/diff.diff-tree_-c_main
@@ -1,4 +1,4 @@
-$ git diff-tree -c master
+$ git diff-tree -c main
59d314ad6f356dd08601a4cd5e530381da3e3c64
::100644 100644 100644 cead32e925b1420c84c14cbf7cf755e7e45af8ad 7289e35bff32727c08dda207511bec138fdb9ea5 992913c5aa0a5476d10c49ed0f21fc0c6d1aedf3 MM dir/sub
::100644 100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 f4615da674c09df322d6ba8d6b21ecfb1b1ba510 10a8a9f3657f91a156b9f0184ed79a20adef9f7f MM file0
diff --git a/t/t4013/diff.diff-tree_-p_-m_master b/t/t4013/diff.diff-tree_-p_-m_main
similarity index 97%
rename from t/t4013/diff.diff-tree_-p_-m_master
rename to t/t4013/diff.diff-tree_-p_-m_main
index b60bea039d..29c9fc20b8 100644
--- a/t/t4013/diff.diff-tree_-p_-m_master
+++ b/t/t4013/diff.diff-tree_-p_-m_main
@@ -1,4 +1,4 @@
-$ git diff-tree -p -m master
+$ git diff-tree -p -m main
59d314ad6f356dd08601a4cd5e530381da3e3c64
diff --git a/dir/sub b/dir/sub
index cead32e..992913c 100644
diff --git a/t/t4013/diff.diff-tree_-p_main b/t/t4013/diff.diff-tree_-p_main
new file mode 100644
index 0000000000..c658062422
--- /dev/null
+++ b/t/t4013/diff.diff-tree_-p_main
@@ -0,0 +1,2 @@
+$ git diff-tree -p main
+$
diff --git a/t/t4013/diff.diff-tree_-p_master b/t/t4013/diff.diff-tree_-p_master
deleted file mode 100644
index b182875fb2..0000000000
--- a/t/t4013/diff.diff-tree_-p_master
+++ /dev/null
@@ -1,2 +0,0 @@
-$ git diff-tree -p master
-$
diff --git a/t/t4013/diff.diff-tree_main b/t/t4013/diff.diff-tree_main
new file mode 100644
index 0000000000..dc5b9fdeb6
--- /dev/null
+++ b/t/t4013/diff.diff-tree_main
@@ -0,0 +1,2 @@
+$ git diff-tree main
+$
diff --git a/t/t4013/diff.diff-tree_master b/t/t4013/diff.diff-tree_master
deleted file mode 100644
index fe9226f8a1..0000000000
--- a/t/t4013/diff.diff-tree_master
+++ /dev/null
@@ -1,2 +0,0 @@
-$ git diff-tree master
-$
diff --git a/t/t4013/diff.diff_--dirstat_--cc_main~1_main b/t/t4013/diff.diff_--dirstat_--cc_main~1_main
new file mode 100644
index 0000000000..168a357a02
--- /dev/null
+++ b/t/t4013/diff.diff_--dirstat_--cc_main~1_main
@@ -0,0 +1,3 @@
+$ git diff --dirstat --cc main~1 main
+ 40.0% dir/
+$
diff --git a/t/t4013/diff.diff_--dirstat_--cc_master~1_master b/t/t4013/diff.diff_--dirstat_--cc_master~1_master
deleted file mode 100644
index fba4e34175..0000000000
--- a/t/t4013/diff.diff_--dirstat_--cc_master~1_master
+++ /dev/null
@@ -1,3 +0,0 @@
-$ git diff --dirstat --cc master~1 master
- 40.0% dir/
-$
diff --git a/t/t4013/diff.diff_--dirstat_main~1_main~2 b/t/t4013/diff.diff_--dirstat_main~1_main~2
new file mode 100644
index 0000000000..6809733708
--- /dev/null
+++ b/t/t4013/diff.diff_--dirstat_main~1_main~2
@@ -0,0 +1,3 @@
+$ git diff --dirstat main~1 main~2
+ 40.0% dir/
+$
diff --git a/t/t4013/diff.diff_--dirstat_master~1_master~2 b/t/t4013/diff.diff_--dirstat_master~1_master~2
deleted file mode 100644
index b672e1ca63..0000000000
--- a/t/t4013/diff.diff_--dirstat_master~1_master~2
+++ /dev/null
@@ -1,3 +0,0 @@
-$ git diff --dirstat master~1 master~2
- 40.0% dir/
-$
diff --git a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side
similarity index 87%
rename from t/t4013/diff.diff_--line-prefix=abc_master_master^_side
rename to t/t4013/diff.diff_--line-prefix=abc_main_main^_side
index 99f91e7f0e..67a2145a36 100644
--- a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side
+++ b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side
@@ -1,4 +1,4 @@
-$ git diff --line-prefix=abc master master^ side
+$ git diff --line-prefix=abc main main^ side
abcdiff --cc dir/sub
abcindex cead32e,7289e35..992913c
abc--- a/dir/sub
diff --git a/t/t4013/diff.diff_master_master^_side b/t/t4013/diff.diff_main_main^_side
similarity index 89%
rename from t/t4013/diff.diff_master_master^_side
rename to t/t4013/diff.diff_main_main^_side
index 50ec9cadd6..ab81ec9e47 100644
--- a/t/t4013/diff.diff_master_master^_side
+++ b/t/t4013/diff.diff_main_main^_side
@@ -1,4 +1,4 @@
-$ git diff master master^ side
+$ git diff main main^ side
diff --cc dir/sub
index cead32e,7289e35..992913c
--- a/dir/sub
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..main
similarity index 98%
rename from t/t4013/diff.format-patch_--attach_--stdout_initial..master
rename to t/t4013/diff.format-patch_--attach_--stdout_initial..main
index 52fedc179e..9f56380350 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master
+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main
@@ -1,4 +1,4 @@
-$ git format-patch --attach --stdout initial..master
+$ git format-patch --attach --stdout initial..main
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^
similarity index 97%
rename from t/t4013/diff.format-patch_--attach_--stdout_initial..master^
rename to t/t4013/diff.format-patch_--attach_--stdout_initial..main^
index 1c3cde251b..80132ea99e 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^
+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^
@@ -1,4 +1,4 @@
-$ git format-patch --attach --stdout initial..master^
+$ git format-patch --attach --stdout initial..main^
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main
similarity index 99%
rename from t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master
rename to t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main
index 02c4db7ec5..8e889090fb 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master
+++ b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main
@@ -1,4 +1,4 @@
-$ git format-patch --inline --stdout --numbered-files initial..master
+$ git format-patch --inline --stdout --numbered-files initial..main
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main
similarity index 99%
rename from t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
rename to t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main
index c7677c5951..d7d2b12d15 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
+++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main
@@ -1,4 +1,4 @@
-$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master
+$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..main
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..main
similarity index 98%
rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master
rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main
index 5b3e34e2c0..c49c423f82 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main
@@ -1,4 +1,4 @@
-$ git format-patch --inline --stdout initial..master
+$ git format-patch --inline --stdout initial..main
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^
similarity index 97%
rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^
rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^
index d13f8a8128..8669dbfe6c 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^
@@ -1,4 +1,4 @@
-$ git format-patch --inline --stdout initial..master^
+$ git format-patch --inline --stdout initial..main^
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^
similarity index 95%
rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^^
index caec5537de..b749be58b0 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^
@@ -1,4 +1,4 @@
-$ git format-patch --inline --stdout initial..master^^
+$ git format-patch --inline --stdout initial..main^^
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
diff --git a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^
similarity index 95%
rename from t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
rename to t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^
index 244d964fc6..ee917276f6 100644
--- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
+++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^
@@ -1,4 +1,4 @@
-$ git format-patch --stdout --cover-letter -n initial..master^
+$ git format-patch --stdout --cover-letter -n initial..main^
From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001
From: C O Mitter <[email protected]>
Date: Mon, 26 Jun 2006 00:06:00 +0000
@@ -18,7 +18,7 @@ A U Thor (2):
create mode 100644 file1
delete mode 100644 file2
---
+--
g-i-t--v-e-r-s-i-o-n
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
@@ -63,7 +63,7 @@ index 01e79c3..0000000
-1
-2
-3
---
+--
g-i-t--v-e-r-s-i-o-n
@@ -97,7 +97,7 @@ index 0000000..b1e6722
+A
+B
+C
---
+--
g-i-t--v-e-r-s-i-o-n
$
diff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main
similarity index 96%
rename from t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master
rename to t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main
index bfc287a147..362ce70724 100644
--- a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master
+++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main
@@ -1,4 +1,4 @@
-$ git format-patch --stdout --no-numbered initial..master
+$ git format-patch --stdout --no-numbered initial..main
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
@@ -41,7 +41,7 @@ index 01e79c3..0000000
-1
-2
-3
---
+--
g-i-t--v-e-r-s-i-o-n
@@ -75,7 +75,7 @@ index 0000000..b1e6722
+A
+B
+C
---
+--
g-i-t--v-e-r-s-i-o-n
@@ -121,7 +121,7 @@ index 0000000..7289e35
+B
+1
+2
---
+--
g-i-t--v-e-r-s-i-o-n
$
diff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main
similarity index 96%
rename from t/t4013/diff.format-patch_--stdout_--numbered_initial..master
rename to t/t4013/diff.format-patch_--stdout_--numbered_initial..main
index 568f6f584e..e75ac20616 100644
--- a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master
+++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main
@@ -1,4 +1,4 @@
-$ git format-patch --stdout --numbered initial..master
+$ git format-patch --stdout --numbered initial..main
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
@@ -41,7 +41,7 @@ index 01e79c3..0000000
-1
-2
-3
---
+--
g-i-t--v-e-r-s-i-o-n
@@ -75,7 +75,7 @@ index 0000000..b1e6722
+A
+B
+C
---
+--
g-i-t--v-e-r-s-i-o-n
@@ -121,7 +121,7 @@ index 0000000..7289e35
+B
+1
+2
---
+--
g-i-t--v-e-r-s-i-o-n
$
diff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..main
similarity index 97%
rename from t/t4013/diff.format-patch_--stdout_initial..master
rename to t/t4013/diff.format-patch_--stdout_initial..main
index 5f0352f9f7..836fbe5448 100644
--- a/t/t4013/diff.format-patch_--stdout_initial..master
+++ b/t/t4013/diff.format-patch_--stdout_initial..main
@@ -1,4 +1,4 @@
-$ git format-patch --stdout initial..master
+$ git format-patch --stdout initial..main
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
@@ -41,7 +41,7 @@ index 01e79c3..0000000
-1
-2
-3
---
+--
g-i-t--v-e-r-s-i-o-n
@@ -75,7 +75,7 @@ index 0000000..b1e6722
+A
+B
+C
---
+--
g-i-t--v-e-r-s-i-o-n
@@ -121,7 +121,7 @@ index 0000000..7289e35
+B
+1
+2
---
+--
g-i-t--v-e-r-s-i-o-n
$
diff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..main^
similarity index 95%
rename from t/t4013/diff.format-patch_--stdout_initial..master^
rename to t/t4013/diff.format-patch_--stdout_initial..main^
index 2ae454d807..3f351986a9 100644
--- a/t/t4013/diff.format-patch_--stdout_initial..master^
+++ b/t/t4013/diff.format-patch_--stdout_initial..main^
@@ -1,4 +1,4 @@
-$ git format-patch --stdout initial..master^
+$ git format-patch --stdout initial..main^
From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
From: A U Thor <[email protected]>
Date: Mon, 26 Jun 2006 00:01:00 +0000
@@ -41,7 +41,7 @@ index 01e79c3..0000000
-1
-2
-3
---
+--
g-i-t--v-e-r-s-i-o-n
@@ -75,7 +75,7 @@ index 0000000..b1e6722
+A
+B
+C
---
+--
g-i-t--v-e-r-s-i-o-n
$
diff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all
index 3f9b872ece..9ca3ab0535 100644
--- a/t/t4013/diff.log_--decorate=full_--all
+++ b/t/t4013/diff.log_--decorate=full_--all
@@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000
Notes added by 'git notes add'
-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:04:00 2006 +0000
@@ -50,7 +50,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
commit 444ac553ac7612cc88969031b02b3767fb8a353a (refs/heads/initial)
diff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all
index f5e20e1e14..152e2aec23 100644
--- a/t/t4013/diff.log_--decorate_--all
+++ b/t/t4013/diff.log_--decorate_--all
@@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000
Notes added by 'git notes add'
-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:04:00 2006 +0000
@@ -50,7 +50,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
commit 444ac553ac7612cc88969031b02b3767fb8a353a (initial)
diff --git a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_
similarity index 95%
rename from t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_
rename to t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_
index a18f1472a9..09ea7a5ee7 100644
--- a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_
+++ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_
@@ -1,4 +1,4 @@
-$ git log --patch-with-stat --summary master -- dir/
+$ git log --patch-with-stat --summary main -- dir/
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -50,7 +50,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.log_--patch-with-stat_master b/t/t4013/diff.log_--patch-with-stat_main
similarity index 98%
rename from t/t4013/diff.log_--patch-with-stat_master
rename to t/t4013/diff.log_--patch-with-stat_main
index ae425c4672..99a7e71eb3 100644
--- a/t/t4013/diff.log_--patch-with-stat_master
+++ b/t/t4013/diff.log_--patch-with-stat_main
@@ -1,4 +1,4 @@
-$ git log --patch-with-stat master
+$ git log --patch-with-stat main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -83,7 +83,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_
similarity index 96%
rename from t/t4013/diff.log_--patch-with-stat_master_--_dir_
rename to t/t4013/diff.log_--patch-with-stat_main_--_dir_
index d5207cadf4..06a04cb01c 100644
--- a/t/t4013/diff.log_--patch-with-stat_master_--_dir_
+++ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_
@@ -1,4 +1,4 @@
-$ git log --patch-with-stat master -- dir/
+$ git log --patch-with-stat main -- dir/
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -50,7 +50,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main
similarity index 97%
rename from t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master
rename to t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main
index 0fc1e8cd71..c302ba403e 100644
--- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main
@@ -1,4 +1,4 @@
-$ git log --root --cc --patch-with-stat --summary master
+$ git log --root --cc --patch-with-stat --summary main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -117,7 +117,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main
similarity index 97%
rename from t/t4013/diff.log_--root_--patch-with-stat_--summary_master
rename to t/t4013/diff.log_--root_--patch-with-stat_--summary_main
index dffc09dde9..678e626930 100644
--- a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main
@@ -1,4 +1,4 @@
-$ git log --root --patch-with-stat --summary master
+$ git log --root --patch-with-stat --summary main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -85,7 +85,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.log_--root_--patch-with-stat_master b/t/t4013/diff.log_--root_--patch-with-stat_main
similarity index 98%
rename from t/t4013/diff.log_--root_--patch-with-stat_master
rename to t/t4013/diff.log_--root_--patch-with-stat_main
index 55aa98012d..52b8e4d730 100644
--- a/t/t4013/diff.log_--root_--patch-with-stat_master
+++ b/t/t4013/diff.log_--root_--patch-with-stat_main
@@ -1,4 +1,4 @@
-$ git log --root --patch-with-stat master
+$ git log --root --patch-with-stat main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -83,7 +83,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main
similarity index 98%
rename from t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master
rename to t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main
index 019d85f7de..f5a4064f2d 100644
--- a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main
@@ -1,4 +1,4 @@
-$ git log --root -c --patch-with-stat --summary master
+$ git log --root -c --patch-with-stat --summary main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -117,7 +117,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.log_--root_-p_master b/t/t4013/diff.log_--root_-p_main
similarity index 98%
rename from t/t4013/diff.log_--root_-p_master
rename to t/t4013/diff.log_--root_-p_main
index b42c334439..01849c5ef3 100644
--- a/t/t4013/diff.log_--root_-p_master
+++ b/t/t4013/diff.log_--root_-p_main
@@ -1,4 +1,4 @@
-$ git log --root -p master
+$ git log --root -p main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -74,7 +74,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.log_--root_master b/t/t4013/diff.log_--root_main
similarity index 96%
rename from t/t4013/diff.log_--root_master
rename to t/t4013/diff.log_--root_main
index e8f46159da..976b1b7923 100644
--- a/t/t4013/diff.log_--root_master
+++ b/t/t4013/diff.log_--root_main
@@ -1,4 +1,4 @@
-$ git log --root master
+$ git log --root main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -23,7 +23,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
commit 444ac553ac7612cc88969031b02b3767fb8a353a
diff --git a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main
similarity index 90%
rename from t/t4013/diff.log_-GF_-p_--pickaxe-all_master
rename to t/t4013/diff.log_-GF_-p_--pickaxe-all_main
index d36f88098b..1f7a497c2d 100644
--- a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master
+++ b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main
@@ -1,4 +1,4 @@
-$ git log -GF -p --pickaxe-all master
+$ git log -GF -p --pickaxe-all main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.log_-GF_-p_master b/t/t4013/diff.log_-GF_-p_main
similarity index 91%
rename from t/t4013/diff.log_-GF_-p_master
rename to t/t4013/diff.log_-GF_-p_main
index 9d93f2c23a..c80dda41e9 100644
--- a/t/t4013/diff.log_-GF_-p_master
+++ b/t/t4013/diff.log_-GF_-p_main
@@ -1,4 +1,4 @@
-$ git log -GF -p master
+$ git log -GF -p main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-GF_main
similarity index 86%
rename from t/t4013/diff.log_-SF_master
rename to t/t4013/diff.log_-GF_main
index c1599f2f52..b94a7f7839 100644
--- a/t/t4013/diff.log_-SF_master
+++ b/t/t4013/diff.log_-GF_main
@@ -1,4 +1,4 @@
-$ git log -SF master
+$ git log -GF main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.log_-SF_-p_master b/t/t4013/diff.log_-SF_-p_main
similarity index 91%
rename from t/t4013/diff.log_-SF_-p_master
rename to t/t4013/diff.log_-SF_-p_main
index 5e32438972..fa82ac1490 100644
--- a/t/t4013/diff.log_-SF_-p_master
+++ b/t/t4013/diff.log_-SF_-p_main
@@ -1,4 +1,4 @@
-$ git log -SF -p master
+$ git log -SF -p main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.log_-GF_master b/t/t4013/diff.log_-SF_main
similarity index 86%
rename from t/t4013/diff.log_-GF_master
rename to t/t4013/diff.log_-SF_main
index 4c6708d2d0..dbf770db49 100644
--- a/t/t4013/diff.log_-GF_master
+++ b/t/t4013/diff.log_-SF_main
@@ -1,4 +1,4 @@
-$ git log -GF master
+$ git log -SF main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.log_-SF_main_--max-count=0 b/t/t4013/diff.log_-SF_main_--max-count=0
new file mode 100644
index 0000000000..683b17eb99
--- /dev/null
+++ b/t/t4013/diff.log_-SF_main_--max-count=0
@@ -0,0 +1,2 @@
+$ git log -SF main --max-count=0
+$
diff --git a/t/t4013/diff.log_-SF_master_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=1
similarity index 79%
rename from t/t4013/diff.log_-SF_master_--max-count=2
rename to t/t4013/diff.log_-SF_main_--max-count=1
index a6c55fd482..2102426f8c 100644
--- a/t/t4013/diff.log_-SF_master_--max-count=2
+++ b/t/t4013/diff.log_-SF_main_--max-count=1
@@ -1,4 +1,4 @@
-$ git log -SF master --max-count=2
+$ git log -SF main --max-count=1
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.log_-SF_main_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=2
new file mode 100644
index 0000000000..23e12a4cbb
--- /dev/null
+++ b/t/t4013/diff.log_-SF_main_--max-count=2
@@ -0,0 +1,7 @@
+$ git log -SF main --max-count=2
+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
+Author: A U Thor <[email protected]>
+Date: Mon Jun 26 00:02:00 2006 +0000
+
+ Third
+$
diff --git a/t/t4013/diff.log_-SF_master_--max-count=0 b/t/t4013/diff.log_-SF_master_--max-count=0
deleted file mode 100644
index c1fc6c8731..0000000000
--- a/t/t4013/diff.log_-SF_master_--max-count=0
+++ /dev/null
@@ -1,2 +0,0 @@
-$ git log -SF master --max-count=0
-$
diff --git a/t/t4013/diff.log_-SF_master_--max-count=1 b/t/t4013/diff.log_-SF_master_--max-count=1
deleted file mode 100644
index c981a03814..0000000000
--- a/t/t4013/diff.log_-SF_master_--max-count=1
+++ /dev/null
@@ -1,7 +0,0 @@
-$ git log -SF master --max-count=1
-commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
-Author: A U Thor <[email protected]>
-Date: Mon Jun 26 00:02:00 2006 +0000
-
- Third
-$
diff --git a/t/t4013/diff.log_-S_F_master b/t/t4013/diff.log_-S_F_main
similarity index 86%
rename from t/t4013/diff.log_-S_F_master
rename to t/t4013/diff.log_-S_F_main
index 978d2b4118..a75a42e143 100644
--- a/t/t4013/diff.log_-S_F_master
+++ b/t/t4013/diff.log_-S_F_main
@@ -1,4 +1,4 @@
-$ git log -S F master
+$ git log -S F main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.log_-m_-p_--first-parent_master b/t/t4013/diff.log_-m_-p_--first-parent_main
similarity index 97%
rename from t/t4013/diff.log_-m_-p_--first-parent_master
rename to t/t4013/diff.log_-m_-p_--first-parent_main
index 7a0073f529..f40eb82e12 100644
--- a/t/t4013/diff.log_-m_-p_--first-parent_master
+++ b/t/t4013/diff.log_-m_-p_--first-parent_main
@@ -1,4 +1,4 @@
-$ git log -m -p --first-parent master
+$ git log -m -p --first-parent main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -59,7 +59,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.log_-m_-p_master b/t/t4013/diff.log_-m_-p_main
similarity index 99%
rename from t/t4013/diff.log_-m_-p_master
rename to t/t4013/diff.log_-m_-p_main
index 9ca62a01ed..1968ac41b2 100644
--- a/t/t4013/diff.log_-m_-p_master
+++ b/t/t4013/diff.log_-m_-p_main
@@ -1,4 +1,4 @@
-$ git log -m -p master
+$ git log -m -p main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -159,7 +159,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.log_-p_--first-parent_master b/t/t4013/diff.log_-p_--first-parent_main
similarity index 96%
rename from t/t4013/diff.log_-p_--first-parent_master
rename to t/t4013/diff.log_-p_--first-parent_main
index 3fc896d424..6cbcfca8bc 100644
--- a/t/t4013/diff.log_-p_--first-parent_master
+++ b/t/t4013/diff.log_-p_--first-parent_main
@@ -1,4 +1,4 @@
-$ git log -p --first-parent master
+$ git log -p --first-parent main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -37,7 +37,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_main
similarity index 98%
rename from t/t4013/diff.log_-p_master
rename to t/t4013/diff.log_-p_main
index bf1326dc36..a388c6cd83 100644
--- a/t/t4013/diff.log_-p_master
+++ b/t/t4013/diff.log_-p_main
@@ -1,4 +1,4 @@
-$ git log -p master
+$ git log -p main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -74,7 +74,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.log_master b/t/t4013/diff.log_main
similarity index 97%
rename from t/t4013/diff.log_master
rename to t/t4013/diff.log_main
index a8f6ce5abd..30c3a3cc4c 100644
--- a/t/t4013/diff.log_master
+++ b/t/t4013/diff.log_main
@@ -1,4 +1,4 @@
-$ git log master
+$ git log main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -23,7 +23,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
commit 444ac553ac7612cc88969031b02b3767fb8a353a
diff --git a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main
similarity index 81%
rename from t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master
rename to t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main
index bb80f013b3..3aa1f80af3 100644
--- a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master
+++ b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main
@@ -1,4 +1,4 @@
-$ git diff-tree -c --abbrev master
+$ git diff-tree -c --abbrev main
59d314ad6f356dd08601a4cd5e530381da3e3c64
::100644 100644 100644 cead32e 7289e35 992913c MM dir/sub
::100644 100644 100644 b414108 f4615da 10a8a9f MM file0
diff --git a/t/t4013/diff.noellipses-whatchanged_--root_master b/t/t4013/diff.noellipses-whatchanged_--root_main
similarity index 96%
rename from t/t4013/diff.noellipses-whatchanged_--root_master
rename to t/t4013/diff.noellipses-whatchanged_--root_main
index c2cfd4e729..6bc29d2ebf 100644
--- a/t/t4013/diff.noellipses-whatchanged_--root_master
+++ b/t/t4013/diff.noellipses-whatchanged_--root_main
@@ -1,4 +1,4 @@
-$ git whatchanged --root master
+$ git whatchanged --root main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -23,7 +23,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
:100644 100644 35d242b 8422d40 M dir/sub
diff --git a/t/t4013/diff.noellipses-whatchanged_-SF_master b/t/t4013/diff.noellipses-whatchanged_-SF_main
similarity index 86%
rename from t/t4013/diff.noellipses-whatchanged_-SF_master
rename to t/t4013/diff.noellipses-whatchanged_-SF_main
index b36ce5886e..0c1476d19e 100644
--- a/t/t4013/diff.noellipses-whatchanged_-SF_master
+++ b/t/t4013/diff.noellipses-whatchanged_-SF_main
@@ -1,4 +1,4 @@
-$ git whatchanged -SF master
+$ git whatchanged -SF main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.noellipses-whatchanged_master b/t/t4013/diff.noellipses-whatchanged_main
similarity index 96%
rename from t/t4013/diff.noellipses-whatchanged_master
rename to t/t4013/diff.noellipses-whatchanged_main
index 55e500f2ed..4ff990870c 100644
--- a/t/t4013/diff.noellipses-whatchanged_master
+++ b/t/t4013/diff.noellipses-whatchanged_main
@@ -1,4 +1,4 @@
-$ git whatchanged master
+$ git whatchanged main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -23,7 +23,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
:100644 100644 35d242b 8422d40 M dir/sub
diff --git a/t/t4013/diff.show_--first-parent_master b/t/t4013/diff.show_--first-parent_main
similarity index 92%
rename from t/t4013/diff.show_--first-parent_master
rename to t/t4013/diff.show_--first-parent_main
index 3dcbe473a0..480502d65c 100644
--- a/t/t4013/diff.show_--first-parent_master
+++ b/t/t4013/diff.show_--first-parent_main
@@ -1,4 +1,4 @@
-$ git show --first-parent master
+$ git show --first-parent main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
diff --git a/t/t4013/diff.show_-c_master b/t/t4013/diff.show_-c_main
similarity index 95%
rename from t/t4013/diff.show_-c_master
rename to t/t4013/diff.show_-c_main
index 81aba8da96..74ef8bc96b 100644
--- a/t/t4013/diff.show_-c_master
+++ b/t/t4013/diff.show_-c_main
@@ -1,4 +1,4 @@
-$ git show -c master
+$ git show -c main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
diff --git a/t/t4013/diff.show_-m_master b/t/t4013/diff.show_-m_main
similarity index 98%
rename from t/t4013/diff.show_-m_master
rename to t/t4013/diff.show_-m_main
index 4ea2ee453d..8fd56736d9 100644
--- a/t/t4013/diff.show_-m_master
+++ b/t/t4013/diff.show_-m_main
@@ -1,4 +1,4 @@
-$ git show -m master
+$ git show -m main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
diff --git a/t/t4013/diff.show_master b/t/t4013/diff.show_main
similarity index 96%
rename from t/t4013/diff.show_master
rename to t/t4013/diff.show_main
index fb08ce0e46..630b52a95e 100644
--- a/t/t4013/diff.show_master
+++ b/t/t4013/diff.show_main
@@ -1,4 +1,4 @@
-$ git show master
+$ git show main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_
similarity index 93%
rename from t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_
rename to t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_
index c8b6af2f43..13053c4571 100644
--- a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_
+++ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_
@@ -1,4 +1,4 @@
-$ git whatchanged --patch-with-stat --summary master -- dir/
+$ git whatchanged --patch-with-stat --summary main -- dir/
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -43,7 +43,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master b/t/t4013/diff.whatchanged_--patch-with-stat_main
similarity index 97%
rename from t/t4013/diff.whatchanged_--patch-with-stat_master
rename to t/t4013/diff.whatchanged_--patch-with-stat_main
index 1ac431ba92..91eefe5e71 100644
--- a/t/t4013/diff.whatchanged_--patch-with-stat_master
+++ b/t/t4013/diff.whatchanged_--patch-with-stat_main
@@ -1,4 +1,4 @@
-$ git whatchanged --patch-with-stat master
+$ git whatchanged --patch-with-stat main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -76,7 +76,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_
similarity index 94%
rename from t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_
rename to t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_
index b30c28588f..d0a235febc 100644
--- a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_
+++ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_
@@ -1,4 +1,4 @@
-$ git whatchanged --patch-with-stat master -- dir/
+$ git whatchanged --patch-with-stat main -- dir/
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -43,7 +43,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main
similarity index 97%
rename from t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
rename to t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main
index 30aae7817b..b62f9b70e5 100644
--- a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main
@@ -1,4 +1,4 @@
-$ git whatchanged --root --cc --patch-with-stat --summary master
+$ git whatchanged --root --cc --patch-with-stat --summary main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -117,7 +117,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main
similarity index 97%
rename from t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master
rename to t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main
index db90e51525..6158c98990 100644
--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main
@@ -1,4 +1,4 @@
-$ git whatchanged --root --patch-with-stat --summary master
+$ git whatchanged --root --patch-with-stat --summary main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -78,7 +78,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main
similarity index 97%
rename from t/t4013/diff.whatchanged_--root_--patch-with-stat_master
rename to t/t4013/diff.whatchanged_--root_--patch-with-stat_main
index 9a6cc92ce7..1d0f7b785f 100644
--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master
+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main
@@ -1,4 +1,4 @@
-$ git whatchanged --root --patch-with-stat master
+$ git whatchanged --root --patch-with-stat main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -76,7 +76,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main
similarity index 97%
rename from t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
rename to t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main
index d1d32bd34c..56d7d69eb5 100644
--- a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main
@@ -1,4 +1,4 @@
-$ git whatchanged --root -c --patch-with-stat --summary master
+$ git whatchanged --root -c --patch-with-stat --summary main
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494 c7a2ab9
Author: A U Thor <[email protected]>
@@ -117,7 +117,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
---
dir/sub | 2 ++
diff --git a/t/t4013/diff.whatchanged_--root_-p_master b/t/t4013/diff.whatchanged_--root_-p_main
similarity index 97%
rename from t/t4013/diff.whatchanged_--root_-p_master
rename to t/t4013/diff.whatchanged_--root_-p_main
index ebf1f0661e..5249caa483 100644
--- a/t/t4013/diff.whatchanged_--root_-p_master
+++ b/t/t4013/diff.whatchanged_--root_-p_main
@@ -1,4 +1,4 @@
-$ git whatchanged --root -p master
+$ git whatchanged --root -p main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -67,7 +67,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.whatchanged_--root_master b/t/t4013/diff.whatchanged_--root_main
similarity index 96%
rename from t/t4013/diff.whatchanged_--root_master
rename to t/t4013/diff.whatchanged_--root_main
index a405cb6138..cd7d42b4fd 100644
--- a/t/t4013/diff.whatchanged_--root_master
+++ b/t/t4013/diff.whatchanged_--root_main
@@ -1,4 +1,4 @@
-$ git whatchanged --root master
+$ git whatchanged --root main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -23,7 +23,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
:100644 100644 35d242b... 8422d40... M dir/sub
diff --git a/t/t4013/diff.whatchanged_-SF_-p_master b/t/t4013/diff.whatchanged_-SF_-p_main
similarity index 89%
rename from t/t4013/diff.whatchanged_-SF_-p_master
rename to t/t4013/diff.whatchanged_-SF_-p_main
index f39da84822..0e2e67c0df 100644
--- a/t/t4013/diff.whatchanged_-SF_-p_master
+++ b/t/t4013/diff.whatchanged_-SF_-p_main
@@ -1,4 +1,4 @@
-$ git whatchanged -SF -p master
+$ git whatchanged -SF -p main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.whatchanged_-SF_master b/t/t4013/diff.whatchanged_-SF_main
similarity index 86%
rename from t/t4013/diff.whatchanged_-SF_master
rename to t/t4013/diff.whatchanged_-SF_main
index 0499321d0e..34c6bf6b95 100644
--- a/t/t4013/diff.whatchanged_-SF_master
+++ b/t/t4013/diff.whatchanged_-SF_main
@@ -1,4 +1,4 @@
-$ git whatchanged -SF master
+$ git whatchanged -SF main
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:02:00 2006 +0000
diff --git a/t/t4013/diff.whatchanged_-p_master b/t/t4013/diff.whatchanged_-p_main
similarity index 97%
rename from t/t4013/diff.whatchanged_-p_master
rename to t/t4013/diff.whatchanged_-p_main
index f18d43209c..5ff3322910 100644
--- a/t/t4013/diff.whatchanged_-p_master
+++ b/t/t4013/diff.whatchanged_-p_main
@@ -1,4 +1,4 @@
-$ git whatchanged -p master
+$ git whatchanged -p main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -67,7 +67,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.whatchanged_master b/t/t4013/diff.whatchanged_main
similarity index 96%
rename from t/t4013/diff.whatchanged_master
rename to t/t4013/diff.whatchanged_main
index cd3bcc2c72..7282fd369d 100644
--- a/t/t4013/diff.whatchanged_master
+++ b/t/t4013/diff.whatchanged_main
@@ -1,4 +1,4 @@
-$ git whatchanged master
+$ git whatchanged main
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:03:00 2006 +0000
@@ -23,7 +23,7 @@ Author: A U Thor <[email protected]>
Date: Mon Jun 26 00:01:00 2006 +0000
Second
-
+
This is the second commit.
:100644 100644 35d242b... 8422d40... M dir/sub
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 575e079cc2..3b8095ffe4 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -32,11 +32,11 @@ test_expect_success setup '
test_tick &&
git commit -m "Side changes #3 with \\n backslash-n in it." &&
- git checkout master &&
+ git checkout main &&
git diff-tree -p C2 >patch &&
git apply --index <patch &&
test_tick &&
- git commit -m "Master accepts moral equivalent of #2" &&
+ git commit -m "main accepts moral equivalent of #2" &&
git checkout side &&
git checkout -b patchid &&
@@ -56,39 +56,39 @@ test_expect_success setup '
test_tick &&
git commit -m "patchid 3" &&
- git checkout master
+ git checkout main
'
test_expect_success 'format-patch --ignore-if-in-upstream' '
- git format-patch --stdout master..side >patch0 &&
+ git format-patch --stdout main..side >patch0 &&
grep "^From " patch0 >from0 &&
test_line_count = 3 from0
'
test_expect_success 'format-patch --ignore-if-in-upstream' '
git format-patch --stdout \
- --ignore-if-in-upstream master..side >patch1 &&
+ --ignore-if-in-upstream main..side >patch1 &&
grep "^From " patch1 >from1 &&
test_line_count = 2 from1
'
test_expect_success 'format-patch --ignore-if-in-upstream handles tags' '
git tag -a v1 -m tag side &&
- git tag -a v2 -m tag master &&
+ git tag -a v2 -m tag main &&
git format-patch --stdout --ignore-if-in-upstream v2..v1 >patch1 &&
grep "^From " patch1 >from1 &&
test_line_count = 2 from1
'
test_expect_success "format-patch doesn't consider merge commits" '
- git checkout -b slave master &&
+ git checkout -b slave main &&
echo "Another line" >>file &&
test_tick &&
git commit -am "Slave change #1" &&
echo "Yet another line" >>file &&
test_tick &&
git commit -am "Slave change #2" &&
- git checkout -b merger master &&
+ git checkout -b merger main &&
test_tick &&
git merge --no-ff slave &&
git format-patch -3 --stdout >patch &&
@@ -97,16 +97,16 @@ test_expect_success "format-patch doesn't consider merge commits" '
'
test_expect_success 'format-patch result applies' '
- git checkout -b rebuild-0 master &&
+ git checkout -b rebuild-0 main &&
git am -3 patch0 &&
- git rev-list master.. >list &&
+ git rev-list main.. >list &&
test_line_count = 2 list
'
test_expect_success 'format-patch --ignore-if-in-upstream result applies' '
- git checkout -b rebuild-1 master &&
+ git checkout -b rebuild-1 main &&
git am -3 patch1 &&
- git rev-list master.. >list &&
+ git rev-list main.. >list &&
test_line_count = 2 list
'
@@ -130,7 +130,7 @@ test_expect_success 'extra headers' '
" &&
git config --add format.headers "Cc: S E Cipient <[email protected]>
" &&
- git format-patch --stdout master..side >patch2 &&
+ git format-patch --stdout main..side >patch2 &&
sed -e "/^\$/q" patch2 >hdrs2 &&
grep "^To: R E Cipient <[email protected]>\$" hdrs2 &&
grep "^Cc: S E Cipient <[email protected]>\$" hdrs2
@@ -139,7 +139,7 @@ test_expect_success 'extra headers' '
test_expect_success 'extra headers without newlines' '
git config --replace-all format.headers "To: R E Cipient <[email protected]>" &&
git config --add format.headers "Cc: S E Cipient <[email protected]>" &&
- git format-patch --stdout master..side >patch3 &&
+ git format-patch --stdout main..side >patch3 &&
sed -e "/^\$/q" patch3 >hdrs3 &&
grep "^To: R E Cipient <[email protected]>\$" hdrs3 &&
grep "^Cc: S E Cipient <[email protected]>\$" hdrs3
@@ -148,7 +148,7 @@ test_expect_success 'extra headers without newlines' '
test_expect_success 'extra headers with multiple To:s' '
git config --replace-all format.headers "To: R E Cipient <[email protected]>" &&
git config --add format.headers "To: S E Cipient <[email protected]>" &&
- git format-patch --stdout master..side >patch4 &&
+ git format-patch --stdout main..side >patch4 &&
sed -e "/^\$/q" patch4 >hdrs4 &&
grep "^To: R E Cipient <[email protected]>,\$" hdrs4 &&
grep "^ *S E Cipient <[email protected]>\$" hdrs4
@@ -156,7 +156,7 @@ test_expect_success 'extra headers with multiple To:s' '
test_expect_success 'additional command line cc (ascii)' '
git config --replace-all format.headers "Cc: R E Cipient <[email protected]>" &&
- git format-patch --cc="S E Cipient <[email protected]>" --stdout master..side >patch5 &&
+ git format-patch --cc="S E Cipient <[email protected]>" --stdout main..side >patch5 &&
sed -e "/^\$/q" patch5 >hdrs5 &&
grep "^Cc: R E Cipient <[email protected]>,\$" hdrs5 &&
grep "^ *S E Cipient <[email protected]>\$" hdrs5
@@ -164,7 +164,7 @@ test_expect_success 'additional command line cc (ascii)' '
test_expect_failure 'additional command line cc (rfc822)' '
git config --replace-all format.headers "Cc: R E Cipient <[email protected]>" &&
- git format-patch --cc="S. E. Cipient <[email protected]>" --stdout master..side >patch5 &&
+ git format-patch --cc="S. E. Cipient <[email protected]>" --stdout main..side >patch5 &&
sed -e "/^\$/q" patch5 >hdrs5 &&
grep "^Cc: R E Cipient <[email protected]>,\$" hdrs5 &&
grep "^ *\"S. E. Cipient\" <[email protected]>\$" hdrs5
@@ -172,14 +172,14 @@ test_expect_failure 'additional command line cc (rfc822)' '
test_expect_success 'command line headers' '
git config --unset-all format.headers &&
- git format-patch --add-header="Cc: R E Cipient <[email protected]>" --stdout master..side >patch6 &&
+ git format-patch --add-header="Cc: R E Cipient <[email protected]>" --stdout main..side >patch6 &&
sed -e "/^\$/q" patch6 >hdrs6 &&
grep "^Cc: R E Cipient <[email protected]>\$" hdrs6
'
test_expect_success 'configuration headers and command line headers' '
git config --replace-all format.headers "Cc: R E Cipient <[email protected]>" &&
- git format-patch --add-header="Cc: S E Cipient <[email protected]>" --stdout master..side >patch7 &&
+ git format-patch --add-header="Cc: S E Cipient <[email protected]>" --stdout main..side >patch7 &&
sed -e "/^\$/q" patch7 >hdrs7 &&
grep "^Cc: R E Cipient <[email protected]>,\$" hdrs7 &&
grep "^ *S E Cipient <[email protected]>\$" hdrs7
@@ -187,40 +187,40 @@ test_expect_success 'configuration headers and command line headers' '
test_expect_success 'command line To: header (ascii)' '
git config --unset-all format.headers &&
- git format-patch --to="R E Cipient <[email protected]>" --stdout master..side >patch8 &&
+ git format-patch --to="R E Cipient <[email protected]>" --stdout main..side >patch8 &&
sed -e "/^\$/q" patch8 >hdrs8 &&
grep "^To: R E Cipient <[email protected]>\$" hdrs8
'
test_expect_failure 'command line To: header (rfc822)' '
- git format-patch --to="R. E. Cipient <[email protected]>" --stdout master..side >patch8 &&
+ git format-patch --to="R. E. Cipient <[email protected]>" --stdout main..side >patch8 &&
sed -e "/^\$/q" patch8 >hdrs8 &&
grep "^To: \"R. E. Cipient\" <[email protected]>\$" hdrs8
'
test_expect_failure 'command line To: header (rfc2047)' '
- git format-patch --to="R Ä Cipient <[email protected]>" --stdout master..side >patch8 &&
+ git format-patch --to="R Ä Cipient <[email protected]>" --stdout main..side >patch8 &&
sed -e "/^\$/q" patch8 >hdrs8 &&
grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <[email protected]>\$" hdrs8
'
test_expect_success 'configuration To: header (ascii)' '
git config format.to "R E Cipient <[email protected]>" &&
- git format-patch --stdout master..side >patch9 &&
+ git format-patch --stdout main..side >patch9 &&
sed -e "/^\$/q" patch9 >hdrs9 &&
grep "^To: R E Cipient <[email protected]>\$" hdrs9
'
test_expect_failure 'configuration To: header (rfc822)' '
git config format.to "R. E. Cipient <[email protected]>" &&
- git format-patch --stdout master..side >patch9 &&
+ git format-patch --stdout main..side >patch9 &&
sed -e "/^\$/q" patch9 >hdrs9 &&
grep "^To: \"R. E. Cipient\" <[email protected]>\$" hdrs9
'
test_expect_failure 'configuration To: header (rfc2047)' '
git config format.to "R Ä Cipient <[email protected]>" &&
- git format-patch --stdout master..side >patch9 &&
+ git format-patch --stdout main..side >patch9 &&
sed -e "/^\$/q" patch9 >hdrs9 &&
grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <[email protected]>\$" hdrs9
'
@@ -234,35 +234,35 @@ check_patch () {
}
test_expect_success 'format.from=false' '
- git -c format.from=false format-patch --stdout master..side >patch &&
+ git -c format.from=false format-patch --stdout main..side >patch &&
sed -e "/^\$/q" patch >hdrs &&
check_patch patch &&
! grep "^From: C O Mitter <[email protected]>\$" hdrs
'
test_expect_success 'format.from=true' '
- git -c format.from=true format-patch --stdout master..side >patch &&
+ git -c format.from=true format-patch --stdout main..side >patch &&
sed -e "/^\$/q" patch >hdrs &&
check_patch hdrs &&
grep "^From: C O Mitter <[email protected]>\$" hdrs
'
test_expect_success 'format.from with address' '
- git -c format.from="F R Om <[email protected]>" format-patch --stdout master..side >patch &&
+ git -c format.from="F R Om <[email protected]>" format-patch --stdout main..side >patch &&
sed -e "/^\$/q" patch >hdrs &&
check_patch hdrs &&
grep "^From: F R Om <[email protected]>\$" hdrs
'
test_expect_success '--no-from overrides format.from' '
- git -c format.from="F R Om <[email protected]>" format-patch --no-from --stdout master..side >patch &&
+ git -c format.from="F R Om <[email protected]>" format-patch --no-from --stdout main..side >patch &&
sed -e "/^\$/q" patch >hdrs &&
check_patch hdrs &&
! grep "^From: F R Om <[email protected]>\$" hdrs
'
test_expect_success '--from overrides format.from' '
- git -c format.from="F R Om <[email protected]>" format-patch --from --stdout master..side >patch &&
+ git -c format.from="F R Om <[email protected]>" format-patch --from --stdout main..side >patch &&
sed -e "/^\$/q" patch >hdrs &&
check_patch hdrs &&
! grep "^From: F R Om <[email protected]>\$" hdrs
@@ -271,7 +271,7 @@ test_expect_success '--from overrides format.from' '
test_expect_success '--no-to overrides config.to' '
git config --replace-all format.to \
"R E Cipient <[email protected]>" &&
- git format-patch --no-to --stdout master..side >patch10 &&
+ git format-patch --no-to --stdout main..side >patch10 &&
sed -e "/^\$/q" patch10 >hdrs10 &&
check_patch hdrs10 &&
! grep "^To: R E Cipient <[email protected]>\$" hdrs10
@@ -281,7 +281,7 @@ test_expect_success '--no-to and --to replaces config.to' '
git config --replace-all format.to \
"Someone <[email protected]>" &&
git format-patch --no-to --to="Someone Else <[email protected]>" \
- --stdout master..side >patch11 &&
+ --stdout main..side >patch11 &&
sed -e "/^\$/q" patch11 >hdrs11 &&
check_patch hdrs11 &&
! grep "^To: Someone <[email protected]>\$" hdrs11 &&
@@ -291,7 +291,7 @@ test_expect_success '--no-to and --to replaces config.to' '
test_expect_success '--no-cc overrides config.cc' '
git config --replace-all format.cc \
"C E Cipient <[email protected]>" &&
- git format-patch --no-cc --stdout master..side >patch12 &&
+ git format-patch --no-cc --stdout main..side >patch12 &&
sed -e "/^\$/q" patch12 >hdrs12 &&
check_patch hdrs12 &&
! grep "^Cc: C E Cipient <[email protected]>\$" hdrs12
@@ -300,7 +300,7 @@ test_expect_success '--no-cc overrides config.cc' '
test_expect_success '--no-add-header overrides config.headers' '
git config --replace-all format.headers \
"Header1: B E Cipient <[email protected]>" &&
- git format-patch --no-add-header --stdout master..side >patch13 &&
+ git format-patch --no-add-header --stdout main..side >patch13 &&
sed -e "/^\$/q" patch13 >hdrs13 &&
check_patch hdrs13 &&
! grep "^Header1: B E Cipient <[email protected]>\$" hdrs13
@@ -309,13 +309,13 @@ test_expect_success '--no-add-header overrides config.headers' '
test_expect_success 'multiple files' '
rm -rf patches/ &&
git checkout side &&
- git format-patch -o patches/ master &&
+ git format-patch -o patches/ main &&
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
'
test_expect_success 'reroll count' '
rm -fr patches &&
- git format-patch -o patches --cover-letter --reroll-count 4 master..side >list &&
+ git format-patch -o patches --cover-letter --reroll-count 4 main..side >list &&
! grep -v "^patches/v4-000[0-3]-" list &&
sed -n -e "/^Subject: /p" $(cat list) >subjects &&
! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects
@@ -323,7 +323,7 @@ test_expect_success 'reroll count' '
test_expect_success 'reroll count (-v)' '
rm -fr patches &&
- git format-patch -o patches --cover-letter -v4 master..side >list &&
+ git format-patch -o patches --cover-letter -v4 main..side >list &&
! grep -v "^patches/v4-000[0-3]-" list &&
sed -n -e "/^Subject: /p" $(cat list) >subjects &&
! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects
@@ -359,7 +359,7 @@ EOF
test_expect_success 'no threading' '
git checkout side &&
- check_threading expect.no-threading master
+ check_threading expect.no-threading main
'
cat >expect.thread <<EOF
@@ -376,7 +376,7 @@ References: <0>
EOF
test_expect_success 'thread' '
- check_threading expect.thread --thread master
+ check_threading expect.thread --thread main
'
cat >expect.in-reply-to <<EOF
@@ -396,7 +396,7 @@ EOF
test_expect_success 'thread in-reply-to' '
check_threading expect.in-reply-to --in-reply-to="<test.message>" \
- --thread master
+ --thread main
'
cat >expect.cover-letter <<EOF
@@ -417,7 +417,7 @@ References: <0>
EOF
test_expect_success 'thread cover-letter' '
- check_threading expect.cover-letter --cover-letter --thread master
+ check_threading expect.cover-letter --cover-letter --thread main
'
cat >expect.cl-irt <<EOF
@@ -444,12 +444,12 @@ EOF
test_expect_success 'thread cover-letter in-reply-to' '
check_threading expect.cl-irt --cover-letter \
- --in-reply-to="<test.message>" --thread master
+ --in-reply-to="<test.message>" --thread main
'
test_expect_success 'thread explicit shallow' '
check_threading expect.cl-irt --cover-letter \
- --in-reply-to="<test.message>" --thread=shallow master
+ --in-reply-to="<test.message>" --thread=shallow main
'
cat >expect.deep <<EOF
@@ -467,7 +467,7 @@ References: <0>
EOF
test_expect_success 'thread deep' '
- check_threading expect.deep --thread=deep master
+ check_threading expect.deep --thread=deep main
'
cat >expect.deep-irt <<EOF
@@ -490,7 +490,7 @@ EOF
test_expect_success 'thread deep in-reply-to' '
check_threading expect.deep-irt --thread=deep \
- --in-reply-to="<test.message>" master
+ --in-reply-to="<test.message>" main
'
cat >expect.deep-cl <<EOF
@@ -514,7 +514,7 @@ References: <0>
EOF
test_expect_success 'thread deep cover-letter' '
- check_threading expect.deep-cl --cover-letter --thread=deep master
+ check_threading expect.deep-cl --cover-letter --thread=deep main
'
cat >expect.deep-cl-irt <<EOF
@@ -544,27 +544,27 @@ EOF
test_expect_success 'thread deep cover-letter in-reply-to' '
check_threading expect.deep-cl-irt --cover-letter \
- --in-reply-to="<test.message>" --thread=deep master
+ --in-reply-to="<test.message>" --thread=deep main
'
test_expect_success 'thread via config' '
test_config format.thread true &&
- check_threading expect.thread master
+ check_threading expect.thread main
'
test_expect_success 'thread deep via config' '
test_config format.thread deep &&
- check_threading expect.deep master
+ check_threading expect.deep main
'
test_expect_success 'thread config + override' '
test_config format.thread deep &&
- check_threading expect.thread --thread master
+ check_threading expect.thread --thread main
'
test_expect_success 'thread config + --no-thread' '
test_config format.thread deep &&
- check_threading expect.no-threading --no-thread master
+ check_threading expect.no-threading --no-thread main
'
test_expect_success 'excessive subject' '
@@ -577,7 +577,7 @@ test_expect_success 'excessive subject' '
after=$(git rev-parse --short $after) &&
git update-index file &&
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." &&
- git format-patch -o patches/ master..side &&
+ git format-patch -o patches/ main..side &&
ls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch
'
@@ -839,13 +839,13 @@ test_expect_success 'options no longer allowed for format-patch' '
'
test_expect_success 'format-patch --numstat should produce a patch' '
- git format-patch --numstat --stdout master..side >output &&
+ git format-patch --numstat --stdout main..side >output &&
grep "^diff --git a/" output >diff &&
test_line_count = 5 diff
'
test_expect_success 'format-patch -- <path>' '
- git format-patch master..side -- file 2>error &&
+ git format-patch main..side -- file 2>error &&
! grep "Use .--" error
'
@@ -1619,9 +1619,9 @@ test_expect_success 'cover letter with invalid --cover-from-description and conf
test_config branch.rebuild-1.description "config subject
body" &&
- test_must_fail git format-patch --cover-letter --cover-from-description garbage master &&
+ test_must_fail git format-patch --cover-letter --cover-from-description garbage main &&
test_config format.coverFromDescription garbage &&
- test_must_fail git format-patch --cover-letter master
+ test_must_fail git format-patch --cover-letter main
'
test_expect_success 'cover letter with format.coverFromDescription = default' '
@@ -1630,7 +1630,7 @@ test_expect_success 'cover letter with format.coverFromDescription = default' '
body" &&
test_config format.coverFromDescription default &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter master >actual &&
+ git format-patch --stdout --cover-letter main >actual &&
grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
grep "^config subject$" actual &&
@@ -1642,7 +1642,7 @@ test_expect_success 'cover letter with --cover-from-description default' '
body" &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter --cover-from-description default master >actual &&
+ git format-patch --stdout --cover-letter --cover-from-description default main >actual &&
grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
grep "^config subject$" actual &&
@@ -1655,7 +1655,7 @@ test_expect_success 'cover letter with format.coverFromDescription = none' '
body" &&
test_config format.coverFromDescription none &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter master >actual &&
+ git format-patch --stdout --cover-letter main >actual &&
grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual &&
grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
! grep "^config subject$" actual &&
@@ -1667,7 +1667,7 @@ test_expect_success 'cover letter with --cover-from-description none' '
body" &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter --cover-from-description none master >actual &&
+ git format-patch --stdout --cover-letter --cover-from-description none main >actual &&
grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual &&
grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
! grep "^config subject$" actual &&
@@ -1680,7 +1680,7 @@ test_expect_success 'cover letter with format.coverFromDescription = message' '
body" &&
test_config format.coverFromDescription message &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter master >actual &&
+ git format-patch --stdout --cover-letter main >actual &&
grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
grep "^config subject$" actual &&
@@ -1692,7 +1692,7 @@ test_expect_success 'cover letter with --cover-from-description message' '
body" &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter --cover-from-description message master >actual &&
+ git format-patch --stdout --cover-letter --cover-from-description message main >actual &&
grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
grep "^config subject$" actual &&
@@ -1705,7 +1705,7 @@ test_expect_success 'cover letter with format.coverFromDescription = subject' '
body" &&
test_config format.coverFromDescription subject &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter master >actual &&
+ git format-patch --stdout --cover-letter main >actual &&
grep "^Subject: \[PATCH 0/2\] config subject$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
! grep "^config subject$" actual &&
@@ -1717,7 +1717,7 @@ test_expect_success 'cover letter with --cover-from-description subject' '
body" &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter --cover-from-description subject master >actual &&
+ git format-patch --stdout --cover-letter --cover-from-description subject main >actual &&
grep "^Subject: \[PATCH 0/2\] config subject$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
! grep "^config subject$" actual &&
@@ -1730,7 +1730,7 @@ test_expect_success 'cover letter with format.coverFromDescription = auto (short
body" &&
test_config format.coverFromDescription auto &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter master >actual &&
+ git format-patch --stdout --cover-letter main >actual &&
grep "^Subject: \[PATCH 0/2\] config subject$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
! grep "^config subject$" actual &&
@@ -1742,7 +1742,7 @@ test_expect_success 'cover letter with --cover-from-description auto (short subj
body" &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter --cover-from-description auto master >actual &&
+ git format-patch --stdout --cover-letter --cover-from-description auto main >actual &&
grep "^Subject: \[PATCH 0/2\] config subject$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
! grep "^config subject$" actual &&
@@ -1755,7 +1755,7 @@ test_expect_success 'cover letter with format.coverFromDescription = auto (long
body" &&
test_config format.coverFromDescription auto &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter master >actual &&
+ git format-patch --stdout --cover-letter main >actual &&
grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
grep "^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$" actual &&
@@ -1767,7 +1767,7 @@ test_expect_success 'cover letter with --cover-from-description auto (long subje
body" &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter --cover-from-description auto master >actual &&
+ git format-patch --stdout --cover-letter --cover-from-description auto main >actual &&
grep "^Subject: \[PATCH 0/2\] \*\*\* SUBJECT HERE \*\*\*$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
grep "^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$" actual &&
@@ -1780,7 +1780,7 @@ test_expect_success 'cover letter with command-line --cover-from-description ove
body" &&
test_config format.coverFromDescription none &&
git checkout rebuild-1 &&
- git format-patch --stdout --cover-letter --cover-from-description subject master >actual &&
+ git format-patch --stdout --cover-letter --cover-from-description subject main >actual &&
grep "^Subject: \[PATCH 0/2\] config subject$" actual &&
! grep "^\*\*\* BLURB HERE \*\*\*$" actual &&
! grep "^config subject$" actual &&
@@ -1790,7 +1790,7 @@ body" &&
test_expect_success 'cover letter using branch description (1)' '
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
- git format-patch --stdout --cover-letter master >actual &&
+ git format-patch --stdout --cover-letter main >actual &&
grep hello actual
'
@@ -1804,14 +1804,14 @@ test_expect_success 'cover letter using branch description (2)' '
test_expect_success 'cover letter using branch description (3)' '
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
- git format-patch --stdout --cover-letter ^master rebuild-1 >actual &&
+ git format-patch --stdout --cover-letter ^main rebuild-1 >actual &&
grep hello actual
'
test_expect_success 'cover letter using branch description (4)' '
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
- git format-patch --stdout --cover-letter master.. >actual &&
+ git format-patch --stdout --cover-letter main.. >actual &&
grep hello actual
'
@@ -1878,8 +1878,8 @@ test_expect_success 'From line has expected format' '
test_expect_success 'format-patch -o with no leading directories' '
rm -fr patches &&
- git format-patch -o patches master..side &&
- count=$(git rev-list --count master..side) &&
+ git format-patch -o patches main..side &&
+ count=$(git rev-list --count main..side) &&
ls patches >list &&
test_line_count = $count list
'
@@ -1887,16 +1887,16 @@ test_expect_success 'format-patch -o with no leading directories' '
test_expect_success 'format-patch -o with leading existing directories' '
rm -rf existing-dir &&
mkdir existing-dir &&
- git format-patch -o existing-dir/patches master..side &&
- count=$(git rev-list --count master..side) &&
+ git format-patch -o existing-dir/patches main..side &&
+ count=$(git rev-list --count main..side) &&
ls existing-dir/patches >list &&
test_line_count = $count list
'
test_expect_success 'format-patch -o with leading non-existing directories' '
rm -rf non-existing-dir &&
- git format-patch -o non-existing-dir/patches master..side &&
- count=$(git rev-list --count master..side) &&
+ git format-patch -o non-existing-dir/patches main..side &&
+ count=$(git rev-list --count main..side) &&
test_path_is_dir non-existing-dir &&
ls non-existing-dir/patches >list &&
test_line_count = $count list
@@ -1905,8 +1905,8 @@ test_expect_success 'format-patch -o with leading non-existing directories' '
test_expect_success 'format-patch format.outputDirectory option' '
test_config format.outputDirectory patches &&
rm -fr patches &&
- git format-patch master..side &&
- count=$(git rev-list --count master..side) &&
+ git format-patch main..side &&
+ count=$(git rev-list --count main..side) &&
ls patches >list &&
test_line_count = $count list
'
@@ -1914,7 +1914,7 @@ test_expect_success 'format-patch format.outputDirectory option' '
test_expect_success 'format-patch -o overrides format.outputDirectory' '
test_config format.outputDirectory patches &&
rm -fr patches patchset &&
- git format-patch master..side -o patchset &&
+ git format-patch main..side -o patchset &&
test_path_is_missing patches &&
test_path_is_dir patchset
'
@@ -1978,14 +1978,14 @@ test_expect_success 'format-patch --base errors out when base commit is not ance
# ------------W
#
# If "format-patch Z..X" is given, P and Z can not be specified as the base commit
- git checkout -b topic1 master &&
+ git checkout -b topic1 main &&
git rev-parse HEAD >commit-id-base &&
test_commit P &&
git rev-parse HEAD >commit-id-P &&
test_commit Z &&
git rev-parse HEAD >commit-id-Z &&
test_commit Y &&
- git checkout -b topic2 master &&
+ git checkout -b topic2 main &&
test_commit W &&
git merge topic1 &&
test_commit X &&
@@ -1998,7 +1998,7 @@ test_expect_success 'format-patch --base errors out when base commit is not ance
'
test_expect_success 'format-patch --base=auto' '
- git checkout -b upstream master &&
+ git checkout -b upstream main &&
git checkout -b local upstream &&
git branch --set-upstream-to=upstream &&
test_commit N1 &&
@@ -2019,11 +2019,11 @@ test_expect_success 'format-patch errors out when history involves criss-cross'
# \ / \
# C---M2---E
#
- git checkout master &&
+ git checkout main &&
test_commit A &&
- git checkout -b xb master &&
+ git checkout -b xb main &&
test_commit B &&
- git checkout -b xc master &&
+ git checkout -b xc main &&
test_commit C &&
git checkout -b xbc xb -- &&
git merge xc &&
@@ -2121,7 +2121,7 @@ test_expect_success 'format-patch --pretty=mboxrd' '
'
test_expect_success 'interdiff: setup' '
- git checkout -b boop master &&
+ git checkout -b boop main &&
test_commit fnorp blorp &&
test_commit fleep blorp
'
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index 88d3026894..73ca78f7b4 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -849,7 +849,7 @@ test_expect_success 'combined diff with autocrlf conversion' '
echo >x goodbye &&
git commit -m "the other side" x &&
git config core.autocrlf true &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
git diff >actual.raw &&
sed -e "1,/^@@@/d" actual.raw >actual &&
diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
index 95a7ca7070..484d847749 100755
--- a/t/t4017-diff-retval.sh
+++ b/t/t4017-diff-retval.sh
@@ -111,7 +111,7 @@ test_expect_success 'check detects leftover conflict markers' '
git checkout HEAD^ &&
echo binary >>b &&
git commit -m "side" b &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
git add b &&
test_expect_code 2 git --no-pager diff --cached --check >test.out &&
test 3 = $(grep "conflict marker" test.out | wc -l) &&
diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index 94680836ce..5eb36907c1 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -115,7 +115,7 @@ test_expect_success 'check --cc --raw with forty trees' '
'
test_expect_success 'setup combined ignore spaces' '
- git checkout master &&
+ git checkout main &&
>test &&
git add test &&
git commit -m initial &&
@@ -143,7 +143,7 @@ test_expect_success 'setup combined ignore spaces' '
EOF
git commit -m "test other space changes" -a &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
tr -d Q <<-\EOF >test &&
eol spaces Q
space change
@@ -404,7 +404,7 @@ test_expect_success 'combine diff missing delete bug' '
test_expect_success 'combine diff gets tree sorting right' '
# create a directory and a file that sort differently in trees
# versus byte-wise (implied "/" sorts after ".")
- git checkout -f master &&
+ git checkout -f main &&
mkdir foo &&
echo base >foo/one &&
echo base >foo/two &&
@@ -414,9 +414,9 @@ test_expect_success 'combine diff gets tree sorting right' '
# one side modifies a file in the directory, along with the root
# file...
- echo master >foo/one &&
- echo master >foo.ext &&
- git commit -a -m master &&
+ echo main >foo/one &&
+ echo main >foo.ext &&
+ git commit -a -m main &&
# the other side modifies the other file in the directory
git checkout -b other HEAD^ &&
@@ -426,7 +426,7 @@ test_expect_success 'combine diff gets tree sorting right' '
# And now we merge. The files in the subdirectory will resolve cleanly,
# meaning that a combined diff will not find them interesting. But it
# will find the tree itself interesting, because it had to be merged.
- git checkout master &&
+ git checkout main &&
git merge other &&
printf "MM\tfoo\n" >expect &&
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
index f852136585..23701e0e8a 100755
--- a/t/t4041-diff-submodule-option.sh
+++ b/t/t4041-diff-submodule-option.sh
@@ -538,7 +538,7 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '
(cd super &&
(cd sub &&
git fetch &&
- git checkout origin/master
+ git checkout origin/main
) &&
git diff --submodule > ../actual
) &&
diff --git a/t/t4048-diff-combined-binary.sh b/t/t4048-diff-combined-binary.sh
index 7f9ad9fa3d..5c2f36363c 100755
--- a/t/t4048-diff-combined-binary.sh
+++ b/t/t4048-diff-combined-binary.sh
@@ -14,7 +14,7 @@ test_expect_success 'setup binary merge conflict' '
echo threeQ3 | q_to_nul >binary &&
git commit -a -m three &&
three=$(git rev-parse --short HEAD:binary) &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
echo resolvedQhooray | q_to_nul >binary &&
git commit -a -m resolved &&
res=$(git rev-parse --short HEAD:binary)
@@ -62,14 +62,14 @@ test_expect_success 'diff --cc indicates binary-ness' '
'
test_expect_success 'setup non-binary with binary attribute' '
- git checkout master &&
+ git checkout main &&
test_commit one text &&
test_commit two text &&
two=$(git rev-parse --short HEAD:text) &&
git checkout -b branch-text HEAD^ &&
test_commit three text &&
three=$(git rev-parse --short HEAD:text) &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
test_commit resolved text &&
res=$(git rev-parse --short HEAD:text) &&
echo text -diff >.gitattributes
@@ -206,11 +206,11 @@ index $three,$two..0000000
+THREE
++=======
+ TWO
-++>>>>>>> MASTER
+++>>>>>>> main
EOF
test_expect_success 'diff --cc respects textconv on worktree file' '
git reset --hard HEAD^ &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
git diff >actual &&
test_cmp expect actual
'
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index 28c053849a..e747a26cbd 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -353,7 +353,7 @@ cat >expect <<'EOF'
EOF
test_expect_success 'merge --stat respects COLUMNS (big change)' '
git checkout -b branch HEAD^^ &&
- COLUMNS=100 git merge --stat --no-ff master^ >output &&
+ COLUMNS=100 git merge --stat --no-ff main^ >output &&
grep " | " output >actual &&
test_cmp expect actual
'
@@ -362,7 +362,7 @@ cat >expect <<'EOF'
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++
EOF
test_expect_success 'merge --stat respects COLUMNS (long filename)' '
- COLUMNS=100 git merge --stat --no-ff master >output &&
+ COLUMNS=100 git merge --stat --no-ff main >output &&
grep " | " output >actual &&
test_cmp expect actual
'
diff --git a/t/t4056-diff-order.sh b/t/t4056-diff-order.sh
index 43dd474a12..07fcee31f4 100755
--- a/t/t4056-diff-order.sh
+++ b/t/t4056-diff-order.sh
@@ -106,7 +106,7 @@ done
test_expect_success 'setup for testing combine-diff order' '
git checkout -b tmp HEAD~ &&
create_files 3 &&
- git checkout master &&
+ git checkout main &&
git merge --no-commit -s ours tmp &&
create_files 5
'
diff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh
index 0b78573733..918b86fb63 100755
--- a/t/t4057-diff-combined-paths.sh
+++ b/t/t4057-diff-combined-paths.sh
@@ -24,9 +24,9 @@ test_expect_success 'trivial merge - combine-diff empty' '
echo $i/2 >>$i.txt
done &&
git commit -a -m "side 2-9" &&
- git checkout master &&
+ git checkout main &&
echo 1/2 >1.txt &&
- git commit -a -m "master 1" &&
+ git commit -a -m "main 1" &&
git merge side &&
>diffc.expect &&
diffc_verify
@@ -41,19 +41,19 @@ test_expect_success 'only one truly conflicting path' '
done &&
echo "4side" >>4.txt &&
git commit -a -m "side 2-9 +4" &&
- git checkout master &&
+ git checkout main &&
for i in $(test_seq 1 9)
do
echo $i/3 >>$i.txt
done &&
- echo "4master" >>4.txt &&
- git commit -a -m "master 1-9 +4" &&
+ echo "4main" >>4.txt &&
+ git commit -a -m "main 1-9 +4" &&
test_must_fail git merge side &&
cat <<-\EOF >4.txt &&
4
4/2
4/3
- 4master
+ 4main
4side
EOF
git add 4.txt &&
@@ -69,12 +69,12 @@ test_expect_success 'merge introduces new file' '
echo $i/4 >>$i.txt
done &&
git commit -a -m "side 5-9" &&
- git checkout master &&
+ git checkout main &&
for i in $(test_seq 1 3)
do
echo $i/4 >>$i.txt
done &&
- git commit -a -m "master 1-3 +4hello" &&
+ git commit -a -m "main 1-3 +4hello" &&
git merge side &&
echo "Hello World" >4hello.txt &&
git add 4hello.txt &&
@@ -90,12 +90,12 @@ test_expect_success 'merge removed a file' '
echo $i/5 >>$i.txt
done &&
git commit -a -m "side 5-9" &&
- git checkout master &&
+ git checkout main &&
for i in $(test_seq 1 3)
do
echo $i/4 >>$i.txt
done &&
- git commit -a -m "master 1-3" &&
+ git commit -a -m "main 1-3" &&
git merge side &&
git rm 4.txt &&
git commit --amend &&
diff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh
index 0f7a6d97a8..5efdc34d51 100755
--- a/t/t4061-diff-indent.sh
+++ b/t/t4061-diff-indent.sh
@@ -266,7 +266,7 @@ test_expect_success 'diff-index: nice spaces with --indent-heuristic' '
git reset --soft HEAD~ &&
git diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted &&
compare_diff spaces-compacted-expect out-diff-index-compacted &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '
@@ -274,7 +274,7 @@ test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=true diff-index -p old -- spaces.txt >out-diff-index-compacted2 &&
compare_diff spaces-compacted-expect out-diff-index-compacted2 &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '
@@ -282,7 +282,7 @@ test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '
git reset --soft HEAD~ &&
git diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index &&
compare_diff spaces-expect out-diff-index &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '
@@ -290,7 +290,7 @@ test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=false diff-index -p old -- spaces.txt >out-diff-index2 &&
compare_diff spaces-expect out-diff-index2 &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: --indent-heuristic overrides config' '
@@ -298,7 +298,7 @@ test_expect_success 'diff-index: --indent-heuristic overrides config' '
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=false diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted3 &&
compare_diff spaces-compacted-expect out-diff-index-compacted3 &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-index: --no-indent-heuristic overrides config' '
@@ -306,7 +306,7 @@ test_expect_success 'diff-index: --no-indent-heuristic overrides config' '
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=true diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index3 &&
compare_diff spaces-expect out-diff-index3 &&
- git checkout -f master
+ git checkout -f main
'
# --- diff-files tests ----------------------------------------------------
@@ -317,7 +317,7 @@ test_expect_success 'diff-files: nice spaces with --indent-heuristic' '
git diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw &&
grep -v index out-diff-files-raw >out-diff-files-compacted &&
compare_diff spaces-compacted-expect out-diff-files-compacted &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '
@@ -326,7 +326,7 @@ test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '
git -c diff.indentHeuristic=true diff-files -p spaces.txt >out-diff-files-raw2 &&
grep -v index out-diff-files-raw2 >out-diff-files-compacted2 &&
compare_diff spaces-compacted-expect out-diff-files-compacted2 &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '
@@ -335,7 +335,7 @@ test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '
git diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw &&
grep -v index out-diff-files-raw >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '
@@ -344,7 +344,7 @@ test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '
git -c diff.indentHeuristic=false diff-files -p spaces.txt >out-diff-files-raw2 &&
grep -v index out-diff-files-raw2 >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: --indent-heuristic overrides config' '
@@ -353,7 +353,7 @@ test_expect_success 'diff-files: --indent-heuristic overrides config' '
git -c diff.indentHeuristic=false diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw3 &&
grep -v index out-diff-files-raw3 >out-diff-files-compacted &&
compare_diff spaces-compacted-expect out-diff-files-compacted &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'diff-files: --no-indent-heuristic overrides config' '
@@ -362,7 +362,7 @@ test_expect_success 'diff-files: --no-indent-heuristic overrides config' '
git -c diff.indentHeuristic=true diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw4 &&
grep -v index out-diff-files-raw4 >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
- git checkout -f master
+ git checkout -f main
'
test_done
diff --git a/t/t4066-diff-emit-delay.sh b/t/t4066-diff-emit-delay.sh
index 6331f63b12..fcd54fa3eb 100755
--- a/t/t4066-diff-emit-delay.sh
+++ b/t/t4066-diff-emit-delay.sh
@@ -13,7 +13,7 @@ test_expect_success 'set up history with a merge' '
test_commit B &&
git checkout -b side HEAD^ &&
test_commit C &&
- git merge -m M master &&
+ git merge -m M main &&
test_commit D
'
diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh
index 1b420e3b5f..b5a68cfe78 100755
--- a/t/t4103-apply-binary.sh
+++ b/t/t4103-apply-binary.sh
@@ -31,64 +31,64 @@ test_expect_success 'setup' '
git update-index --add --remove file1 file2 file3 file4 &&
git commit -m "Second Version" &&
- git diff-tree -p master binary >B.diff &&
- git diff-tree -p -C master binary >C.diff &&
+ git diff-tree -p main binary >B.diff &&
+ git diff-tree -p -C main binary >C.diff &&
- git diff-tree -p --binary master binary >BF.diff &&
- git diff-tree -p --binary -C master binary >CF.diff &&
+ git diff-tree -p --binary main binary >BF.diff &&
+ git diff-tree -p --binary -C main binary >CF.diff &&
- git diff-tree -p --full-index master binary >B-index.diff &&
- git diff-tree -p -C --full-index master binary >C-index.diff &&
+ git diff-tree -p --full-index main binary >B-index.diff &&
+ git diff-tree -p -C --full-index main binary >C-index.diff &&
- git diff-tree -p --binary --no-prefix master binary -- file3 >B0.diff &&
+ git diff-tree -p --binary --no-prefix main binary -- file3 >B0.diff &&
git init other-repo &&
(
cd other-repo &&
- git fetch .. master &&
+ git fetch .. main &&
git reset --hard FETCH_HEAD
)
'
test_expect_success 'stat binary diff -- should not fail.' \
- 'git checkout master &&
+ 'git checkout main &&
git apply --stat --summary B.diff'
test_expect_success 'stat binary -p0 diff -- should not fail.' '
- git checkout master &&
+ git checkout main &&
git apply --stat -p0 B0.diff
'
test_expect_success 'stat binary diff (copy) -- should not fail.' \
- 'git checkout master &&
+ 'git checkout main &&
git apply --stat --summary C.diff'
test_expect_success 'check binary diff -- should fail.' \
- 'git checkout master &&
+ 'git checkout main &&
test_must_fail git apply --check B.diff'
test_expect_success 'check binary diff (copy) -- should fail.' \
- 'git checkout master &&
+ 'git checkout main &&
test_must_fail git apply --check C.diff'
test_expect_success \
'check incomplete binary diff with replacement -- should fail.' '
- git checkout master &&
+ git checkout main &&
test_must_fail git apply --check --allow-binary-replacement B.diff
'
test_expect_success \
'check incomplete binary diff with replacement (copy) -- should fail.' '
- git checkout master &&
+ git checkout main &&
test_must_fail git apply --check --allow-binary-replacement C.diff
'
test_expect_success 'check binary diff with replacement.' \
- 'git checkout master &&
+ 'git checkout main &&
git apply --check --allow-binary-replacement BF.diff'
test_expect_success 'check binary diff with replacement (copy).' \
- 'git checkout master &&
+ 'git checkout main &&
git apply --check --allow-binary-replacement CF.diff'
# Now we start applying them.
@@ -96,7 +96,7 @@ test_expect_success 'check binary diff with replacement (copy).' \
do_reset () {
rm -f file? &&
git reset --hard &&
- git checkout -f master
+ git checkout -f main
}
test_expect_success 'apply binary diff -- should fail.' \
diff --git a/t/t4108-apply-threeway.sh b/t/t4108-apply-threeway.sh
index d7349ced6b..f073df1792 100755
--- a/t/t4108-apply-threeway.sh
+++ b/t/t4108-apply-threeway.sh
@@ -24,14 +24,14 @@ test_expect_success setup '
test_tick &&
test_write_lines 1 two 3 4 5 six 7 >one &&
test_write_lines 1 two 3 4 5 6 7 >two &&
- git commit -a -m master &&
+ git commit -a -m main &&
git checkout side &&
test_write_lines 1 2 3 4 five 6 7 >one &&
test_write_lines 1 2 3 4 five 6 7 >two &&
git commit -a -m side &&
- git checkout master
+ git checkout main
'
test_expect_success 'apply without --3way' '
@@ -39,7 +39,7 @@ test_expect_success 'apply without --3way' '
# should fail to apply
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git apply --index P.diff &&
# should leave things intact
git diff-files --exit-code &&
@@ -52,14 +52,14 @@ test_apply_with_3way () {
# The corresponding conflicted merge
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git merge --no-commit side &&
git ls-files -s >expect.ls &&
print_sanitized_conflicted_diff >expect.diff &&
# should fail to apply
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git apply --index --3way P.diff &&
git ls-files -s >actual.ls &&
print_sanitized_conflicted_diff >actual.diff &&
@@ -86,7 +86,7 @@ test_expect_success 'apply with --3way with rerere enabled' '
# The corresponding conflicted merge
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git merge --no-commit side &&
# Manually resolve and record the resolution
@@ -96,7 +96,7 @@ test_expect_success 'apply with --3way with rerere enabled' '
# should fail to apply
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git apply --index --3way P.diff &&
# but rerere should have replayed the recorded resolution
diff --git a/t/t4121-apply-diffs.sh b/t/t4121-apply-diffs.sh
index 66368effd5..ff2257fef1 100755
--- a/t/t4121-apply-diffs.sh
+++ b/t/t4121-apply-diffs.sh
@@ -23,7 +23,7 @@ test_expect_success 'setup' \
git commit -a -q -m 2 &&
echo 9 >>file &&
git commit -a -q -m 3 &&
- git checkout master'
+ git checkout main'
test_expect_success \
'check if contextually independent diffs for the same file apply' \
diff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh
index 4acb3f336e..36562677c4 100755
--- a/t/t4122-apply-symlink-inside.sh
+++ b/t/t4122-apply-symlink-inside.sh
@@ -35,11 +35,11 @@ test_expect_success apply '
test_expect_success 'check result' '
- git diff --exit-code master &&
- git diff --exit-code --cached master &&
+ git diff --exit-code main &&
+ git diff --exit-code --cached main &&
test_tick &&
git commit -m replay &&
- T1=$(git rev-parse "master^{tree}") &&
+ T1=$(git rev-parse "main^{tree}") &&
T2=$(git rev-parse "HEAD^{tree}") &&
test "z$T1" = "z$T2"
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index bda4586a79..ffda1b94e6 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -179,8 +179,8 @@ test_expect_success setup '
test_tick &&
git commit -m "added another file" &&
- git format-patch --stdout master >lorem-move.patch &&
- git format-patch --no-prefix --stdout master >lorem-zero.patch &&
+ git format-patch --stdout main >lorem-move.patch &&
+ git format-patch --no-prefix --stdout main >lorem-zero.patch &&
git checkout -b rename &&
git mv file renamed &&
@@ -453,11 +453,11 @@ test_expect_success 'am changes committer and keeps author' '
git checkout first &&
git am patch2 &&
test_path_is_missing .git/rebase-apply &&
- test "$(git rev-parse master^^)" = "$(git rev-parse HEAD^^)" &&
- git diff --exit-code master..HEAD &&
- git diff --exit-code master^..HEAD^ &&
- compare author master HEAD &&
- compare author master^ HEAD^ &&
+ test "$(git rev-parse main^^)" = "$(git rev-parse HEAD^^)" &&
+ git diff --exit-code main..HEAD &&
+ git diff --exit-code main^..HEAD^ &&
+ compare author main HEAD &&
+ compare author main^ HEAD^ &&
test "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" = \
"$(git log -1 --pretty=format:"%cn <%ce>" HEAD)"
'
@@ -465,7 +465,7 @@ test_expect_success 'am changes committer and keeps author' '
test_expect_success 'am --signoff adds Signed-off-by: line' '
rm -fr .git/rebase-apply &&
git reset --hard &&
- git checkout -b master2 first &&
+ git checkout -b main2 first &&
git am --signoff <patch2 &&
{
printf "third\n\nSigned-off-by: %s <%s>\n\n" \
@@ -479,7 +479,7 @@ test_expect_success 'am --signoff adds Signed-off-by: line' '
'
test_expect_success 'am stays in branch' '
- echo refs/heads/master2 >expected &&
+ echo refs/heads/main2 >expected &&
git symbolic-ref HEAD >actual &&
test_cmp expected actual
'
@@ -540,7 +540,7 @@ test_expect_success 'am without --keep removes Re: and [PATCH] stuff' '
git reset --hard HEAD^ &&
git am <patch4 &&
git rev-parse HEAD >expected &&
- git rev-parse master2 >actual &&
+ git rev-parse main2 >actual &&
test_cmp expected actual
'
@@ -567,7 +567,7 @@ test_expect_success 'am --keep-non-patch really keeps the non-patch part' '
test_expect_success 'setup am -3' '
rm -fr .git/rebase-apply &&
git reset --hard &&
- git checkout -b base3way master2 &&
+ git checkout -b base3way main2 &&
sed -n -e "3,\$p" msg >file &&
head -n 9 msg >>file &&
git add file &&
@@ -759,7 +759,7 @@ test_expect_success 'am takes patches from a Pine mailbox' '
git checkout first &&
cat pine patch1 | git am &&
test_path_is_missing .git/rebase-apply &&
- git diff --exit-code master^..HEAD
+ git diff --exit-code main^..HEAD
'
test_expect_success 'am fails on mail without patch' '
@@ -1112,21 +1112,21 @@ test_expect_success 'am and .gitattibutes' '
test_commit sixth &&
git checkout test &&
- git format-patch --stdout master..HEAD >patches &&
- git reset --hard master &&
+ git format-patch --stdout main..HEAD >patches &&
+ git reset --hard main &&
git am patches &&
grep "smudged" a.txt &&
git checkout removal &&
git reset --hard &&
- git format-patch --stdout master..HEAD >patches &&
- git reset --hard master &&
+ git format-patch --stdout main..HEAD >patches &&
+ git reset --hard main &&
git am patches &&
grep "clean" a.txt &&
git checkout conflict &&
git reset --hard &&
- git format-patch --stdout master..HEAD >patches &&
+ git format-patch --stdout main..HEAD >patches &&
git reset --hard fourth &&
test_must_fail git am -3 patches &&
grep "<<<<<<<<<<" a.txt
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index 831d424c47..b6d8c15f7d 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -8,7 +8,7 @@ test_description='git rerere
! [fifth] version1
! [first] first
! [fourth] version1
- ! [master] initial
+ ! [main] initial
! [second] prefer first over second
! [third] version2
------
@@ -19,7 +19,7 @@ test_description='git rerere
- [second] prefer first over second
+ + [first] first
+ [second^] second
-++++++ [master] initial
+++++++ [main] initial
'
. ./test-lib.sh
@@ -58,7 +58,7 @@ test_expect_success 'setup' '
test_tick &&
git commit -q -a -m first &&
- git checkout -b second master &&
+ git checkout -b second main &&
git show first:a1 |
sed -e "s/To die, t/To die! T/" -e "s/Some title/Some Title/" >a1 &&
echo "* END *" >>a1 &&
@@ -169,7 +169,7 @@ test_expect_success 'first postimage wins' '
oldmtimepost=$(test-tool chmtime --get -60 $rr/postimage) &&
- git checkout -b third master &&
+ git checkout -b third main &&
git show second^:a1 | sed "s/To die: t/To die! T/" >a1 &&
git commit -q -a -m third &&
@@ -581,13 +581,13 @@ test_expect_success 'multiple identical conflicts' '
test_expect_success 'rerere with unexpected conflict markers does not crash' '
git reset --hard &&
- git checkout -b branch-1 master &&
+ git checkout -b branch-1 main &&
echo "bar" >test &&
git add test &&
git commit -q -m two &&
git reset --hard &&
- git checkout -b branch-2 master &&
+ git checkout -b branch-2 main &&
echo "foo" >test &&
git add test &&
git commit -q -a -m one &&
@@ -602,7 +602,7 @@ test_expect_success 'rerere with unexpected conflict markers does not crash' '
test_expect_success 'rerere with inner conflict markers' '
git reset --hard &&
- git checkout -b A master &&
+ git checkout -b A main &&
echo "bar" >test &&
git add test &&
git commit -q -m two &&
@@ -611,7 +611,7 @@ test_expect_success 'rerere with inner conflict markers' '
git commit -q -m three &&
git reset --hard &&
- git checkout -b B master &&
+ git checkout -b B main &&
echo "foo" >test &&
git add test &&
git commit -q -a -m one &&
@@ -652,11 +652,11 @@ test_expect_success 'setup simple stage 1 handling' '
git add original &&
git commit -m original &&
- git checkout -b A master &&
+ git checkout -b A main &&
git mv original A &&
git commit -m "rename to A" &&
- git checkout -b B master &&
+ git checkout -b B main &&
git mv original B &&
git commit -m "rename to B"
)
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh
index d3a7ce6bbb..706db30d95 100755
--- a/t/t4201-shortlog.sh
+++ b/t/t4201-shortlog.sh
@@ -102,8 +102,8 @@ A U Thor (5):
it is wrapped correctly
Th𝄞s 𝄞s a very, very long f𝄞rst l𝄞ne for the comm𝄞t message to see 𝄞f
𝄞t 𝄞s wrapped correctly
- Th����s ����s a very, very long f����rst l����ne for the comm����t
- message to see ����f ����t ����s wrapped correctly
+ Th����s ����s a very, very long f����rst l����ne for the comm����t
+ message to see ����f ����t ����s wrapped correctly
a 12 34
56 78
@@ -191,7 +191,7 @@ test_expect_success 'shortlog with revision pseudo options' '
'
test_expect_success 'shortlog with --output=<file>' '
- git shortlog --output=shortlog -1 master >output &&
+ git shortlog --output=shortlog -1 main >output &&
test_must_be_empty output &&
test_line_count = 3 shortlog
'
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index a0930599aa..20d7f8cb62 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -478,7 +478,7 @@ test_expect_success 'set up merge history' '
git checkout -b side HEAD~4 &&
test_commit side-1 1 1 &&
test_commit side-2 2 2 &&
- git checkout master &&
+ git checkout main &&
git merge side
'
@@ -541,17 +541,17 @@ test_expect_success 'log --graph with merge with log.graphColors' '
'
test_expect_success 'log --raw --graph -m with merge' '
- git log --raw --graph --oneline -m master | head -n 500 >actual &&
+ git log --raw --graph --oneline -m main | head -n 500 >actual &&
grep "initial" actual
'
test_expect_success 'diff-tree --graph' '
- git diff-tree --graph master^ | head -n 500 >actual &&
+ git diff-tree --graph main^ | head -n 500 >actual &&
grep "one" actual
'
cat > expect <<\EOF
-* commit master
+* commit main
|\ Merge: A B
| | Author: A U Thor <[email protected]>
| |
@@ -567,22 +567,22 @@ cat > expect <<\EOF
| |
| | side-1
| |
-* | commit master~1
+* | commit main~1
| | Author: A U Thor <[email protected]>
| |
| | Second
| |
-* | commit master~2
+* | commit main~2
| | Author: A U Thor <[email protected]>
| |
| | sixth
| |
-* | commit master~3
+* | commit main~3
| | Author: A U Thor <[email protected]>
| |
| | fifth
| |
-* | commit master~4
+* | commit main~4
|/ Author: A U Thor <[email protected]>
|
| fourth
@@ -613,19 +613,19 @@ test_expect_success 'log --graph with full output' '
test_expect_success 'set up more tangled history' '
git checkout -b tangle HEAD~6 &&
test_commit tangle-a tangle-a a &&
- git merge master~3 &&
+ git merge main~3 &&
git merge side~1 &&
- git checkout master &&
+ git checkout main &&
git merge tangle &&
git checkout -b reach &&
test_commit reach &&
- git checkout master &&
+ git checkout main &&
git checkout -b octopus-a &&
test_commit octopus-a &&
- git checkout master &&
+ git checkout main &&
git checkout -b octopus-b &&
test_commit octopus-b &&
- git checkout master &&
+ git checkout main &&
test_commit seventh &&
git merge octopus-a octopus-b &&
git merge reach
@@ -650,7 +650,7 @@ cat > expect <<\EOF
|\
| * Merge branch 'side' (early part) into tangle
| |\
-| * \ Merge branch 'master' (early part) into tangle
+| * \ Merge branch 'main' (early part) into tangle
| |\ \
| * | | tangle-a
* | | | Merge branch 'side'
@@ -794,7 +794,7 @@ test_expect_success 'multiple decorate-refs' '
test_expect_success 'decorate-refs-exclude with glob' '
cat >expect.decorate <<-\EOF &&
- Merge-tag-reach (HEAD -> master)
+ Merge-tag-reach (HEAD -> main)
Merge-tags-octopus-a-and-octopus-b
seventh (tag: seventh)
octopus-b (tag: octopus-b)
@@ -811,7 +811,7 @@ test_expect_success 'decorate-refs-exclude with glob' '
test_expect_success 'decorate-refs-exclude without globs' '
cat >expect.decorate <<-\EOF &&
- Merge-tag-reach (HEAD -> master)
+ Merge-tag-reach (HEAD -> main)
Merge-tags-octopus-a-and-octopus-b
seventh (tag: seventh)
octopus-b (tag: octopus-b, octopus-b)
@@ -828,7 +828,7 @@ test_expect_success 'decorate-refs-exclude without globs' '
test_expect_success 'multiple decorate-refs-exclude' '
cat >expect.decorate <<-\EOF &&
- Merge-tag-reach (HEAD -> master)
+ Merge-tag-reach (HEAD -> main)
Merge-tags-octopus-a-and-octopus-b
seventh (tag: seventh)
octopus-b (tag: octopus-b)
@@ -851,7 +851,7 @@ test_expect_success 'multiple decorate-refs-exclude' '
test_expect_success 'decorate-refs and decorate-refs-exclude' '
cat >expect.no-decorate <<-\EOF &&
- Merge-tag-reach (master)
+ Merge-tag-reach (main)
Merge-tags-octopus-a-and-octopus-b
seventh
octopus-b
@@ -866,7 +866,7 @@ test_expect_success 'decorate-refs and decorate-refs-exclude' '
test_expect_success 'deocrate-refs and log.excludeDecoration' '
cat >expect.decorate <<-\EOF &&
- Merge-tag-reach (master)
+ Merge-tag-reach (main)
Merge-tags-octopus-a-and-octopus-b
seventh
octopus-b (octopus-b)
@@ -881,7 +881,7 @@ test_expect_success 'deocrate-refs and log.excludeDecoration' '
test_expect_success 'decorate-refs-exclude and simplify-by-decoration' '
cat >expect.decorate <<-\EOF &&
- Merge-tag-reach (HEAD -> master)
+ Merge-tag-reach (HEAD -> main)
reach (tag: reach, reach)
seventh (tag: seventh)
Merge-branch-tangle
@@ -1080,7 +1080,7 @@ cat >expect <<\EOF
| |\ \ Merge: MERGE_PARENTS
| | | | Author: A U Thor <[email protected]>
| | | |
-| | | | Merge branch 'master' (early part) into tangle
+| | | | Merge branch 'main' (early part) into tangle
| | | |
| * | | commit COMMIT_OBJECT_NAME
| | | | Author: A U Thor <[email protected]>
@@ -1355,7 +1355,7 @@ cat >expect <<\EOF
*** | |\ \ Merge: MERGE_PARENTS
*** | | | | Author: A U Thor <[email protected]>
*** | | | |
-*** | | | | Merge branch 'master' (early part) into tangle
+*** | | | | Merge branch 'main' (early part) into tangle
*** | | | |
*** | * | | commit COMMIT_OBJECT_NAME
*** | | | | Author: A U Thor <[email protected]>
@@ -1588,24 +1588,24 @@ test_expect_success 'dotdot is a parent directory' '
'
test_expect_success GPG 'setup signed branch' '
- test_when_finished "git reset --hard && git checkout master" &&
- git checkout -b signed master &&
+ test_when_finished "git reset --hard && git checkout main" &&
+ git checkout -b signed main &&
echo foo >foo &&
git add foo &&
git commit -S -m signed_commit
'
test_expect_success GPG 'setup signed branch with subkey' '
- test_when_finished "git reset --hard && git checkout master" &&
- git checkout -b signed-subkey master &&
+ test_when_finished "git reset --hard && git checkout main" &&
+ git checkout -b signed-subkey main &&
echo foo >foo &&
git add foo &&
git commit -SB7227189 -m signed_commit
'
test_expect_success GPGSM 'setup signed branch x509' '
- test_when_finished "git reset --hard && git checkout master" &&
- git checkout -b signed-x509 master &&
+ test_when_finished "git reset --hard && git checkout main" &&
+ git checkout -b signed-x509 main &&
echo foo >foo &&
git add foo &&
test_config gpg.format x509 &&
@@ -1638,12 +1638,12 @@ test_expect_success GPGSM 'log --graph --show-signature x509' '
'
test_expect_success GPG 'log --graph --show-signature for merged tag' '
- test_when_finished "git reset --hard && git checkout master" &&
- git checkout -b plain master &&
+ test_when_finished "git reset --hard && git checkout main" &&
+ git checkout -b plain main &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
- git checkout -b tagged master &&
+ git checkout -b tagged main &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
@@ -1657,12 +1657,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '
'
test_expect_success GPG 'log --graph --show-signature for merged tag in shallow clone' '
- test_when_finished "git reset --hard && git checkout master" &&
- git checkout -b plain-shallow master &&
+ test_when_finished "git reset --hard && git checkout main" &&
+ git checkout -b plain-shallow main &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
- git checkout --detach master &&
+ git checkout --detach main &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
@@ -1677,12 +1677,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag in shallow
'
test_expect_success GPG 'log --graph --show-signature for merged tag with missing key' '
- test_when_finished "git reset --hard && git checkout master" &&
- git checkout -b plain-nokey master &&
+ test_when_finished "git reset --hard && git checkout main" &&
+ git checkout -b plain-nokey main &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
- git checkout -b tagged-nokey master &&
+ git checkout -b tagged-nokey main &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
@@ -1696,12 +1696,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with missin
'
test_expect_success GPG 'log --graph --show-signature for merged tag with bad signature' '
- test_when_finished "git reset --hard && git checkout master" &&
- git checkout -b plain-bad master &&
+ test_when_finished "git reset --hard && git checkout main" &&
+ git checkout -b plain-bad main &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
- git checkout -b tagged-bad master &&
+ git checkout -b tagged-bad main &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
@@ -1718,12 +1718,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with bad si
'
test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '
- test_when_finished "git reset --hard && git checkout master" &&
- git checkout -b plain-fail master &&
+ test_when_finished "git reset --hard && git checkout main" &&
+ git checkout -b plain-fail main &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
- git checkout -b tagged-fail master &&
+ git checkout -b tagged-fail main &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
@@ -1737,14 +1737,14 @@ test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '
'
test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
test_config gpg.format x509 &&
test_config user.signingkey $GIT_COMMITTER_EMAIL &&
- git checkout -b plain-x509 master &&
+ git checkout -b plain-x509 main &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
- git checkout -b tagged-x509 master &&
+ git checkout -b tagged-x509 main &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
@@ -1758,14 +1758,14 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '
'
test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 missing key' '
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
test_config gpg.format x509 &&
test_config user.signingkey $GIT_COMMITTER_EMAIL &&
- git checkout -b plain-x509-nokey master &&
+ git checkout -b plain-x509-nokey main &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
- git checkout -b tagged-x509-nokey master &&
+ git checkout -b tagged-x509-nokey main &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
@@ -1778,14 +1778,14 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss
'
test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' '
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
test_config gpg.format x509 &&
test_config user.signingkey $GIT_COMMITTER_EMAIL &&
- git checkout -b plain-x509-bad master &&
+ git checkout -b plain-x509-bad main &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
- git checkout -b tagged-x509-bad master &&
+ git checkout -b tagged-x509-bad main &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
@@ -1835,7 +1835,7 @@ test_expect_success 'log diagnoses bogus HEAD' '
git init empty &&
test_must_fail git -C empty log 2>stderr &&
test_i18ngrep does.not.have.any.commits stderr &&
- echo 1234abcd >empty/.git/refs/heads/master &&
+ echo 1234abcd >empty/.git/refs/heads/main &&
test_must_fail git -C empty log 2>stderr &&
test_i18ngrep broken stderr &&
echo "ref: refs/heads/invalid.lock" >empty/.git/HEAD &&
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 586c3a86b1..2127b1652d 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -194,7 +194,7 @@ test_expect_success 'No mailmap files, but configured' '
test_expect_success 'setup mailmap blob tests' '
git checkout -b map &&
- test_when_finished "git checkout master" &&
+ test_when_finished "git checkout main" &&
cat >just-bugs <<- EOF &&
Blob Guy <[email protected]>
EOF
diff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh
index 8ff8bd84c7..3808dce5c7 100755
--- a/t/t4204-patch-id.sh
+++ b/t/t4204-patch-id.sh
@@ -13,9 +13,9 @@ test_expect_success 'setup' '
test_write_lines $as b >foo &&
test_write_lines $as b >bar &&
git commit -a -m first &&
- git checkout -b same master &&
+ git checkout -b same main &&
git commit --amend -m same-msg &&
- git checkout -b notsame master &&
+ git checkout -b notsame main &&
echo c >foo &&
echo c >bar &&
git commit --amend -a -m notsame-msg &&
@@ -46,31 +46,31 @@ get_patch_id () {
}
test_expect_success 'patch-id detects equality' '
- get_patch_id master &&
+ get_patch_id main &&
get_patch_id same &&
- test_cmp patch-id_master patch-id_same
+ test_cmp patch-id_main patch-id_same
'
test_expect_success 'patch-id detects inequality' '
- get_patch_id master &&
+ get_patch_id main &&
get_patch_id notsame &&
- ! test_cmp patch-id_master patch-id_notsame
+ ! test_cmp patch-id_main patch-id_notsame
'
test_expect_success 'patch-id supports git-format-patch output' '
- get_patch_id master &&
+ get_patch_id main &&
git checkout same &&
git format-patch -1 --stdout | calc_patch_id same &&
- test_cmp patch-id_master patch-id_same &&
+ test_cmp patch-id_main patch-id_same &&
set $(git format-patch -1 --stdout | git patch-id) &&
test "$2" = $(git rev-parse HEAD)
'
test_expect_success 'whitespace is irrelevant in footer' '
- get_patch_id master &&
+ get_patch_id main &&
git checkout same &&
git format-patch -1 --stdout | sed "s/ \$//" | calc_patch_id same &&
- test_cmp patch-id_master patch-id_same
+ test_cmp patch-id_main patch-id_same
'
cmp_patch_id () {
@@ -88,7 +88,7 @@ test_patch_id_file_order () {
shift
name="order-${1}-$relevant"
shift
- get_top_diff "master" | calc_patch_id "$name" "$@" &&
+ get_top_diff "main" | calc_patch_id "$name" "$@" &&
git checkout same &&
git format-patch -1 --stdout -O foo-then-bar |
calc_patch_id "ordered-$name" "$@" &&
@@ -137,10 +137,10 @@ test_expect_success '--stable overrides patchid.stable = false' '
'
test_expect_success 'patch-id supports git-format-patch MIME output' '
- get_patch_id master &&
+ get_patch_id main &&
git checkout same &&
git format-patch -1 --attach --stdout | calc_patch_id same &&
- test_cmp patch-id_master patch-id_same
+ test_cmp patch-id_main patch-id_same
'
test_expect_success 'patch-id respects config from subdir' '
diff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh
index 60f040cab8..b6793064dc 100755
--- a/t/t4207-log-decoration-colors.sh
+++ b/t/t4207-log-decoration-colors.sh
@@ -40,13 +40,13 @@ test_expect_success setup '
cat >expected <<EOF
${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD ->\
- ${c_reset}${c_branch}master${c_reset}${c_commit},\
+ ${c_reset}${c_branch}main${c_reset}${c_commit},\
${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\
${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B
${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit},\
- ${c_reset}${c_remoteBranch}other/master${c_reset}${c_commit})${c_reset} A1
+ ${c_reset}${c_remoteBranch}other/main${c_reset}${c_commit})${c_reset} A1
${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset}\
- On master: Changes to A.t
+ On main: Changes to A.t
${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A
EOF
diff --git a/t/t4208-log-magic-pathspec.sh b/t/t4208-log-magic-pathspec.sh
index 6cdbe4747a..58b928dbf3 100755
--- a/t/t4208-log-magic-pathspec.sh
+++ b/t/t4208-log-magic-pathspec.sh
@@ -26,7 +26,7 @@ test_expect_success '"git log :/a -- " should not be ambiguous' '
'
test_expect_success '"git log :/detached -- " should find a commit only in HEAD' '
- test_when_finished "git checkout master" &&
+ test_when_finished "git checkout main" &&
git checkout --detach &&
# Must manually call `test_tick` instead of using `test_commit`,
# because the latter additionally creates a tag, which would make
@@ -119,7 +119,7 @@ test_expect_success 'command line pathspec parsing for "git log"' '
git checkout HEAD^ &&
echo 2 >a &&
git commit -a -m "update a to 2" &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
git add a &&
git log --merge -- a
'
diff --git a/t/t4211/history.export b/t/t4211/history.export
index f9f41e211e..006972a1f2 100644
--- a/t/t4211/history.export
+++ b/t/t4211/history.export
@@ -316,7 +316,7 @@ long f(long x)
return s;
}
-commit refs/heads/master
+commit refs/heads/main
mark :19
author Thomas Rast <[email protected]> 1362045024 +0100
committer Thomas Rast <[email protected]> 1362045024 +0100
diff --git a/t/t4214-log-graph-octopus.sh b/t/t4214-log-graph-octopus.sh
index a080325098..d4e07cb0ba 100755
--- a/t/t4214-log-graph-octopus.sh
+++ b/t/t4214-log-graph-octopus.sh
@@ -17,7 +17,7 @@ test_cmp_colored_graph () {
test_expect_success 'set up merge history' '
test_commit initial &&
for i in 1 2 3 4 ; do
- git checkout master -b $i || return $?
+ git checkout main -b $i || return $?
# Make tag name different from branch name, to avoid
# ambiguity error when calling checkout.
test_commit $i $i $i tag$i || return $?
diff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh
index c855bcd3e7..1848588532 100755
--- a/t/t4216-log-bloom.sh
+++ b/t/t4216-log-bloom.sh
@@ -21,7 +21,7 @@ test_expect_success 'setup test - repo, commits, commit graph, log outputs' '
test_commit c10 file_to_be_deleted &&
git checkout -b side HEAD~4 &&
test_commit side-1 file4 &&
- git checkout master &&
+ git checkout main &&
git merge side &&
test_commit c11 file5 &&
mv file5 file5_renamed &&
@@ -87,7 +87,7 @@ do
"--topo-order" \
"--date-order" \
"--author-date-order" \
- "--ancestry-path side..master"
+ "--ancestry-path side..main"
do
test_expect_success "git log option: $option for path: $path" '
test_bloom_filters_used "$option -- $path"
diff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh
index 6e1b73ec3a..cf51efa2ee 100755
--- a/t/t4253-am-keep-cr-dos.sh
+++ b/t/t4253-am-keep-cr-dos.sh
@@ -43,7 +43,7 @@ test_expect_success 'setup repository with dos files' '
test_expect_success 'am with dos files without --keep-cr' '
git checkout -b dosfiles initial &&
- git format-patch -k initial..master &&
+ git format-patch -k initial..main &&
test_must_fail git am -k -3 000*.patch &&
git am --abort &&
rm -rf .git/rebase-apply 000*.patch
@@ -51,23 +51,23 @@ test_expect_success 'am with dos files without --keep-cr' '
test_expect_success 'am with dos files with --keep-cr' '
git checkout -b dosfiles-keep-cr initial &&
- git format-patch -k --stdout initial..master >output &&
+ git format-patch -k --stdout initial..main >output &&
git am --keep-cr -k -3 output &&
- git diff --exit-code master
+ git diff --exit-code main
'
test_expect_success 'am with dos files config am.keepcr' '
git config am.keepcr 1 &&
git checkout -b dosfiles-conf-keepcr initial &&
- git format-patch -k --stdout initial..master >output &&
+ git format-patch -k --stdout initial..main >output &&
git am -k -3 output &&
- git diff --exit-code master
+ git diff --exit-code main
'
test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-cr' '
git config am.keepcr 1 &&
git checkout -b dosfiles-conf-keepcr-override initial &&
- git format-patch -k initial..master &&
+ git format-patch -k initial..main &&
test_must_fail git am -k -3 --no-keep-cr 000*.patch &&
git am --abort &&
rm -rf .git/rebase-apply 000*.patch
@@ -75,14 +75,14 @@ test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-
test_expect_success 'am with dos files with --keep-cr continue' '
git checkout -b dosfiles-keep-cr-continue initial &&
- git format-patch -k initial..master &&
+ git format-patch -k initial..main &&
append_cr <file1a >file &&
git commit -m "different patch" file &&
test_must_fail git am --keep-cr -k -3 000*.patch &&
append_cr <file2 >file &&
git add file &&
git am -3 --resolved &&
- git diff --exit-code master
+ git diff --exit-code main
'
test_expect_success 'am with unix files config am.keepcr overridden by --no-keep-cr' '
@@ -90,9 +90,9 @@ test_expect_success 'am with unix files config am.keepcr overridden by --no-keep
git checkout -b unixfiles-conf-keepcr-override initial &&
cp -f file1 file &&
git commit -m "line ending to unix" file &&
- git format-patch -k initial..master &&
+ git format-patch -k initial..main &&
git am -k -3 --no-keep-cr 000*.patch &&
- git diff --exit-code -w master
+ git diff --exit-code -w main
'
test_done
diff --git a/t/t4257-am-interactive.sh b/t/t4257-am-interactive.sh
index 5344bd248a..aed8f4de3d 100755
--- a/t/t4257-am-interactive.sh
+++ b/t/t4257-am-interactive.sh
@@ -10,7 +10,7 @@ test_expect_success 'set up patches to apply' '
git format-patch --stdout -2 >mbox &&
git reset --hard unrelated &&
- test_commit conflict-master file master base
+ test_commit conflict-main file main base
'
# Sanity check our setup.
diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh
index c1811ea0f4..4fa71961a6 100755
--- a/t/t5150-request-pull.sh
+++ b/t/t5150-request-pull.sh
@@ -31,13 +31,13 @@ test_expect_success 'setup' '
test_tick &&
git commit -m "\"Thirty days\", a reminder of month lengths" &&
git tag -m "version 1" -a initial &&
- git push --tags origin master
+ git push --tags origin main
) &&
(
cd local &&
git remote add upstream "$trash_url/upstream.git" &&
git fetch upstream &&
- git pull upstream master &&
+ git pull upstream main &&
cat <<-\EOT >>mnemonic.txt &&
Of twyecescore-eightt is but eine,
And all the remnante be thrycescore-eine.
@@ -59,7 +59,7 @@ test_expect_success 'setup' '
git commit -a -m "Adapt to use modern, simpler English
But keep the old version, too, in case some people prefer it." &&
- git checkout master
+ git checkout main
)
'
@@ -129,7 +129,7 @@ test_expect_success 'pull request when forgot to push' '
(
cd local &&
git checkout initial &&
- git merge --ff-only master &&
+ git merge --ff-only main &&
test_must_fail git request-pull initial "$downstream_url" \
2>../err
) &&
@@ -145,9 +145,9 @@ test_expect_success 'pull request after push' '
(
cd local &&
git checkout initial &&
- git merge --ff-only master &&
- git push origin master:for-upstream &&
- git request-pull initial origin master:for-upstream >../request
+ git merge --ff-only main &&
+ git push origin main:for-upstream &&
+ git request-pull initial origin main:for-upstream >../request
) &&
sed -nf read-request.sed <request >digest &&
{
@@ -172,9 +172,9 @@ test_expect_success 'request asks HEAD to be pulled' '
(
cd local &&
git checkout initial &&
- git merge --ff-only master &&
- git push --tags origin master simplify &&
- git push origin master:for-upstream &&
+ git merge --ff-only main &&
+ git push --tags origin main simplify &&
+ git push origin main:for-upstream &&
git request-pull initial "$downstream_url" >../request
) &&
sed -nf read-request.sed <request >digest &&
@@ -215,7 +215,7 @@ test_expect_success 'pull request format' '
(
cd local &&
git checkout initial &&
- git merge --ff-only master &&
+ git merge --ff-only main &&
git push origin tags/full &&
git request-pull initial "$downstream_url" tags/full >../request
) &&
@@ -243,9 +243,9 @@ test_expect_success 'request-pull ignores OPTIONS_KEEPDASHDASH poison' '
OPTIONS_KEEPDASHDASH=Yes &&
export OPTIONS_KEEPDASHDASH &&
git checkout initial &&
- git merge --ff-only master &&
- git push origin master:for-upstream &&
- git request-pull -- initial "$downstream_url" master:for-upstream >../request
+ git merge --ff-only main &&
+ git push origin main:for-upstream &&
+ git request-pull -- initial "$downstream_url" main:for-upstream >../request
)
'
@@ -257,7 +257,7 @@ test_expect_success 'request-pull quotes regex metacharacters properly' '
(
cd local &&
git checkout initial &&
- git merge --ff-only master &&
+ git merge --ff-only main &&
git tag -mrelease v2.0 &&
git push origin refs/tags/v2.0:refs/tags/v2-0 &&
test_must_fail git request-pull initial "$downstream_url" tags/v2.0 \
@@ -275,7 +275,7 @@ test_expect_success 'pull request with mismatched object' '
(
cd local &&
git checkout initial &&
- git merge --ff-only master &&
+ git merge --ff-only main &&
git push origin HEAD:refs/tags/full &&
test_must_fail git request-pull initial "$downstream_url" tags/full \
2>../err
@@ -292,7 +292,7 @@ test_expect_success 'pull request with stale object' '
(
cd local &&
git checkout initial &&
- git merge --ff-only master &&
+ git merge --ff-only main &&
git push origin refs/tags/full &&
git tag -f -m"Thirty-one days" full &&
test_must_fail git request-pull initial "$downstream_url" tags/full \
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index df60f18fb8..7391f95c7e 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -119,7 +119,7 @@ test_expect_success 'prune: do not prune detached HEAD with no reflog' '
test_expect_success 'prune: prune former HEAD after checking out branch' '
head_oid=$(git rev-parse HEAD) &&
- git checkout --quiet master &&
+ git checkout --quiet main &&
git prune -v >prune_actual &&
grep "$head_oid" prune_actual
diff --git a/t/t5305-include-tag.sh b/t/t5305-include-tag.sh
index a5eca210b8..69233574b8 100755
--- a/t/t5305-include-tag.sh
+++ b/t/t5305-include-tag.sh
@@ -111,7 +111,7 @@ test_expect_success 'check unpacked result (have all objects)' '
test_expect_success 'single-branch clone can transfer tag' '
rm -rf clone.git &&
- git clone --no-local --single-branch -b master . clone.git &&
+ git clone --no-local --single-branch -b main . clone.git &&
git -C clone.git fsck
'
diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh
index 8318781d2b..7e9ba69335 100755
--- a/t/t5310-pack-bitmaps.sh
+++ b/t/t5310-pack-bitmaps.sh
@@ -24,8 +24,8 @@ test_expect_success 'setup repo with moderate-sized history' '
test_commit_bulk --id=file 100 &&
git checkout -b other HEAD~5 &&
test_commit_bulk --id=side 10 &&
- git checkout master &&
- bitmaptip=$(git rev-parse master) &&
+ git checkout main &&
+ bitmaptip=$(git rev-parse main) &&
blob=$(echo tagged-blob | git hash-object -w --stdin) &&
git tag tagged-blob $blob &&
git config repack.writebitmaps true
@@ -63,8 +63,8 @@ rev_list_tests() {
'
test_expect_success "counting non-linear history ($state)" '
- git rev-list --count other...master >expect &&
- git rev-list --use-bitmap-index --count other...master >actual &&
+ git rev-list --count other...main >expect &&
+ git rev-list --use-bitmap-index --count other...main >actual &&
test_cmp expect actual
'
@@ -128,7 +128,7 @@ test_expect_success 'setup further non-bitmapped commits' '
rev_list_tests 'partial bitmap'
test_expect_success 'fetch (partial bitmap)' '
- git --git-dir=clone.git fetch origin master:master &&
+ git --git-dir=clone.git fetch origin main:main &&
git rev-parse HEAD >expect &&
git --git-dir=clone.git rev-parse HEAD >actual &&
test_cmp expect actual
@@ -230,7 +230,7 @@ test_expect_success 'full repack, reusing previous bitmaps' '
'
test_expect_success 'fetch (full bitmap)' '
- git --git-dir=clone.git fetch origin master:master &&
+ git --git-dir=clone.git fetch origin main:main &&
git rev-parse HEAD >expect &&
git --git-dir=clone.git rev-parse HEAD >actual &&
test_cmp expect actual
diff --git a/t/t5312-prune-corruption.sh b/t/t5312-prune-corruption.sh
index da9d59940d..8ca3823f23 100755
--- a/t/t5312-prune-corruption.sh
+++ b/t/t5312-prune-corruption.sh
@@ -16,7 +16,7 @@ test_expect_success 'disable reflogs' '
'
test_expect_success 'create history reachable only from a bogus-named ref' '
- test_tick && git commit --allow-empty -m master &&
+ test_tick && git commit --allow-empty -m main &&
base=$(git rev-parse HEAD) &&
test_tick && git commit --allow-empty -m bogus &&
bogus=$(git rev-parse HEAD) &&
@@ -51,7 +51,7 @@ test_expect_success 'clean up bogus ref' '
'
# We create two new objects here, "one" and "two". Our
-# master branch points to "two", which is deleted,
+# main branch points to "two", which is deleted,
# corrupting the repository. But we'd like to make sure
# that the otherwise unreachable "one" is not pruned
# (since it is the user's best bet for recovering
@@ -81,7 +81,7 @@ test_expect_success 'pruning with a corrupted tip does not drop history' '
test_expect_success 'pack-refs does not silently delete broken loose ref' '
git pack-refs --all --prune &&
echo $missing >expect &&
- git rev-parse refs/heads/master >actual &&
+ git rev-parse refs/heads/main >actual &&
test_cmp expect actual
'
@@ -89,25 +89,25 @@ test_expect_success 'pack-refs does not silently delete broken loose ref' '
# actually pack it, as it is perfectly reasonable to
# skip processing a broken ref
test_expect_success 'create packed-refs file with broken ref' '
- rm -f .git/refs/heads/master &&
+ rm -f .git/refs/heads/main &&
cat >.git/packed-refs <<-EOF &&
- $missing refs/heads/master
+ $missing refs/heads/main
$recoverable refs/heads/other
EOF
echo $missing >expect &&
- git rev-parse refs/heads/master >actual &&
+ git rev-parse refs/heads/main >actual &&
test_cmp expect actual
'
test_expect_success 'pack-refs does not silently delete broken packed ref' '
git pack-refs --all --prune &&
- git rev-parse refs/heads/master >actual &&
+ git rev-parse refs/heads/main >actual &&
test_cmp expect actual
'
test_expect_success 'pack-refs does not drop broken refs during deletion' '
git update-ref -d refs/heads/other &&
- git rev-parse refs/heads/master >actual &&
+ git rev-parse refs/heads/main >actual &&
test_cmp expect actual
'
diff --git a/t/t5315-pack-objects-compression.sh b/t/t5315-pack-objects-compression.sh
index df970d7584..4aa3951f45 100755
--- a/t/t5315-pack-objects-compression.sh
+++ b/t/t5315-pack-objects-compression.sh
@@ -5,7 +5,7 @@ test_description='pack-object compression configuration'
. ./test-lib.sh
# This should be moved to test-lib.sh together with the
-# copy in t0021 after both topics have graduated to 'master'.
+# copy in t0021 after both topics have graduated to 'main'.
file_size () {
test-tool path-utils file-size "$1"
}
diff --git a/t/t5317-pack-objects-filter-objects.sh b/t/t5317-pack-objects-filter-objects.sh
index dc0446574b..6ee66d58ce 100755
--- a/t/t5317-pack-objects-filter-objects.sh
+++ b/t/t5317-pack-objects-filter-objects.sh
@@ -382,7 +382,7 @@ test_expect_success 'verify sparse:oid=oid-ish' '
awk -f print_2.awk ls_files_result |
sort >expected &&
- git -C r4 pack-objects --revs --stdout --filter=sparse:oid=master:pattern >filter.pack <<-EOF &&
+ git -C r4 pack-objects --revs --stdout --filter=sparse:oid=main:pattern >filter.pack <<-EOF &&
HEAD
EOF
git -C r4 index-pack ../filter.pack &&
diff --git a/t/t5322-pack-objects-sparse.sh b/t/t5322-pack-objects-sparse.sh
index a581eaf529..99bdab0610 100755
--- a/t/t5322-pack-objects-sparse.sh
+++ b/t/t5322-pack-objects-sparse.sh
@@ -18,7 +18,7 @@ test_expect_success 'setup repo' '
git commit -m "Initialized trees" &&
for i in $(test_seq 1 3)
do
- git checkout -b topic$i master &&
+ git checkout -b topic$i main &&
echo change-$i >f$i/f$i/data.txt &&
git commit -a -m "Changed f$i/f$i/data.txt"
done &&
diff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh
index 6b4d1ca353..b4921d2908 100755
--- a/t/t5323-pack-redundant.sh
+++ b/t/t5323-pack-redundant.sh
@@ -6,7 +6,7 @@
test_description='Test git pack-redundant
In order to test git-pack-redundant, we will create a number of objects and
-packs in the repository `master.git`. The relationship between packs (P1-P8)
+packs in the repository `main.git`. The relationship between packs (P1-P8)
and objects (T, A-R) is showed in the following chart. Objects of a pack will
be marked with letter x, while objects of redundant packs will be marked with
exclamation point, and redundant pack itself will be marked with asterisk.
@@ -25,7 +25,7 @@ exclamation point, and redundant pack itself will be marked with asterisk.
ALL | x x x x x x x x x x x x x x x x x x x
Another repository `shared.git` has unique objects (X-Z), while other objects
-(marked with letter s) are shared through alt-odb (of `master.git`). The
+(marked with letter s) are shared through alt-odb (of `main.git`). The
relationship between packs and objects is as follows:
| T A B C D E F G H I J K L M N O P Q R X Y Z
@@ -36,7 +36,7 @@ relationship between packs and objects is as follows:
. ./test-lib.sh
-master_repo=master.git
+main_repo=main.git
shared_repo=shared.git
# Create commits in <repo> and assign each commit's oid to shell variables
@@ -69,7 +69,7 @@ create_commits_in () {
shift ||
return 1
done &&
- git -C "$repo" update-ref refs/heads/master $oid
+ git -C "$repo" update-ref refs/heads/main $oid
}
# Create pack in <repo> and assign pack id to variable given in the 2nd argument
@@ -107,9 +107,9 @@ format_packfiles () {
sort
}
-test_expect_success 'setup master repo' '
- git init --bare "$master_repo" &&
- create_commits_in "$master_repo" A B C D E F G H I J K L M N O P Q R
+test_expect_success 'setup main repo' '
+ git init --bare "$main_repo" &&
+ create_commits_in "$main_repo" A B C D E F G H I J K L M N O P Q R
'
#############################################################################
@@ -124,8 +124,8 @@ test_expect_success 'setup master repo' '
# ALL | x x x x x x x x x x x x x x x
#
#############################################################################
-test_expect_success 'master: no redundant for pack 1, 2, 3' '
- create_pack_in "$master_repo" P1 <<-EOF &&
+test_expect_success 'main: no redundant for pack 1, 2, 3' '
+ create_pack_in "$main_repo" P1 <<-EOF &&
$T
$A
$B
@@ -135,7 +135,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '
$F
$R
EOF
- create_pack_in "$master_repo" P2 <<-EOF &&
+ create_pack_in "$main_repo" P2 <<-EOF &&
$B
$C
$D
@@ -144,7 +144,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '
$H
$I
EOF
- create_pack_in "$master_repo" P3 <<-EOF &&
+ create_pack_in "$main_repo" P3 <<-EOF &&
$F
$I
$J
@@ -153,7 +153,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '
$M
EOF
(
- cd "$master_repo" &&
+ cd "$main_repo" &&
git pack-redundant --all >out &&
test_must_be_empty out
)
@@ -173,22 +173,22 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '
# ALL | x x x x x x x x x x x x x x x x x x
#
#############################################################################
-test_expect_success 'master: one of pack-2/pack-3 is redundant' '
- create_pack_in "$master_repo" P4 <<-EOF &&
+test_expect_success 'main: one of pack-2/pack-3 is redundant' '
+ create_pack_in "$main_repo" P4 <<-EOF &&
$J
$K
$L
$M
$P
EOF
- create_pack_in "$master_repo" P5 <<-EOF &&
+ create_pack_in "$main_repo" P5 <<-EOF &&
$G
$H
$N
$O
EOF
(
- cd "$master_repo" &&
+ cd "$main_repo" &&
cat >expect <<-EOF &&
P3:$P3
EOF
@@ -214,18 +214,18 @@ test_expect_success 'master: one of pack-2/pack-3 is redundant' '
# ALL | x x x x x x x x x x x x x x x x x x x
#
#############################################################################
-test_expect_success 'master: pack 2, 4, and 6 are redundant' '
- create_pack_in "$master_repo" P6 <<-EOF &&
+test_expect_success 'main: pack 2, 4, and 6 are redundant' '
+ create_pack_in "$main_repo" P6 <<-EOF &&
$N
$O
$Q
EOF
- create_pack_in "$master_repo" P7 <<-EOF &&
+ create_pack_in "$main_repo" P7 <<-EOF &&
$P
$Q
EOF
(
- cd "$master_repo" &&
+ cd "$main_repo" &&
cat >expect <<-EOF &&
P2:$P2
P4:$P4
@@ -254,12 +254,12 @@ test_expect_success 'master: pack 2, 4, and 6 are redundant' '
# ALL | x x x x x x x x x x x x x x x x x x x
#
#############################################################################
-test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '
- create_pack_in "$master_repo" P8 <<-EOF &&
+test_expect_success 'main: pack-8 (subset of pack-1) is also redundant' '
+ create_pack_in "$main_repo" P8 <<-EOF &&
$A
EOF
(
- cd "$master_repo" &&
+ cd "$main_repo" &&
cat >expect <<-EOF &&
P2:$P2
P4:$P4
@@ -272,18 +272,18 @@ test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '
)
'
-test_expect_success 'master: clean loose objects' '
+test_expect_success 'main: clean loose objects' '
(
- cd "$master_repo" &&
+ cd "$main_repo" &&
git prune-packed &&
find objects -type f | sed -e "/objects\/pack\//d" >out &&
test_must_be_empty out
)
'
-test_expect_success 'master: remove redundant packs and pass fsck' '
+test_expect_success 'main: remove redundant packs and pass fsck' '
(
- cd "$master_repo" &&
+ cd "$main_repo" &&
git pack-redundant --all | xargs rm &&
git fsck &&
git pack-redundant --all >out &&
@@ -292,12 +292,12 @@ test_expect_success 'master: remove redundant packs and pass fsck' '
'
# The following test cases will execute inside `shared.git`, instead of
-# inside `master.git`.
+# inside `main.git`.
test_expect_success 'setup shared.git' '
- git clone --mirror "$master_repo" "$shared_repo" &&
+ git clone --mirror "$main_repo" "$shared_repo" &&
(
cd "$shared_repo" &&
- printf "../../$master_repo/objects\n" >objects/info/alternates
+ printf "../../$main_repo/objects\n" >objects/info/alternates
)
'
@@ -312,7 +312,7 @@ test_expect_success 'shared: all packs are redundant, but no output without --al
#############################################################################
# Chart of packs and objects for this test case
#
-# ================ master.git ===============
+# ================ main.git ===============
# | T A B C D E F G H I J K L M N O P Q R <----------+
# ----+-------------------------------------- |
# P1 | x x x x x x x x |
@@ -394,7 +394,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '
#############################################################################
# Chart of packs and objects for this test case
#
-# ================ master.git ===============
+# ================ main.git ===============
# | T A B C D E F G H I J K L M N O P Q R <----------------+
# ----+-------------------------------------- |
# P1 | x x x x x x x x |
@@ -426,7 +426,7 @@ test_expect_success 'shared: one pack is redundant with --alt-odb' '
#############################################################################
# Chart of packs and objects for this test case
#
-# ================ master.git ===============
+# ================ main.git ===============
# | T A B C D E F G H I J K L M N O P Q R <----------------+
# ----+-------------------------------------- |
# P1 | x x x x x x x x |
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index b84618c925..e12e29ac58 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -65,20 +65,20 @@ test_expect_success 'pack the destination repository' '
'
test_expect_success 'refuse pushing rewound head without --force' '
- pushed_head=$(git rev-parse --verify master) &&
- victim_orig=$(cd victim && git rev-parse --verify master) &&
- test_must_fail git send-pack ./victim master &&
- victim_head=$(cd victim && git rev-parse --verify master) &&
+ pushed_head=$(git rev-parse --verify main) &&
+ victim_orig=$(cd victim && git rev-parse --verify main) &&
+ test_must_fail git send-pack ./victim main &&
+ victim_head=$(cd victim && git rev-parse --verify main) &&
test "$victim_head" = "$victim_orig" &&
# this should update
- git send-pack --force ./victim master &&
- victim_head=$(cd victim && git rev-parse --verify master) &&
+ git send-pack --force ./victim main &&
+ victim_head=$(cd victim && git rev-parse --verify main) &&
test "$victim_head" = "$pushed_head"
'
test_expect_success 'push can be used to delete a ref' '
- ( cd victim && git branch extra master ) &&
- git send-pack ./victim :extra master &&
+ ( cd victim && git branch extra main ) &&
+ git send-pack ./victim :extra main &&
( cd victim &&
test_must_fail git rev-parse --verify extra )
'
@@ -88,9 +88,9 @@ test_expect_success 'refuse deleting push with denyDeletes' '
cd victim &&
test_might_fail git branch -D extra &&
git config receive.denyDeletes true &&
- git branch extra master
+ git branch extra main
) &&
- test_must_fail git send-pack ./victim :extra master
+ test_must_fail git send-pack ./victim :extra main
'
test_expect_success 'cannot override denyDeletes with git -c send-pack' '
@@ -98,10 +98,10 @@ test_expect_success 'cannot override denyDeletes with git -c send-pack' '
cd victim &&
test_might_fail git branch -D extra &&
git config receive.denyDeletes true &&
- git branch extra master
+ git branch extra main
) &&
test_must_fail git -c receive.denyDeletes=false \
- send-pack ./victim :extra master
+ send-pack ./victim :extra main
'
test_expect_success 'override denyDeletes with git -c receive-pack' '
@@ -109,11 +109,11 @@ test_expect_success 'override denyDeletes with git -c receive-pack' '
cd victim &&
test_might_fail git branch -D extra &&
git config receive.denyDeletes true &&
- git branch extra master
+ git branch extra main
) &&
git send-pack \
--receive-pack="git -c receive.denyDeletes=false receive-pack" \
- ./victim :extra master
+ ./victim :extra main
'
test_expect_success 'denyNonFastforwards trumps --force' '
@@ -122,9 +122,9 @@ test_expect_success 'denyNonFastforwards trumps --force' '
test_might_fail git branch -D extra &&
git config receive.denyNonFastforwards true
) &&
- victim_orig=$(cd victim && git rev-parse --verify master) &&
- test_must_fail git send-pack --force ./victim master^:master &&
- victim_head=$(cd victim && git rev-parse --verify master) &&
+ victim_orig=$(cd victim && git rev-parse --verify main) &&
+ test_must_fail git send-pack --force ./victim main^:main &&
+ victim_head=$(cd victim && git rev-parse --verify main) &&
test "$victim_orig" = "$victim_head"
'
@@ -209,41 +209,41 @@ rewound_push_setup() {
test_expect_success 'pushing explicit refspecs respects forcing' '
rewound_push_setup &&
- parent_orig=$(cd parent && git rev-parse --verify master) &&
+ parent_orig=$(cd parent && git rev-parse --verify main) &&
(
cd child &&
test_must_fail git send-pack ../parent \
- refs/heads/master:refs/heads/master
+ refs/heads/main:refs/heads/main
) &&
- parent_head=$(cd parent && git rev-parse --verify master) &&
+ parent_head=$(cd parent && git rev-parse --verify main) &&
test "$parent_orig" = "$parent_head" &&
(
cd child &&
git send-pack ../parent \
- +refs/heads/master:refs/heads/master
+ +refs/heads/main:refs/heads/main
) &&
- parent_head=$(cd parent && git rev-parse --verify master) &&
- child_head=$(cd child && git rev-parse --verify master) &&
+ parent_head=$(cd parent && git rev-parse --verify main) &&
+ child_head=$(cd child && git rev-parse --verify main) &&
test "$parent_head" = "$child_head"
'
test_expect_success 'pushing wildcard refspecs respects forcing' '
rewound_push_setup &&
- parent_orig=$(cd parent && git rev-parse --verify master) &&
+ parent_orig=$(cd parent && git rev-parse --verify main) &&
(
cd child &&
test_must_fail git send-pack ../parent \
"refs/heads/*:refs/heads/*"
) &&
- parent_head=$(cd parent && git rev-parse --verify master) &&
+ parent_head=$(cd parent && git rev-parse --verify main) &&
test "$parent_orig" = "$parent_head" &&
(
cd child &&
git send-pack ../parent \
"+refs/heads/*:refs/heads/*"
) &&
- parent_head=$(cd parent && git rev-parse --verify master) &&
- child_head=$(cd child && git rev-parse --verify master) &&
+ parent_head=$(cd parent && git rev-parse --verify main) &&
+ child_head=$(cd child && git rev-parse --verify main) &&
test "$parent_head" = "$child_head"
'
@@ -251,7 +251,7 @@ test_expect_success 'deny pushing to delete current branch' '
rewound_push_setup &&
(
cd child &&
- test_must_fail git send-pack ../parent :refs/heads/master 2>errs
+ test_must_fail git send-pack ../parent :refs/heads/main 2>errs
)
'
@@ -282,9 +282,9 @@ test_expect_success 'receive-pack de-dupes .have lines' '
local=$(git -C fork rev-parse HEAD) &&
shared=$(git -C shared rev-parse only-shared) &&
cat >expect <<-EOF &&
- $local refs/heads/master
+ $local refs/heads/main
$local refs/remotes/origin/HEAD
- $local refs/remotes/origin/master
+ $local refs/remotes/origin/main
$shared .have
EOF
diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index 956d69f5b1..6012cc8172 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -15,11 +15,11 @@ test_expect_success setup '
git update-index a &&
tree1=$(git write-tree) &&
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
- git update-ref refs/heads/master $commit0 &&
+ git update-ref refs/heads/main $commit0 &&
git update-ref refs/heads/tofail $commit1 &&
git clone --bare ./. victim.git &&
GIT_DIR=victim.git git update-ref refs/heads/tofail $commit1 &&
- git update-ref refs/heads/master $commit1 &&
+ git update-ref refs/heads/main $commit1 &&
git update-ref refs/heads/tofail $commit0
'
@@ -38,7 +38,7 @@ echo "$@" >>$GIT_DIR/update.args
read x; printf %s "$x" >$GIT_DIR/update.stdin
echo STDOUT update $1
echo STDERR update $1 >&2
-test "$1" = refs/heads/master || exit
+test "$1" = refs/heads/main || exit
EOF
chmod u+x victim.git/hooks/update
@@ -62,11 +62,11 @@ chmod u+x victim.git/hooks/post-update
test_expect_success push '
test_must_fail git send-pack --force ./victim.git \
- master tofail >send.out 2>send.err
+ main tofail >send.out 2>send.err
'
test_expect_success 'updated as expected' '
- test $(GIT_DIR=victim.git git rev-parse master) = $commit1 &&
+ test $(GIT_DIR=victim.git git rev-parse main) = $commit1 &&
test $(GIT_DIR=victim.git git rev-parse tofail) = $commit1
'
@@ -82,24 +82,24 @@ test_expect_success 'hooks ran' '
'
test_expect_success 'pre-receive hook input' '
- (echo $commit0 $commit1 refs/heads/master &&
+ (echo $commit0 $commit1 refs/heads/main &&
echo $commit1 $commit0 refs/heads/tofail
) | test_cmp - victim.git/pre-receive.stdin
'
test_expect_success 'update hook arguments' '
- (echo refs/heads/master $commit0 $commit1 &&
+ (echo refs/heads/main $commit0 $commit1 &&
echo refs/heads/tofail $commit1 $commit0
) | test_cmp - victim.git/update.args
'
test_expect_success 'post-receive hook input' '
- echo $commit0 $commit1 refs/heads/master |
+ echo $commit0 $commit1 refs/heads/main |
test_cmp - victim.git/post-receive.stdin
'
test_expect_success 'post-update hook arguments' '
- echo refs/heads/master |
+ echo refs/heads/main |
test_cmp - victim.git/post-update.args
'
@@ -120,8 +120,8 @@ test_expect_success 'send-pack produced no output' '
cat <<EOF >expect
remote: STDOUT pre-receive
remote: STDERR pre-receive
-remote: STDOUT update refs/heads/master
-remote: STDERR update refs/heads/master
+remote: STDOUT update refs/heads/main
+remote: STDERR update refs/heads/main
remote: STDOUT update refs/heads/tofail
remote: STDERR update refs/heads/tofail
remote: error: hook declined to update refs/heads/tofail
@@ -143,7 +143,7 @@ test_expect_success 'pre-receive hook that forgets to read its input' '
for v in $(test_seq 100 999)
do
- git branch branch_$v master || return
+ git branch branch_$v main || return
done &&
git push ./victim.git "+refs/heads/*:refs/heads/*"
'
diff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh
index 6eb2ffd6ec..93d8a556a9 100755
--- a/t/t5402-post-merge-hook.sh
+++ b/t/t5402-post-merge-hook.sh
@@ -15,7 +15,7 @@ test_expect_success setup '
git update-index a &&
tree1=$(git write-tree) &&
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
- git update-ref refs/heads/master $commit0 &&
+ git update-ref refs/heads/main $commit0 &&
git clone ./. clone1 &&
GIT_DIR=clone1/.git git update-index --add a &&
git clone ./. clone2 &&
diff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh
index a39b3b5c78..867dec8862 100755
--- a/t/t5403-post-checkout-hook.sh
+++ b/t/t5403-post-checkout-hook.sh
@@ -20,7 +20,7 @@ test_expect_success setup '
test_expect_success 'post-checkout receives the right arguments with HEAD unchanged ' '
test_when_finished "rm -f .git/post-checkout.args" &&
- git checkout master &&
+ git checkout main &&
read old new flag <.git/post-checkout.args &&
test $old = $new && test $flag = 1
'
@@ -41,14 +41,14 @@ test_expect_success 'post-checkout receives the right args with HEAD changed ' '
test_expect_success 'post-checkout receives the right args when not switching branches ' '
test_when_finished "rm -f .git/post-checkout.args" &&
- git checkout master -- three.t &&
+ git checkout main -- three.t &&
read old new flag <.git/post-checkout.args &&
test $old = $new && test $flag = 0
'
test_expect_success 'post-checkout is triggered on rebase' '
test_when_finished "rm -f .git/post-checkout.args" &&
- git checkout -b rebase-test master &&
+ git checkout -b rebase-test main &&
rm -f .git/post-checkout.args &&
git rebase rebase-on-me &&
read old new flag <.git/post-checkout.args &&
diff --git a/t/t5404-tracking-branches.sh b/t/t5404-tracking-branches.sh
index 2762f420bc..83751e68d0 100755
--- a/t/t5404-tracking-branches.sh
+++ b/t/t5404-tracking-branches.sh
@@ -30,9 +30,9 @@ test_expect_success 'prepare pushable branches' '
git checkout -b b2 origin/b2 &&
echo aa-b2 >>file &&
git commit -a -m aa-b2 &&
- git checkout master &&
- echo aa-master >>file &&
- git commit -a -m aa-master
+ git checkout main &&
+ echo aa-main >>file &&
+ git commit -a -m aa-main
'
test_expect_success 'mixed-success push returns error' '
@@ -40,7 +40,7 @@ test_expect_success 'mixed-success push returns error' '
'
test_expect_success 'check tracking branches updated correctly after push' '
- test "$(git rev-parse origin/master)" = "$(git rev-parse master)"
+ test "$(git rev-parse origin/main)" = "$(git rev-parse main)"
'
test_expect_success 'check tracking branches not updated for failed refs' '
diff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh
index 235fb7686a..8792e74682 100755
--- a/t/t5405-send-pack-rewind.sh
+++ b/t/t5405-send-pack-rewind.sh
@@ -13,7 +13,7 @@ test_expect_success setup '
mkdir another && (
cd another &&
git init &&
- git fetch --update-head-ok .. master:master
+ git fetch --update-head-ok .. main:main
) &&
>file2 && git add file2 && test_tick &&
@@ -25,7 +25,7 @@ test_expect_success 'non forced push should die not segfault' '
(
cd another &&
- test_must_fail git push .. master:master
+ test_must_fail git push .. main:main
)
'
@@ -34,7 +34,7 @@ test_expect_success 'forced push should succeed' '
(
cd another &&
- git push .. +master:master
+ git push .. +main:main
)
'
diff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh
index 80750a817e..27bc159acf 100755
--- a/t/t5407-post-rewrite-hook.sh
+++ b/t/t5407-post-rewrite-hook.sh
@@ -14,7 +14,7 @@ test_expect_success 'setup' '
git checkout A^0 &&
test_commit E bar E &&
test_commit F foo F &&
- git checkout master
+ git checkout main
'
mkdir .git/hooks
diff --git a/t/t5410-receive-pack-alternates.sh b/t/t5410-receive-pack-alternates.sh
index f00d0da860..cb6fffe611 100755
--- a/t/t5410-receive-pack-alternates.sh
+++ b/t/t5410-receive-pack-alternates.sh
@@ -7,9 +7,9 @@ test_description='git receive-pack with alternate ref filtering'
test_expect_success 'setup' '
test_commit base &&
git clone -s --bare . fork &&
- git checkout -b public/branch master &&
+ git checkout -b public/branch main &&
test_commit public &&
- git checkout -b private/branch master &&
+ git checkout -b private/branch main &&
test_commit private
'
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 8c54e34ef1..5dbedf70eb 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -407,14 +407,14 @@ test_expect_success 'in_vain resetted upon ACK' '
rm -rf myserver myclient &&
git init myserver &&
- # Linked list of commits on master. The first is common; the rest are
+ # Linked list of commits on main. The first is common; the rest are
# not.
- test_commit -C myserver first_master_commit &&
+ test_commit -C myserver first_main_commit &&
git clone "file://$(pwd)/myserver" myclient &&
test_commit_bulk -C myclient 255 &&
# Another linked list of commits on anotherbranch with no connection to
- # master. The first is common; the rest are not.
+ # main. The first is common; the rest are not.
git -C myserver checkout --orphan anotherbranch &&
test_commit -C myserver first_anotherbranch_commit &&
git -C myclient fetch origin anotherbranch:refs/heads/anotherbranch &&
@@ -422,14 +422,14 @@ test_expect_success 'in_vain resetted upon ACK' '
test_commit_bulk -C myclient 255 &&
# The new commit that the client wants to fetch.
- git -C myserver checkout master &&
+ git -C myserver checkout main &&
test_commit -C myserver to_fetch &&
# The client will send (as "have"s) all 256 commits in anotherbranch
# first. The 256th commit is common between the client and the server,
# and should reset in_vain. This allows negotiation to continue until
# the client reports that first_anotherbranch_commit is common.
- git -C myclient fetch --progress origin master 2>log &&
+ git -C myclient fetch --progress origin main 2>log &&
test_i18ngrep "Total 3 " log
'
@@ -637,7 +637,7 @@ test_expect_success 'shallow fetch with tags does not break the repository' '
mkdir repo2 &&
cd repo2 &&
git init &&
- git fetch --depth=2 ../.git master:branch &&
+ git fetch --depth=2 ../.git main:branch &&
git fsck
)
'
@@ -662,7 +662,7 @@ test_expect_success 'fetch-pack can fetch a raw sha1 that is advertised as a ref
git init client &&
git -C client fetch-pack ../server \
- $(git -C server rev-parse refs/heads/master)
+ $(git -C server rev-parse refs/heads/main)
'
test_expect_success 'fetch-pack can fetch a raw sha1 overlapping a named ref' '
@@ -688,7 +688,7 @@ test_expect_success 'fetch-pack cannot fetch a raw sha1 that is not advertised a
# Some protocol versions (e.g. 2) support fetching
# unadvertised objects, so restrict this test to v0.
test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C client fetch-pack ../server \
- $(git -C server rev-parse refs/heads/master^) 2>err &&
+ $(git -C server rev-parse refs/heads/main^) 2>err &&
test_i18ngrep "Server does not allow request for unadvertised object" err
'
@@ -822,7 +822,7 @@ test_expect_success 'clone shallow since ...' '
test_expect_success 'fetch shallow since ...' '
git -C shallow11 fetch --shallow-since "200000000 +0700" origin &&
- git -C shallow11 log --pretty=tformat:%s origin/master >actual &&
+ git -C shallow11 log --pretty=tformat:%s origin/main >actual &&
cat >expected <<-\EOF &&
three
two
@@ -863,7 +863,7 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '
(
cd shallow-since-graph &&
test_commit base &&
- test_commit master &&
+ test_commit main &&
git checkout -b other HEAD^ &&
test_commit other &&
git commit-graph write --reachable &&
@@ -873,7 +873,7 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '
0012command=fetch
00010013deepen-since 1
0032want $(git rev-parse other)
- 0032have $(git rev-parse master)
+ 0032have $(git rev-parse main)
0000
EOF
)
@@ -895,7 +895,7 @@ test_expect_success 'shallow clone exclude tag two' '
test_expect_success 'fetch exclude tag one' '
git -C shallow12 fetch --shallow-exclude one origin &&
- git -C shallow12 log --pretty=tformat:%s origin/master >actual &&
+ git -C shallow12 log --pretty=tformat:%s origin/main >actual &&
test_write_lines three two >expected &&
test_cmp expected actual
'
@@ -909,11 +909,11 @@ test_expect_success 'fetching deepen' '
test_commit three &&
git clone --depth 1 "file://$(pwd)/." deepen &&
test_commit four &&
- git -C deepen log --pretty=tformat:%s master >actual &&
+ git -C deepen log --pretty=tformat:%s main >actual &&
echo three >expected &&
test_cmp expected actual &&
git -C deepen fetch --deepen=1 &&
- git -C deepen log --pretty=tformat:%s origin/master >actual &&
+ git -C deepen log --pretty=tformat:%s origin/main >actual &&
cat >expected <<-\EOF &&
four
three
diff --git a/t/t5501-fetch-push-alternates.sh b/t/t5501-fetch-push-alternates.sh
index 1bc57ac03f..0054163ce4 100755
--- a/t/t5501-fetch-push-alternates.sh
+++ b/t/t5501-fetch-push-alternates.sh
@@ -45,7 +45,7 @@ test_expect_success setup '
test_expect_success 'pushing into a repository with the same alternate' '
(
cd one &&
- git push ../receiver master:refs/heads/it
+ git push ../receiver main:refs/heads/it
) &&
(
cd receiver &&
@@ -57,7 +57,7 @@ test_expect_success 'pushing into a repository with the same alternate' '
test_expect_success 'fetching from a repository with the same alternate' '
(
cd fetcher &&
- git fetch ../one master:refs/heads/it &&
+ git fetch ../one main:refs/heads/it &&
count_objects >../fetcher.count
) &&
test_cmp one.count fetcher.count
diff --git a/t/t5502-quickfetch.sh b/t/t5502-quickfetch.sh
index 7a46cbdbe6..b163787a05 100755
--- a/t/t5502-quickfetch.sh
+++ b/t/t5502-quickfetch.sh
@@ -108,14 +108,14 @@ test_expect_success 'quickfetch should not copy from alternate' '
q
}"
) ) &&
- origin_master=$( (
+ origin_main=$( (
cd quickclone &&
- git rev-parse origin/master
+ git rev-parse origin/main
) ) &&
echo "loose objects: $obj_cnt, packfiles: $pck_cnt" &&
test $obj_cnt -eq 0 &&
test $pck_cnt -eq 0 &&
- test z$origin_master = z$(git rev-parse master)
+ test z$origin_main = z$(git rev-parse main)
'
diff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh
index 6041a4dd32..173fd08983 100755
--- a/t/t5503-tagfollow.sh
+++ b/t/t5503-tagfollow.sh
@@ -11,7 +11,7 @@ test_description='test automatic tag following'
# L - A ------ O ------ B
# \ \ \
# \ C - origin/cat \
-# origin/master master
+# origin/main main
test_expect_success setup '
test_tick &&
@@ -57,7 +57,7 @@ test_expect_success 'fetch A (new commit : 1 connection)' '
(
cd cloned &&
GIT_TRACE_PACKET=$UPATH git fetch &&
- test $A = $(git rev-parse --verify origin/master)
+ test $A = $(git rev-parse --verify origin/main)
) &&
get_needs $U >actual &&
test_cmp expect actual
@@ -72,7 +72,7 @@ test_expect_success "create tag T on A, create C on branch cat" '
git add file &&
git commit -m C &&
C=$(git rev-parse --verify HEAD) &&
- git checkout master
+ git checkout main
'
test_expect_success 'setup expect' '
@@ -123,7 +123,7 @@ test_expect_success 'fetch B, S (commit and tag : 1 connection)' '
(
cd cloned &&
GIT_TRACE_PACKET=$UPATH git fetch &&
- test $B = $(git rev-parse --verify origin/master) &&
+ test $B = $(git rev-parse --verify origin/main) &&
test $B = $(git rev-parse --verify tag2^0) &&
test $S = $(git rev-parse --verify tag2)
) &&
@@ -138,7 +138,7 @@ want $S
EOF
'
-test_expect_success 'new clone fetch master and tags' '
+test_expect_success 'new clone fetch main and tags' '
test_might_fail git branch -D cat &&
rm -f $U &&
(
@@ -147,7 +147,7 @@ test_expect_success 'new clone fetch master and tags' '
git init &&
git remote add origin .. &&
GIT_TRACE_PACKET=$UPATH git fetch &&
- test $B = $(git rev-parse --verify origin/master) &&
+ test $B = $(git rev-parse --verify origin/main) &&
test $S = $(git rev-parse --verify tag2) &&
test $B = $(git rev-parse --verify tag2^0) &&
test $T = $(git rev-parse --verify tag1) &&
diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh
index a32efe2b6c..7eeb46734e 100755
--- a/t/t5504-fetch-receive-strict.sh
+++ b/t/t5504-fetch-receive-strict.sh
@@ -26,7 +26,7 @@ test_expect_success 'fetch without strict' '
cd dst &&
git config fetch.fsckobjects false &&
git config transfer.fsckobjects false &&
- test_must_fail git fetch ../.git master
+ test_must_fail git fetch ../.git main
)
'
@@ -37,7 +37,7 @@ test_expect_success 'fetch with !fetch.fsckobjects' '
cd dst &&
git config fetch.fsckobjects false &&
git config transfer.fsckobjects true &&
- test_must_fail git fetch ../.git master
+ test_must_fail git fetch ../.git main
)
'
@@ -48,7 +48,7 @@ test_expect_success 'fetch with fetch.fsckobjects' '
cd dst &&
git config fetch.fsckobjects true &&
git config transfer.fsckobjects false &&
- test_must_fail git fetch ../.git master
+ test_must_fail git fetch ../.git main
)
'
@@ -58,13 +58,13 @@ test_expect_success 'fetch with transfer.fsckobjects' '
(
cd dst &&
git config transfer.fsckobjects true &&
- test_must_fail git fetch ../.git master
+ test_must_fail git fetch ../.git main
)
'
cat >exp <<EOF
To dst
-! refs/heads/master:refs/heads/test [remote rejected] (missing necessary objects)
+! refs/heads/main:refs/heads/test [remote rejected] (missing necessary objects)
Done
EOF
@@ -76,7 +76,7 @@ test_expect_success 'push without strict' '
git config fetch.fsckobjects false &&
git config transfer.fsckobjects false
) &&
- test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+ test_must_fail git push --porcelain dst main:refs/heads/test >act &&
test_cmp exp act
'
@@ -88,13 +88,13 @@ test_expect_success 'push with !receive.fsckobjects' '
git config receive.fsckobjects false &&
git config transfer.fsckobjects true
) &&
- test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+ test_must_fail git push --porcelain dst main:refs/heads/test >act &&
test_cmp exp act
'
cat >exp <<EOF
To dst
-! refs/heads/master:refs/heads/test [remote rejected] (unpacker error)
+! refs/heads/main:refs/heads/test [remote rejected] (unpacker error)
EOF
test_expect_success 'push with receive.fsckobjects' '
@@ -105,7 +105,7 @@ test_expect_success 'push with receive.fsckobjects' '
git config receive.fsckobjects true &&
git config transfer.fsckobjects false
) &&
- test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+ test_must_fail git push --porcelain dst main:refs/heads/test >act &&
test_cmp exp act
'
@@ -116,7 +116,7 @@ test_expect_success 'push with transfer.fsckobjects' '
cd dst &&
git config transfer.fsckobjects true
) &&
- test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+ test_must_fail git push --porcelain dst main:refs/heads/test >act &&
test_cmp exp act
'
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index dda81b7d07..34a1e8cdef 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -17,7 +17,7 @@ setup_repository () {
git add elif &&
test_tick &&
git commit -m "Second" &&
- git checkout master
+ git checkout main
)
}
@@ -60,8 +60,8 @@ test_expect_success C_LOCALE_OUTPUT 'remote information for the origin' '
(
cd test &&
tokens_match origin "$(git remote)" &&
- check_remote_track origin master side &&
- check_tracking_branch origin HEAD master side
+ check_remote_track origin main side &&
+ check_tracking_branch origin HEAD main side
)
'
@@ -70,7 +70,7 @@ test_expect_success 'add another remote' '
cd test &&
git remote add -f second ../two &&
tokens_match "origin second" "$(git remote)" &&
- check_tracking_branch second master side another &&
+ check_tracking_branch second main side another &&
git for-each-ref "--format=%(refname)" refs/remotes |
sed -e "/^refs\/remotes\/origin\//d" \
-e "/^refs\/remotes\/second\//d" >actual &&
@@ -81,8 +81,8 @@ test_expect_success 'add another remote' '
test_expect_success C_LOCALE_OUTPUT 'check remote-tracking' '
(
cd test &&
- check_remote_track origin master side &&
- check_remote_track second master side another
+ check_remote_track origin main side &&
+ check_remote_track second main side another
)
'
@@ -99,7 +99,7 @@ test_expect_success 'remote forces tracking branches' '
test_expect_success 'remove remote' '
(
cd test &&
- git symbolic-ref refs/remotes/second/HEAD refs/remotes/second/master &&
+ git symbolic-ref refs/remotes/second/HEAD refs/remotes/second/main &&
git remote rm second
)
'
@@ -108,7 +108,7 @@ test_expect_success C_LOCALE_OUTPUT 'remove remote' '
(
cd test &&
tokens_match origin "$(git remote)" &&
- check_remote_track origin master side &&
+ check_remote_track origin main side &&
git for-each-ref "--format=%(refname)" refs/remotes |
sed -e "/^refs\/remotes\/origin\//d" >actual &&
test_must_be_empty actual
@@ -121,13 +121,13 @@ test_expect_success 'remove remote protects local branches' '
cat >expect1 <<-\EOF &&
Note: A branch outside the refs/remotes/ hierarchy was not removed;
to delete it, use:
- git branch -d master
+ git branch -d main
EOF
cat >expect2 <<-\EOF &&
Note: Some branches outside the refs/remotes/ hierarchy were not removed;
to delete them, use:
git branch -d foobranch
- git branch -d master
+ git branch -d main
EOF
git tag footag &&
git config --add remote.oops.fetch "+refs/*:refs/*" &&
@@ -153,7 +153,7 @@ test_expect_success 'remove errors out early when deleting non-existent branch'
test_expect_success 'remove remote with a branch without configured merge' '
test_when_finished "(
- git -C test checkout master;
+ git -C test checkout main;
git -C test branch -D two;
git -C test config --remove-section remote.two;
git -C test config --remove-section branch.second;
@@ -163,9 +163,9 @@ test_expect_success 'remove remote with a branch without configured merge' '
cd test &&
git remote add two ../two &&
git fetch two &&
- git checkout -b second two/master^0 &&
+ git checkout -b second two/main^0 &&
git config branch.second.remote two &&
- git checkout master &&
+ git checkout main &&
git remote rm two
)
'
@@ -198,42 +198,42 @@ cat >test/expect <<EOF
* remote origin
Fetch URL: $(pwd)/one
Push URL: $(pwd)/one
- HEAD branch: master
+ HEAD branch: main
Remote branches:
- master new (next fetch will store in remotes/origin)
+ main new (next fetch will store in remotes/origin)
side tracked
Local branches configured for 'git pull':
- ahead merges with remote master
- master merges with remote master
+ ahead merges with remote main
+ main merges with remote main
octopus merges with remote topic-a
and with remote topic-b
and with remote topic-c
- rebase rebases onto remote master
+ rebase rebases onto remote main
Local refs configured for 'git push':
- master pushes to master (local out of date)
- master pushes to upstream (create)
+ main pushes to main (local out of date)
+ main pushes to upstream (create)
* remote two
Fetch URL: ../two
Push URL: ../three
- HEAD branch: master
+ HEAD branch: main
Local refs configured for 'git push':
- ahead forces to master (fast-forwardable)
- master pushes to another (up to date)
+ ahead forces to main (fast-forwardable)
+ main pushes to another (up to date)
EOF
test_expect_success 'show' '
(
cd test &&
- git config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&
+ git config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&
git fetch &&
- git checkout -b ahead origin/master &&
+ git checkout -b ahead origin/main &&
echo 1 >>file &&
test_tick &&
git commit -m update file &&
- git checkout master &&
- git branch --track octopus origin/master &&
- git branch --track rebase origin/master &&
- git branch -d -r origin/master &&
+ git checkout main &&
+ git branch --track octopus origin/main &&
+ git branch --track rebase origin/main &&
+ git branch -d -r origin/main &&
git config --add remote.two.url ../two &&
git config --add remote.two.pushurl ../three &&
git config branch.rebase.rebase true &&
@@ -245,10 +245,10 @@ test_expect_success 'show' '
git commit -m update file
) &&
git config --add remote.origin.push : &&
- git config --add remote.origin.push refs/heads/master:refs/heads/upstream &&
+ git config --add remote.origin.push refs/heads/main:refs/heads/upstream &&
git config --add remote.origin.push +refs/tags/lastbackup &&
- git config --add remote.two.push +refs/heads/ahead:refs/heads/master &&
- git config --add remote.two.push refs/heads/master:refs/heads/another &&
+ git config --add remote.two.push +refs/heads/ahead:refs/heads/main &&
+ git config --add remote.two.push refs/heads/main:refs/heads/another &&
git remote show origin two >output &&
git branch -d rebase octopus &&
test_i18ncmp expect output
@@ -261,14 +261,14 @@ cat >test/expect <<EOF
Push URL: $(pwd)/one
HEAD branch: (not queried)
Remote branches: (status not queried)
- master
+ main
side
Local branches configured for 'git pull':
- ahead merges with remote master
- master merges with remote master
+ ahead merges with remote main
+ main merges with remote main
Local refs configured for 'git push' (status not queried):
(matching) pushes to (matching)
- refs/heads/master pushes to refs/heads/upstream
+ refs/heads/main pushes to refs/heads/upstream
refs/tags/lastbackup forces to refs/tags/lastbackup
EOF
@@ -309,7 +309,7 @@ test_expect_success 'set-head --auto' '
(
cd test &&
git remote set-head --auto origin &&
- echo refs/remotes/origin/master >expect &&
+ echo refs/remotes/origin/main >expect &&
git symbolic-ref refs/remotes/origin/HEAD >output &&
test_cmp expect output
)
@@ -320,7 +320,7 @@ test_expect_success 'set-head --auto has no problem w/multiple HEADs' '
cd test &&
git fetch two "refs/heads/*:refs/remotes/two/*" &&
git remote set-head --auto two >output 2>&1 &&
- echo "two/HEAD set to master" >expect &&
+ echo "two/HEAD set to main" >expect &&
test_i18ncmp expect output
)
'
@@ -334,7 +334,7 @@ test_expect_success 'set-head explicit' '
cd test &&
git remote set-head origin side2 &&
git symbolic-ref refs/remotes/origin/HEAD >output &&
- git remote set-head origin master &&
+ git remote set-head origin main &&
test_cmp expect output
)
'
@@ -397,7 +397,7 @@ test_expect_success 'fetch mirrors act as mirrors during fetch' '
(
cd mirror-fetch/parent &&
git branch new &&
- git branch -m master renamed
+ git branch -m main renamed
) &&
(
cd mirror-fetch/child &&
@@ -411,7 +411,7 @@ test_expect_success 'fetch mirrors can prune' '
(
cd mirror-fetch/child &&
git remote prune parent &&
- test_must_fail git rev-parse --verify refs/heads/master
+ test_must_fail git rev-parse --verify refs/heads/main
)
'
@@ -464,14 +464,14 @@ test_expect_success 'push mirrors act as mirrors during push' '
(
cd mirror-push/private &&
git branch new &&
- git branch -m master renamed &&
+ git branch -m main renamed &&
git push public
) &&
(
cd mirror-push/private &&
git rev-parse --verify refs/heads/new &&
git rev-parse --verify refs/heads/renamed &&
- test_must_fail git rev-parse --verify refs/heads/master
+ test_must_fail git rev-parse --verify refs/heads/main
)
'
@@ -597,10 +597,10 @@ test_expect_success 'reject --no-no-tags' '
'
cat >one/expect <<\EOF
- apis/master
+ apis/main
apis/side
drosophila/another
- drosophila/master
+ drosophila/main
drosophila/side
EOF
@@ -617,11 +617,11 @@ test_expect_success 'update' '
cat >one/expect <<\EOF
drosophila/another
- drosophila/master
+ drosophila/main
drosophila/side
- manduca/master
+ manduca/main
manduca/side
- megaloprepus/master
+ megaloprepus/main
megaloprepus/side
EOF
@@ -660,11 +660,11 @@ test_expect_success 'update --prune' '
'
cat >one/expect <<-\EOF
- apis/master
+ apis/main
apis/side
- manduca/master
+ manduca/main
manduca/side
- megaloprepus/master
+ megaloprepus/main
megaloprepus/side
EOF
@@ -684,7 +684,7 @@ test_expect_success 'update default' '
cat >one/expect <<\EOF
drosophila/another
- drosophila/master
+ drosophila/main
drosophila/side
EOF
@@ -738,14 +738,14 @@ test_expect_success 'rename a remote' '
git clone one four &&
(
cd four &&
- git config branch.master.pushRemote origin &&
+ git config branch.main.pushRemote origin &&
git remote rename origin upstream &&
test -z "$(git for-each-ref refs/remotes/origin)" &&
- test "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/master" &&
- test "$(git rev-parse upstream/master)" = "$(git rev-parse master)" &&
+ test "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/main" &&
+ test "$(git rev-parse upstream/main)" = "$(git rev-parse main)" &&
test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*" &&
- test "$(git config branch.master.remote)" = "upstream" &&
- test "$(git config branch.master.pushRemote)" = "upstream" &&
+ test "$(git config branch.main.remote)" = "upstream" &&
+ test "$(git config branch.main.pushRemote)" = "upstream" &&
test "$(git config --global remote.pushDefault)" = "origin"
)
'
@@ -791,7 +791,7 @@ test_expect_success 'rename does not update a non-default fetch refspec' '
git config remote.origin.fetch +refs/heads/*:refs/heads/origin/* &&
git remote rename origin upstream &&
test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/heads/origin/*" &&
- git rev-parse -q origin/master
+ git rev-parse -q origin/main
)
'
@@ -811,7 +811,7 @@ test_expect_success 'rename a remote with name prefix of other remote' '
cd four.three &&
git remote add o git://example.com/repo.git &&
git remote rename o upstream &&
- test "$(git rev-parse origin/master)" = "$(git rev-parse master)"
+ test "$(git rev-parse origin/main)" = "$(git rev-parse main)"
)
'
@@ -827,11 +827,11 @@ test_expect_success 'remove a remote' '
git clone one four.five &&
(
cd four.five &&
- git config branch.master.pushRemote origin &&
+ git config branch.main.pushRemote origin &&
git remote remove origin &&
test -z "$(git for-each-ref refs/remotes/origin)" &&
- test_must_fail git config branch.master.remote &&
- test_must_fail git config branch.master.pushRemote &&
+ test_must_fail git config branch.main.remote &&
+ test_must_fail git config branch.main.pushRemote &&
test "$(git config --global remote.pushDefault)" = "origin"
)
'
@@ -872,9 +872,9 @@ test_expect_success 'remove a remote removes repo remote.pushDefault but keeps g
cat >remotes_origin <<EOF
URL: $(pwd)/one
-Push: refs/heads/master:refs/heads/upstream
+Push: refs/heads/main:refs/heads/upstream
Push: refs/heads/next:refs/heads/upstream2
-Pull: refs/heads/master:refs/heads/origin
+Pull: refs/heads/main:refs/heads/origin
Pull: refs/heads/next:refs/heads/origin2
EOF
@@ -890,11 +890,11 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '
test_path_is_missing .git/remotes/origin &&
test "$(git config remote.origin.url)" = "$origin_url" &&
cat >push_expected <<-\EOF &&
- refs/heads/master:refs/heads/upstream
+ refs/heads/main:refs/heads/upstream
refs/heads/next:refs/heads/upstream2
EOF
cat >fetch_expected <<-\EOF &&
- refs/heads/master:refs/heads/origin
+ refs/heads/main:refs/heads/origin
refs/heads/next:refs/heads/origin2
EOF
git config --get-all remote.origin.push >push_actual &&
@@ -914,8 +914,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
git remote rename origin origin &&
test_path_is_missing .git/branches/origin &&
test "$(git config remote.origin.url)" = "$origin_url" &&
- test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin" &&
- test "$(git config remote.origin.push)" = "HEAD:refs/heads/master"
+ test "$(git config remote.origin.fetch)" = "refs/heads/main:refs/heads/origin" &&
+ test "$(git config remote.origin.push)" = "HEAD:refs/heads/main"
)
'
@@ -938,7 +938,7 @@ test_expect_success 'remote prune to cause a dangling symref' '
(
cd one &&
git checkout side2 &&
- git branch -D master
+ git branch -D main
) &&
(
cd eight &&
@@ -981,22 +981,22 @@ test_expect_success 'remote set-branches' '
EOF
sort <<-\EOF >expect.replace &&
+refs/heads/maint:refs/remotes/scratch/maint
- +refs/heads/master:refs/remotes/scratch/master
+ +refs/heads/main:refs/remotes/scratch/main
+refs/heads/next:refs/remotes/scratch/next
EOF
sort <<-\EOF >expect.add-two &&
+refs/heads/maint:refs/remotes/scratch/maint
- +refs/heads/master:refs/remotes/scratch/master
+ +refs/heads/main:refs/remotes/scratch/main
+refs/heads/next:refs/remotes/scratch/next
+refs/heads/pu:refs/remotes/scratch/pu
+refs/heads/t/topic:refs/remotes/scratch/t/topic
EOF
sort <<-\EOF >expect.setup-ffonly &&
- refs/heads/master:refs/remotes/scratch/master
+ refs/heads/main:refs/remotes/scratch/main
+refs/heads/next:refs/remotes/scratch/next
EOF
sort <<-\EOF >expect.respect-ffonly &&
- refs/heads/master:refs/remotes/scratch/master
+ refs/heads/main:refs/remotes/scratch/main
+refs/heads/next:refs/remotes/scratch/next
+refs/heads/pu:refs/remotes/scratch/pu
EOF
@@ -1012,7 +1012,7 @@ test_expect_success 'remote set-branches' '
git config --get-all remote.scratch.fetch >config-result &&
sort <config-result >../actual.add &&
- git remote set-branches scratch maint master next &&
+ git remote set-branches scratch maint main next &&
git config --get-all remote.scratch.fetch >config-result &&
sort <config-result >../actual.replace &&
@@ -1022,7 +1022,7 @@ test_expect_success 'remote set-branches' '
git config --unset-all remote.scratch.fetch &&
git config remote.scratch.fetch \
- refs/heads/master:refs/remotes/scratch/master &&
+ refs/heads/main:refs/remotes/scratch/main &&
git config --add remote.scratch.fetch \
+refs/heads/next:refs/remotes/scratch/next &&
git config --get-all remote.scratch.fetch >config-result &&
@@ -1042,14 +1042,14 @@ test_expect_success 'remote set-branches' '
test_expect_success 'remote set-branches with --mirror' '
echo "+refs/*:refs/*" >expect.initial &&
- echo "+refs/heads/master:refs/heads/master" >expect.replace &&
+ echo "+refs/heads/main:refs/heads/main" >expect.replace &&
git clone --mirror .git/ setbranches-mirror &&
(
cd setbranches-mirror &&
git remote rename origin scratch &&
git config --get-all remote.scratch.fetch >../actual.initial &&
- git remote set-branches scratch heads/master &&
+ git remote set-branches scratch heads/main &&
git config --get-all remote.scratch.fetch >../actual.replace
) &&
test_cmp expect.initial actual.initial &&
@@ -1295,7 +1295,7 @@ test_extra_arg () {
test_extra_arg add nick url
test_extra_arg rename origin newname
test_extra_arg remove origin
-test_extra_arg set-head origin master
+test_extra_arg set-head origin main
# set-branches takes any number of args
test_extra_arg get-url origin newurl
test_extra_arg set-url origin newurl oldurl
@@ -1312,7 +1312,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '
test_when_finished "(cd test && git tag -d some-tag)" &&
(
cd test &&
- git tag -a -m "Some tag" some-tag master &&
+ git tag -a -m "Some tag" some-tag main &&
exit_with=true &&
for type in commit tag tree blob
do
@@ -1338,7 +1338,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '
test_expect_success 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '
(
cd two &&
- git tag -a -m "Some tag" my-tag master &&
+ git tag -a -m "Some tag" my-tag main &&
git update-ref refs/trees/my-head-tree HEAD^{tree} &&
git update-ref refs/blobs/my-file-blob HEAD:file
) &&
diff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh
index 83d5558c0e..f2df3944e0 100755
--- a/t/t5506-remote-groups.sh
+++ b/t/t5506-remote-groups.sh
@@ -31,8 +31,8 @@ repo_fetched() {
test_expect_success 'setup' '
mkdir one && (cd one && git init) &&
mkdir two && (cd two && git init) &&
- git remote add -m master one one &&
- git remote add -m master two two
+ git remote add -m main one one &&
+ git remote add -m main two two
'
test_expect_success 'no group updates all' '
diff --git a/t/t5509-fetch-push-namespaces.sh b/t/t5509-fetch-push-namespaces.sh
index a67f792adf..ad4a3f5c6e 100755
--- a/t/t5509-fetch-push-namespaces.sh
+++ b/t/t5509-fetch-push-namespaces.sh
@@ -27,9 +27,9 @@ test_expect_success setup '
test_expect_success 'pushing into a repository using a ref namespace' '
(
cd original &&
- git push pushee-namespaced master &&
+ git push pushee-namespaced main &&
git ls-remote pushee-namespaced >actual &&
- printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit1\trefs/heads/main\n" >expected &&
test_cmp expected actual &&
git push pushee-namespaced --tags &&
git ls-remote pushee-namespaced >actual &&
@@ -56,7 +56,7 @@ test_expect_success 'pulling from a repository using a ref namespace' '
cd puller &&
git remote add -f pushee-namespaced "ext::git --namespace=namespace %s ../pushee" &&
git for-each-ref refs/ >actual &&
- printf "$commit1 commit\trefs/remotes/pushee-namespaced/master\n" >expected &&
+ printf "$commit1 commit\trefs/remotes/pushee-namespaced/main\n" >expected &&
printf "$commit0 commit\trefs/tags/0\n" >>expected &&
printf "$commit1 commit\trefs/tags/1\n" >>expected &&
test_cmp expected actual
@@ -76,7 +76,7 @@ test_expect_success 'mirroring a repository using a ref namespace' '
(
cd mirror &&
git for-each-ref refs/ >actual &&
- printf "$commit1 commit\trefs/namespaces/namespace/refs/heads/master\n" >expected &&
+ printf "$commit1 commit\trefs/namespaces/namespace/refs/heads/main\n" >expected &&
printf "$commit0 commit\trefs/namespaces/namespace/refs/tags/0\n" >>expected &&
printf "$commit1 commit\trefs/namespaces/namespace/refs/tags/1\n" >>expected &&
test_cmp expected actual
@@ -87,7 +87,7 @@ test_expect_success 'hide namespaced refs with transfer.hideRefs' '
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs=refs/tags \
ls-remote "ext::git %s ." >actual &&
- printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit1\trefs/heads/main\n" >expected &&
test_cmp expected actual
'
@@ -95,7 +95,7 @@ test_expect_success 'check that transfer.hideRefs does not match unstripped refs
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs=refs/namespaces/namespace/refs/tags \
ls-remote "ext::git %s ." >actual &&
- printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit1\trefs/heads/main\n" >expected &&
printf "$commit0\trefs/tags/0\n" >>expected &&
printf "$commit1\trefs/tags/1\n" >>expected &&
test_cmp expected actual
@@ -105,23 +105,23 @@ test_expect_success 'hide full refs with transfer.hideRefs' '
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs="^refs/namespaces/namespace/refs/tags" \
ls-remote "ext::git %s ." >actual &&
- printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit1\trefs/heads/main\n" >expected &&
test_cmp expected actual
'
test_expect_success 'try to update a hidden ref' '
- test_config -C pushee transfer.hideRefs refs/heads/master &&
- test_must_fail git -C original push pushee-namespaced master
+ test_config -C pushee transfer.hideRefs refs/heads/main &&
+ test_must_fail git -C original push pushee-namespaced main
'
test_expect_success 'try to update a ref that is not hidden' '
- test_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/master &&
- git -C original push pushee-namespaced master
+ test_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/main &&
+ git -C original push pushee-namespaced main
'
test_expect_success 'try to update a hidden full ref' '
- test_config -C pushee transfer.hideRefs "^refs/namespaces/namespace/refs/heads/master" &&
- test_must_fail git -C original push pushee-namespaced master
+ test_config -C pushee transfer.hideRefs "^refs/namespaces/namespace/refs/heads/main" &&
+ test_must_fail git -C original push pushee-namespaced main
'
test_expect_success 'set up ambiguous HEAD' '
@@ -157,9 +157,9 @@ test_expect_success 'denyCurrentBranch and unborn branch with ref namespace' '
cd original &&
git init unborn &&
git remote add unborn-namespaced "ext::git --namespace=namespace %s unborn" &&
- test_must_fail git push unborn-namespaced HEAD:master &&
+ test_must_fail git push unborn-namespaced HEAD:main &&
git -C unborn config receive.denyCurrentBranch updateInstead &&
- git push unborn-namespaced HEAD:master
+ git push unborn-namespaced HEAD:main
)
'
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index a66dbe0bde..fd72962646 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -37,19 +37,19 @@ test_expect_success "clone and setup child repos" '
git clone . two &&
(
cd two &&
- git config branch.master.remote one &&
+ git config branch.main.remote one &&
git config remote.one.url ../one/.git/ &&
- git config remote.one.fetch refs/heads/master:refs/heads/one
+ git config remote.one.fetch refs/heads/main:refs/heads/one
) &&
git clone . three &&
(
cd three &&
- git config branch.master.remote two &&
- git config branch.master.merge refs/heads/one &&
+ git config branch.main.remote two &&
+ git config branch.main.merge refs/heads/one &&
mkdir -p .git/remotes &&
{
echo "URL: ../two/.git/"
- echo "Pull: refs/heads/master:refs/heads/two"
+ echo "Pull: refs/heads/main:refs/heads/two"
echo "Pull: refs/heads/one:refs/heads/one"
} >.git/remotes/two
) &&
@@ -65,7 +65,7 @@ test_expect_success "fetch test" '
git fetch &&
git rev-parse --verify refs/heads/one &&
mine=$(git rev-parse refs/heads/one) &&
- his=$(cd ../one && git rev-parse refs/heads/master) &&
+ his=$(cd ../one && git rev-parse refs/heads/main) &&
test "z$mine" = "z$his"
'
@@ -75,11 +75,11 @@ test_expect_success "fetch test for-merge" '
git fetch &&
git rev-parse --verify refs/heads/two &&
git rev-parse --verify refs/heads/one &&
- master_in_two=$(cd ../two && git rev-parse master) &&
+ main_in_two=$(cd ../two && git rev-parse main) &&
one_in_two=$(cd ../two && git rev-parse one) &&
{
echo "$one_in_two "
- echo "$master_in_two not-for-merge"
+ echo "$main_in_two not-for-merge"
} >expected &&
cut -f -2 .git/FETCH_HEAD >actual &&
test_cmp expected actual'
@@ -88,7 +88,7 @@ test_expect_success 'fetch --prune on its own works as expected' '
cd "$D" &&
git clone . prune &&
cd prune &&
- git update-ref refs/remotes/origin/extrabranch master &&
+ git update-ref refs/remotes/origin/extrabranch main &&
git fetch --prune origin &&
test_must_fail git rev-parse origin/extrabranch
@@ -98,9 +98,9 @@ test_expect_success 'fetch --prune with a branch name keeps branches' '
cd "$D" &&
git clone . prune-branch &&
cd prune-branch &&
- git update-ref refs/remotes/origin/extrabranch master &&
+ git update-ref refs/remotes/origin/extrabranch main &&
- git fetch --prune origin master &&
+ git fetch --prune origin main &&
git rev-parse origin/extrabranch
'
@@ -110,18 +110,18 @@ test_expect_success 'fetch --prune with a namespace keeps other namespaces' '
cd prune-namespace &&
git fetch --prune origin refs/heads/a/*:refs/remotes/origin/a/* &&
- git rev-parse origin/master
+ git rev-parse origin/main
'
test_expect_success 'fetch --prune handles overlapping refspecs' '
cd "$D" &&
- git update-ref refs/pull/42/head master &&
+ git update-ref refs/pull/42/head main &&
git clone . prune-overlapping &&
cd prune-overlapping &&
git config --add remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&
git fetch --prune origin &&
- git rev-parse origin/master &&
+ git rev-parse origin/main &&
git rev-parse origin/pr/42 &&
git config --unset-all remote.origin.fetch &&
@@ -129,7 +129,7 @@ test_expect_success 'fetch --prune handles overlapping refspecs' '
git config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&
git fetch --prune origin &&
- git rev-parse origin/master &&
+ git rev-parse origin/main &&
git rev-parse origin/pr/42
'
@@ -137,13 +137,13 @@ test_expect_success 'fetch --prune --tags prunes branches but not tags' '
cd "$D" &&
git clone . prune-tags &&
cd prune-tags &&
- git tag sometag master &&
+ git tag sometag main &&
# Create what looks like a remote-tracking branch from an earlier
# fetch that has since been deleted from the remote:
- git update-ref refs/remotes/origin/fake-remote master &&
+ git update-ref refs/remotes/origin/fake-remote main &&
git fetch --prune --tags origin &&
- git rev-parse origin/master &&
+ git rev-parse origin/main &&
test_must_fail git rev-parse origin/fake-remote &&
git rev-parse sometag
'
@@ -152,10 +152,10 @@ test_expect_success 'fetch --prune --tags with branch does not prune other thing
cd "$D" &&
git clone . prune-tags-branch &&
cd prune-tags-branch &&
- git tag sometag master &&
- git update-ref refs/remotes/origin/extrabranch master &&
+ git tag sometag main &&
+ git update-ref refs/remotes/origin/extrabranch main &&
- git fetch --prune --tags origin master &&
+ git fetch --prune --tags origin main &&
git rev-parse origin/extrabranch &&
git rev-parse sometag
'
@@ -164,9 +164,9 @@ test_expect_success 'fetch --prune --tags with refspec prunes based on refspec'
cd "$D" &&
git clone . prune-tags-refspec &&
cd prune-tags-refspec &&
- git tag sometag master &&
- git update-ref refs/remotes/origin/foo/otherbranch master &&
- git update-ref refs/remotes/origin/extrabranch master &&
+ git tag sometag main &&
+ git update-ref refs/remotes/origin/foo/otherbranch main &&
+ git update-ref refs/remotes/origin/extrabranch main &&
git fetch --prune --tags origin refs/heads/foo/*:refs/remotes/origin/foo/* &&
test_must_fail git rev-parse refs/remotes/origin/foo/otherbranch &&
@@ -177,20 +177,20 @@ test_expect_success 'fetch --prune --tags with refspec prunes based on refspec'
test_expect_success '--refmap="" ignores configured refspec' '
cd "$TRASH_DIRECTORY" &&
git clone "$D" remote-refs &&
- git -C remote-refs rev-parse remotes/origin/master >old &&
- git -C remote-refs update-ref refs/remotes/origin/master master~1 &&
- git -C remote-refs rev-parse remotes/origin/master >new &&
+ git -C remote-refs rev-parse remotes/origin/main >old &&
+ git -C remote-refs update-ref refs/remotes/origin/main main~1 &&
+ git -C remote-refs rev-parse remotes/origin/main >new &&
git -C remote-refs fetch --refmap= origin "+refs/heads/*:refs/hidden/origin/*" &&
- git -C remote-refs rev-parse remotes/origin/master >actual &&
+ git -C remote-refs rev-parse remotes/origin/main >actual &&
test_cmp new actual &&
git -C remote-refs fetch origin &&
- git -C remote-refs rev-parse remotes/origin/master >actual &&
+ git -C remote-refs rev-parse remotes/origin/main >actual &&
test_cmp old actual
'
test_expect_success '--refmap="" and --prune' '
- git -C remote-refs update-ref refs/remotes/origin/foo/otherbranch master &&
- git -C remote-refs update-ref refs/hidden/foo/otherbranch master &&
+ git -C remote-refs update-ref refs/remotes/origin/foo/otherbranch main &&
+ git -C remote-refs update-ref refs/hidden/foo/otherbranch main &&
git -C remote-refs fetch --prune --refmap="" origin +refs/heads/*:refs/hidden/* &&
git -C remote-refs rev-parse remotes/origin/foo/otherbranch &&
test_must_fail git -C remote-refs rev-parse refs/hidden/foo/otherbranch &&
@@ -250,7 +250,7 @@ test_expect_success 'fetch uses remote ref names to describe new refs' '
test_i18ngrep "new tag.* -> descriptive-tag$" actual &&
test_i18ngrep "new ref.* -> crazy$" actual
) &&
- git checkout master
+ git checkout main
'
test_expect_success 'fetch must not resolve short tag name' '
@@ -281,7 +281,7 @@ test_expect_success 'create bundle 1' '
cd "$D" &&
echo >file updated again by origin &&
git commit -a -m "tip" &&
- git bundle create bundle1 master^..master
+ git bundle create bundle1 main^..main
'
test_expect_success 'header of bundle looks right' '
@@ -294,13 +294,13 @@ test_expect_success 'header of bundle looks right' '
test_expect_success 'create bundle 2' '
cd "$D" &&
- git bundle create bundle2 master~2..master
+ git bundle create bundle2 main~2..main
'
test_expect_success 'unbundle 1' '
cd "$D/bundle" &&
git checkout -b some-branch &&
- test_must_fail git fetch "$D/bundle1" master:master
+ test_must_fail git fetch "$D/bundle1" main:main
'
@@ -313,8 +313,8 @@ test_expect_success 'bundle 1 has only 3 files ' '
test_expect_success 'unbundle 2' '
cd "$D/bundle" &&
- git fetch ../bundle2 master:master &&
- test "tip" = "$(git log -1 --pretty=oneline master | cut -d" " -f2)"
+ git fetch ../bundle2 main:main &&
+ test "tip" = "$(git log -1 --pretty=oneline main | cut -d" " -f2)"
'
test_expect_success 'bundle does not prerequisite objects' '
@@ -331,14 +331,14 @@ test_expect_success 'bundle does not prerequisite objects' '
test_expect_success 'bundle should be able to create a full history' '
cd "$D" &&
- git tag -a -m '1.0' v1.0 master &&
+ git tag -a -m '1.0' v1.0 main &&
git bundle create bundle4 v1.0
'
test_expect_success 'fetch with a non-applying branch.<name>.merge' '
- git config branch.master.remote yeti &&
- git config branch.master.merge refs/heads/bigfoot &&
+ git config branch.main.remote yeti &&
+ git config branch.main.merge refs/heads/bigfoot &&
git config remote.blub.url one &&
git config remote.blub.fetch "refs/heads/*:refs/remotes/one/*" &&
git fetch blub
@@ -358,8 +358,8 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge
# the merge spec matches the branch the remote HEAD points to
test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge [2]' '
one_ref=$(cd one && git symbolic-ref HEAD) &&
- git config branch.master.remote blub &&
- git config branch.master.merge "$one_ref" &&
+ git config branch.main.remote blub &&
+ git config branch.main.merge "$one_ref" &&
git update-ref -d FETCH_HEAD &&
git fetch one &&
test $one_head = "$(git rev-parse --verify FETCH_HEAD)" &&
@@ -369,7 +369,7 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge
# URL supplied to fetch matches the url of the configured branch's remote, but
# the merge spec does not match the branch the remote HEAD points to
test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge [3]' '
- git config branch.master.merge "${one_ref}_not" &&
+ git config branch.main.merge "${one_ref}_not" &&
git update-ref -d FETCH_HEAD &&
git fetch one &&
test $one_head = "$(git rev-parse --verify FETCH_HEAD)" &&
@@ -385,9 +385,9 @@ test_expect_success 'quoting of a strangely named repo' '
test_expect_success 'bundle should record HEAD correctly' '
cd "$D" &&
- git bundle create bundle5 HEAD master &&
+ git bundle create bundle5 HEAD main &&
git bundle list-heads bundle5 >actual &&
- for h in HEAD refs/heads/master
+ for h in HEAD refs/heads/main
do
echo "$(git rev-parse --verify $h) $h"
done >expect &&
@@ -395,10 +395,10 @@ test_expect_success 'bundle should record HEAD correctly' '
'
-test_expect_success 'mark initial state of origin/master' '
+test_expect_success 'mark initial state of origin/main' '
(
cd three &&
- git tag base-origin-master refs/remotes/origin/master
+ git tag base-origin-main refs/remotes/origin/main
)
'
@@ -408,10 +408,10 @@ test_expect_success 'explicit fetch should update tracking' '
git branch -f side &&
(
cd three &&
- git update-ref refs/remotes/origin/master base-origin-master &&
- o=$(git rev-parse --verify refs/remotes/origin/master) &&
- git fetch origin master &&
- n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ git update-ref refs/remotes/origin/main base-origin-main &&
+ o=$(git rev-parse --verify refs/remotes/origin/main) &&
+ git fetch origin main &&
+ n=$(git rev-parse --verify refs/remotes/origin/main) &&
test "$o" != "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/side
)
@@ -423,10 +423,10 @@ test_expect_success 'explicit pull should update tracking' '
git branch -f side &&
(
cd three &&
- git update-ref refs/remotes/origin/master base-origin-master &&
- o=$(git rev-parse --verify refs/remotes/origin/master) &&
- git pull origin master &&
- n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ git update-ref refs/remotes/origin/main base-origin-main &&
+ o=$(git rev-parse --verify refs/remotes/origin/main) &&
+ git pull origin main &&
+ n=$(git rev-parse --verify refs/remotes/origin/main) &&
test "$o" != "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/side
)
@@ -445,13 +445,13 @@ test_expect_success 'explicit --refmap option overrides remote.*.fetch' '
git branch -f side &&
(
cd three &&
- git update-ref refs/remotes/origin/master base-origin-master &&
- o=$(git rev-parse --verify refs/remotes/origin/master) &&
- git fetch --refmap="refs/heads/*:refs/remotes/other/*" origin master &&
- n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ git update-ref refs/remotes/origin/main base-origin-main &&
+ o=$(git rev-parse --verify refs/remotes/origin/main) &&
+ git fetch --refmap="refs/heads/*:refs/remotes/other/*" origin main &&
+ n=$(git rev-parse --verify refs/remotes/origin/main) &&
test "$o" = "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/side &&
- git rev-parse --verify refs/remotes/other/master
+ git rev-parse --verify refs/remotes/other/main
)
'
@@ -460,10 +460,10 @@ test_expect_success 'explicitly empty --refmap option disables remote.*.fetch' '
git branch -f side &&
(
cd three &&
- git update-ref refs/remotes/origin/master base-origin-master &&
- o=$(git rev-parse --verify refs/remotes/origin/master) &&
- git fetch --refmap="" origin master &&
- n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ git update-ref refs/remotes/origin/main base-origin-main &&
+ o=$(git rev-parse --verify refs/remotes/origin/main) &&
+ git fetch --refmap="" origin main &&
+ n=$(git rev-parse --verify refs/remotes/origin/main) &&
test "$o" = "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/side
)
@@ -475,10 +475,10 @@ test_expect_success 'configured fetch updates tracking' '
git branch -f side &&
(
cd three &&
- git update-ref refs/remotes/origin/master base-origin-master &&
- o=$(git rev-parse --verify refs/remotes/origin/master) &&
+ git update-ref refs/remotes/origin/main base-origin-main &&
+ o=$(git rev-parse --verify refs/remotes/origin/main) &&
git fetch origin &&
- n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ n=$(git rev-parse --verify refs/remotes/origin/main) &&
test "$o" != "$n" &&
git rev-parse --verify refs/remotes/origin/side
)
@@ -489,12 +489,12 @@ test_expect_success 'non-matching refspecs do not confuse tracking update' '
git update-ref refs/odd/location HEAD &&
(
cd three &&
- git update-ref refs/remotes/origin/master base-origin-master &&
+ git update-ref refs/remotes/origin/main base-origin-main &&
git config --add remote.origin.fetch \
refs/odd/location:refs/remotes/origin/odd &&
- o=$(git rev-parse --verify refs/remotes/origin/master) &&
- git fetch origin master &&
- n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ o=$(git rev-parse --verify refs/remotes/origin/main) &&
+ git fetch origin main &&
+ n=$(git rev-parse --verify refs/remotes/origin/main) &&
test "$o" != "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/odd
)
@@ -520,7 +520,7 @@ test_expect_success 'auto tag following fetches minimum' '
git tag -a -m $i excess-$i || exit 1
done
) &&
- git checkout master &&
+ git checkout main &&
(
cd follow &&
git fetch
@@ -529,13 +529,13 @@ test_expect_success 'auto tag following fetches minimum' '
test_expect_success 'refuse to fetch into the current branch' '
- test_must_fail git fetch . side:master
+ test_must_fail git fetch . side:main
'
test_expect_success 'fetch into the current branch with --update-head-ok' '
- git fetch --update-head-ok . side:master
+ git fetch --update-head-ok . side:main
'
@@ -551,7 +551,7 @@ test_expect_success "should be able to fetch with duplicate refspecs" '
(
cd dups &&
git init &&
- git config branch.master.remote three &&
+ git config branch.main.remote three &&
git config remote.three.url ../three/.git &&
git config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
git config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
@@ -860,11 +860,11 @@ test_expect_success 'all boundary commits are excluded' '
test_commit oneside &&
git checkout HEAD^ &&
test_commit otherside &&
- git checkout master &&
+ git checkout main &&
test_tick &&
git merge otherside &&
ad=$(git log --no-walk --format=%ad HEAD) &&
- git bundle create twoside-boundary.bdl master --since="$ad" &&
+ git bundle create twoside-boundary.bdl main --since="$ad" &&
convert_bundle_to_pack <twoside-boundary.bdl >twoside-boundary.pack &&
pack=$(git index-pack --fix-thin --stdin <twoside-boundary.pack) &&
test_bundle_object_count .git/objects/pack/pack-${pack##pack }.pack 3
@@ -934,7 +934,7 @@ test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '
grep -e "->" actual | cut -c 22- >../actual
) &&
cat >expect <<-\EOF &&
- master -> origin/master
+ main -> origin/main
looooooooooooong-tag -> looooooooooooong-tag
EOF
test_cmp expect actual
@@ -949,7 +949,7 @@ test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '
grep -e "->" actual | cut -c 22- >../actual
) &&
cat >expect <<-\EOF &&
- master -> origin/*
+ main -> origin/*
extraaa -> *
EOF
test_cmp expect actual
@@ -1000,7 +1000,7 @@ setup_negotiation_tip () {
fi &&
test_commit -C "$SERVER" beta_s &&
- git -C "$SERVER" checkout master &&
+ git -C "$SERVER" checkout main &&
test_commit -C "$SERVER" alpha_s &&
git -C "$SERVER" tag -d alpha_1 alpha_2 beta_1 beta_2
}
diff --git a/t/t5511-refspec.sh b/t/t5511-refspec.sh
index f541f30bc2..847a9d4c27 100755
--- a/t/t5511-refspec.sh
+++ b/t/t5511-refspec.sh
@@ -33,7 +33,7 @@ test_refspec fetch '::' invalid
test_refspec push 'refs/heads/*:refs/remotes/frotz/*'
test_refspec push 'refs/heads/*:refs/remotes/frotz' invalid
test_refspec push 'refs/heads:refs/remotes/frotz/*' invalid
-test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy'
+test_refspec push 'refs/heads/main:refs/remotes/frotz/xyzzy'
# These have invalid LHS, but we do not have a formal "valid sha-1
@@ -41,18 +41,18 @@ test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy'
# code. They will be caught downstream anyway, but we may want to
# have tighter check later...
-: test_refspec push 'refs/heads/master::refs/remotes/frotz/xyzzy' invalid
+: test_refspec push 'refs/heads/main::refs/remotes/frotz/xyzzy' invalid
: test_refspec push 'refs/heads/maste :refs/remotes/frotz/xyzzy' invalid
test_refspec fetch 'refs/heads/*:refs/remotes/frotz/*'
test_refspec fetch 'refs/heads/*:refs/remotes/frotz' invalid
test_refspec fetch 'refs/heads:refs/remotes/frotz/*' invalid
-test_refspec fetch 'refs/heads/master:refs/remotes/frotz/xyzzy'
-test_refspec fetch 'refs/heads/master::refs/remotes/frotz/xyzzy' invalid
+test_refspec fetch 'refs/heads/main:refs/remotes/frotz/xyzzy'
+test_refspec fetch 'refs/heads/main::refs/remotes/frotz/xyzzy' invalid
test_refspec fetch 'refs/heads/maste :refs/remotes/frotz/xyzzy' invalid
-test_refspec push 'master~1:refs/remotes/frotz/backup'
-test_refspec fetch 'master~1:refs/remotes/frotz/backup' invalid
+test_refspec push 'main~1:refs/remotes/frotz/backup'
+test_refspec fetch 'main~1:refs/remotes/frotz/backup' invalid
test_refspec push 'HEAD~4:refs/remotes/frotz/new'
test_refspec fetch 'HEAD~4:refs/remotes/frotz/new' invalid
diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh
index e98c3a0174..fb122fb7b8 100755
--- a/t/t5512-ls-remote.sh
+++ b/t/t5512-ls-remote.sh
@@ -118,7 +118,7 @@ test_expect_success 'use branch.<name>.remote if possible' '
echo "From $URL" >exp_err &&
git remote add other $URL &&
- git config branch.master.remote other &&
+ git config branch.main.remote other &&
git ls-remote 2>actual_err >actual &&
test_cmp exp_err actual_err &&
@@ -129,9 +129,9 @@ test_expect_success 'confuses pattern as remote when no remote specified' '
if test_have_prereq MINGW
then
# Windows does not like asterisks in pathname
- does_not_exist=master
+ does_not_exist=main
else
- does_not_exist="refs*master"
+ does_not_exist="refs*main"
fi &&
cat >exp <<-EOF &&
fatal: '\''$does_not_exist'\'' does not appear to be a git repository
@@ -144,7 +144,7 @@ test_expect_success 'confuses pattern as remote when no remote specified' '
# Do not expect "git ls-remote <pattern>" to work; ls-remote needs
# <remote> if you want to feed <pattern>, just like you cannot say
# fetch <branch>.
- # We could just as easily have used "master"; the "*" emphasizes its
+ # We could just as easily have used "main"; the "*" emphasizes its
# role as a pattern.
test_must_fail git ls-remote "$does_not_exist" >actual 2>&1 &&
test_i18ncmp exp actual
@@ -217,14 +217,14 @@ test_expect_success 'protocol v2 supports hiderefs' '
test_expect_success 'ls-remote --symref' '
git fetch origin &&
- echo "ref: refs/heads/master HEAD" >expect &&
+ echo "ref: refs/heads/main HEAD" >expect &&
generate_references \
HEAD \
- refs/heads/master >>expect &&
+ refs/heads/main >>expect &&
oid=$(git rev-parse HEAD) &&
echo "$oid refs/remotes/origin/HEAD" >>expect &&
generate_references \
- refs/remotes/origin/master \
+ refs/remotes/origin/main \
refs/tags/mark \
refs/tags/mark1.1 \
refs/tags/mark1.10 \
@@ -238,7 +238,7 @@ test_expect_success 'ls-remote --symref' '
test_expect_success 'ls-remote with filtered symref (refname)' '
rev=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
- ref: refs/heads/master HEAD
+ ref: refs/heads/main HEAD
$rev HEAD
EOF
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
@@ -252,7 +252,7 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '
cat >expect <<-EOF &&
ref: refs/tags/mark refs/heads/foo
$rev refs/heads/foo
- $rev refs/heads/master
+ $rev refs/heads/main
EOF
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
# protocol v0 here.
@@ -263,7 +263,7 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '
test_expect_success 'ls-remote --symref omits filtered-out matches' '
cat >expect <<-EOF &&
$rev refs/heads/foo
- $rev refs/heads/master
+ $rev refs/heads/main
EOF
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
# protocol v0 here.
@@ -330,10 +330,10 @@ test_expect_success 'ls-remote --sort fails gracefully outside repository' '
test_expect_success 'ls-remote patterns work with all protocol versions' '
git for-each-ref --format="%(objectname) %(refname)" \
- refs/heads/master refs/remotes/origin/master >expect &&
- git -c protocol.version=1 ls-remote . master >actual.v1 &&
+ refs/heads/main refs/remotes/origin/main >expect &&
+ git -c protocol.version=1 ls-remote . main >actual.v1 &&
test_cmp expect actual.v1 &&
- git -c protocol.version=2 ls-remote . master >actual.v2 &&
+ git -c protocol.version=2 ls-remote . main >actual.v2 &&
test_cmp expect actual.v2
'
diff --git a/t/t5514-fetch-multiple.sh b/t/t5514-fetch-multiple.sh
index de8e2f1531..cb8b02b396 100755
--- a/t/t5514-fetch-multiple.sh
+++ b/t/t5514-fetch-multiple.sh
@@ -17,7 +17,7 @@ setup_repository () {
git add elif &&
test_tick &&
git commit -m "Second" &&
- git checkout master
+ git checkout main
)
}
@@ -32,16 +32,16 @@ test_expect_success setup '
'
cat > test/expect << EOF
- one/master
+ one/main
one/side
- origin/HEAD -> origin/master
- origin/master
+ origin/HEAD -> origin/main
+ origin/main
origin/side
three/another
- three/master
+ three/main
three/side
two/another
- two/master
+ two/main
two/side
EOF
@@ -70,15 +70,15 @@ test_expect_success 'git fetch --all should continue if a remote has errors' '
test_expect_success 'git fetch --all does not allow non-option arguments' '
(cd test &&
test_must_fail git fetch --all origin &&
- test_must_fail git fetch --all origin master)
+ test_must_fail git fetch --all origin main)
'
cat > expect << EOF
- origin/HEAD -> origin/master
- origin/master
+ origin/HEAD -> origin/main
+ origin/main
origin/side
three/another
- three/master
+ three/main
three/side
EOF
@@ -92,10 +92,10 @@ test_expect_success 'git fetch --multiple (but only one remote)' '
'
cat > expect << EOF
- one/master
+ one/main
one/side
two/another
- two/master
+ two/main
two/side
EOF
@@ -133,13 +133,13 @@ test_expect_success 'git fetch --all (skipFetchAll)' '
'
cat > expect << EOF
- one/master
+ one/main
one/side
three/another
- three/master
+ three/main
three/side
two/another
- two/master
+ two/main
two/side
EOF
diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh
index 9d6a46ff56..7cb514c1be 100755
--- a/t/t5515-fetch-merge-logic.sh
+++ b/t/t5515-fetch-merge-logic.sh
@@ -15,7 +15,7 @@ export GIT_TEST_PROTOCOL_VERSION
build_script () {
script="$1" &&
- for i in one three_file master master2 one_tree three two two2 three2
+ for i in one three_file main main2 one_tree three two two2 three2
do
echo "s/$(test_oid --hash=sha1 "$i")/$(test_oid "$i")/g" >>"$script"
done
@@ -40,8 +40,8 @@ test_expect_success setup '
three_file sha1:0e3b14047d3ee365f4f2a1b673db059c3972589c
three_file sha256:bc4447d50c07497a8bfe6eef817f2364ecca9d471452e43b52756cc1a908bd32
- master sha1:6c9dec2b923228c9ff994c6cfe4ae16c12408dc5
- master sha256:8521c3072461fcfe8f32d67f95cc6e6b832a2db2fa29769ffc788bce85ebcd75
+ main sha1:6c9dec2b923228c9ff994c6cfe4ae16c12408dc5
+ main sha256:8521c3072461fcfe8f32d67f95cc6e6b832a2db2fa29769ffc788bce85ebcd75
one_tree sha1:22feea448b023a2d864ef94b013735af34d238ba
one_tree sha256:6e4743f4ef2356b881dda5e91f5c7cdffe870faf350bf7b312f80a20935f5d83
@@ -52,8 +52,8 @@ test_expect_success setup '
two sha1:525b7fb068d59950d185a8779dc957c77eed73ba
two sha256:3b21de3440cd38c2a9e9b464adb923f7054949ed4c918e1a0ac4c95cd52774db
- master2 sha1:754b754407bf032e9a2f9d5a9ad05ca79a6b228f
- master2 sha256:6c7abaea8a6d8ef4d89877e68462758dc6774690fbbbb0e6d7dd57415c9abde0
+ main2 sha1:754b754407bf032e9a2f9d5a9ad05ca79a6b228f
+ main2 sha256:6c7abaea8a6d8ef4d89877e68462758dc6774690fbbbb0e6d7dd57415c9abde0
two2 sha1:6134ee8f857693b96ff1cc98d3e2fd62b199e5a8
two2 sha256:87a2d3ee29c83a3dc7afd41c0606b11f67603120b910a7be7840accdc18344d4
@@ -80,9 +80,9 @@ test_expect_success setup '
git tag -a -m "Tag Three file" tag-three-file HEAD^{tree}:file &&
git branch three &&
- echo master >> file &&
- git commit -a -m Master &&
- git tag -a -m "Tag Master" tag-master &&
+ echo main >> file &&
+ git commit -a -m main &&
+ git tag -a -m "Tag main" tag-main &&
git checkout three &&
@@ -91,7 +91,7 @@ test_expect_success setup '
git config remote.origin.url ../.git/ &&
git config remote.config-explicit.url ../.git/ &&
- git config remote.config-explicit.fetch refs/heads/master:remotes/rem/master &&
+ git config remote.config-explicit.fetch refs/heads/main:remotes/rem/main &&
git config --add remote.config-explicit.fetch refs/heads/one:remotes/rem/one &&
git config --add remote.config-explicit.fetch two:remotes/rem/two &&
git config --add remote.config-explicit.fetch refs/heads/three:remotes/rem/three &&
@@ -104,7 +104,7 @@ test_expect_success setup '
mkdir -p .git/remotes &&
{
echo "URL: ../.git/"
- echo "Pull: refs/heads/master:remotes/rem/master"
+ echo "Pull: refs/heads/main:remotes/rem/main"
echo "Pull: refs/heads/one:remotes/rem/one"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment