Skip to content

Commit 164d63b

Browse files
committed
Update everything to refer to main branch instead of master
1 parent 9f543ef commit 164d63b

26 files changed

+151
-154
lines changed

.github/CONTRIBUTING.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -172,36 +172,36 @@ Now that you have a copy of your fork, there is work you will need to do to keep
172172

173173
Do this prior to every time you create a branch for a PR:
174174

175-
1. Make sure you are on the `master` branch
175+
1. Make sure you are on the `main` branch
176176

177177
> ```sh
178178
> $ git status
179-
> On branch master
180-
> Your branch is up-to-date with 'origin/master'.
179+
> On branch main
180+
> Your branch is up-to-date with 'origin/main'.
181181
> ```
182182
183-
> If your aren't on `master`, resolve outstanding files and commits and checkout the `master` branch
183+
> If your aren't on `main`, resolve outstanding files and commits and checkout the `main` branch
184184
185185
> ```sh
186-
> $ git checkout master
186+
> $ git checkout main
187187
> ```
188188
189189
2. Do a pull with rebase against `upstream`
190190
191191
> ```sh
192-
> $ git pull --rebase upstream master
192+
> $ git pull --rebase upstream main
193193
> ```
194194
195-
> This will pull down all of the changes to the official master branch, without making an additional
195+
> This will pull down all of the changes to the official mai branch, without making an additional
196196
> commit in your local repo.
197197
198-
3. (_Optional_) Force push your updated master branch to your GitHub fork
198+
3. (_Optional_) Force push your updated main branch to your GitHub fork
199199
200200
> ```sh
201-
> $ git push origin master --force
201+
> $ git push origin main --force
202202
> ```
203203
204-
> This will overwrite the master branch of your fork.
204+
> This will overwrite the main branch of your fork.
205205
206206
### Creating a branch
207207
@@ -449,9 +449,9 @@ GitHub has a good guide on how to contribute to open source
449449
#### Important: ALWAYS EDIT ON A BRANCH
450450

451451
If you take away only one thing from this document, it should be this: Never, **EVER** make edits to
452-
the `master` branch. ALWAYS make a new branch BEFORE you edit files. This is critical, because if
453-
your PR is not accepted, your copy of master will be forever sullied and the only way to fix it is
454-
to delete your fork and re-fork.
452+
the `main` branch. ALWAYS make a new branch BEFORE you edit files. This is critical, because if your
453+
PR is not accepted, your copy of main will be forever sullied and the only way to fix it is to
454+
delete your fork and re-fork.
455455

456456
#### Methods
457457

@@ -465,21 +465,21 @@ There are two methods of creating a pull request for cmd2:
465465
This is the recommended method. Read about
466466
[how to set up and maintain a local instance of cmd2](#maintaining-your-fork).
467467

468-
1. Perform the maintenance step of rebasing `master`
469-
2. Ensure you're on the `master` branch using `git status`:
468+
1. Perform the maintenance step of rebasing `main`
469+
2. Ensure you're on the `main` branch using `git status`:
470470

471471
```sh
472472
$ git status
473-
On branch master
474-
Your branch is up-to-date with 'origin/master'.
473+
On branch main
474+
Your branch is up-to-date with 'origin/main'.
475475

476476
nothing to commit, working directory clean
477477
```
478478

479-
1. If you're not on master or your working directory is not clean, resolve any outstanding
480-
files/commits and checkout master `git checkout master`
479+
1. If you're not on main or your working directory is not clean, resolve any outstanding
480+
files/commits and checkout main `git checkout main`
481481

482-
2. Create a branch off of `master` with git: `git checkout -B branch/name-here` **Note:** Branch
482+
2. Create a branch off of `main` with git: `git checkout -B branch/name-here` **Note:** Branch
483483
naming is important. Use a name like `fix/short-fix-description` or
484484
`feature/short-feature-description`. Review the
485485
[Contribution Guidelines](#contribution-guidelines) for more detail.
@@ -514,9 +514,9 @@ on how to do it.
514514
1. Once the edits have been committed, you will be prompted to create a pull request on your fork's
515515
GitHub page
516516

517-
2. By default, all pull requests should be against the cmd2 main repo, `master` branch
517+
2. By default, all pull requests should be against the cmd2 main repo, `main` branch
518518

519-
3. Submit a pull request from your branch to cmd2's `master` branch
519+
3. Submit a pull request from your branch to cmd2's `main` branch
520520

521521
4. The title (also called the subject) of your PR should be descriptive of your changes and
522522
succinctly indicate what is being fixed
@@ -756,26 +756,25 @@ Given a version number `MAJOR`.`MINOR`.`PATCH`, increment the:
756756

757757
### Branching Strategy
758758

759-
We use the **master** branch for the upcoming `PATCH` release - i.e. if the current version of
760-
`cmd2` is 1.0.2, then the **master** branch contains code which is planned for release in 1.0.3.
759+
We use the **main** branch for the upcoming `PATCH` release - i.e. if the current version of `cmd2`
760+
is 1.0.2, then the **main** branch contains code which is planned for release in 1.0.3.
761761

762762
If work needs to be done for a `MAJOR` or `MINOR` release when we anticipate there will be a `PATCH`
763763
release in-between, then a branch should be created named for the appropriate version number for the
764764
work, e.g. if the current release of `cmd2` is 1.0.2 and a backwards-incompatible change needs to be
765765
committed for an upcoming `MAJOR` release, then this work should be committed to a **2.0.0** branch
766766
until such a time as we are ready to release version 2.0.0.
767767

768-
Following this strategy, releases are always done from the **master** branch and `MAJOR` or `MINOR`
769-
branches are merged to **master** immediately prior to doing a release. Once merged to **master**,
770-
the other branches can be deleted. All releases are tagged so that they can be reproduced if
771-
necessary.
768+
Following this strategy, releases are always done from the **main** branch and `MAJOR` or `MINOR`
769+
branches are merged to **main** immediately prior to doing a release. Once merged to **main**, the
770+
other branches can be deleted. All releases are tagged so that they can be reproduced if necessary.
772771

773772
## Publishing a new release
774773

775774
Since 0.9.2, the process of publishing a new release of `cmd2` to [PyPi](https://pypi.org/) has been
776775
mostly automated. The manual steps are all git operations. Here's the checklist:
777776

778-
1. Make sure you're on the proper branch (almost always **master**)
777+
1. Make sure you're on the proper branch (almost always **main**)
779778
1. Make sure all the unit tests pass with `invoke pytest` or `py.test`
780779
1. Make sure latest year in `LICENSE` matches current year
781780
1. Make sure `CHANGELOG.md` describes the version and has the correct release date

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
77
# The branches below must be a subset of the branches above
8-
branches: [master]
8+
branches: [main]
99
schedule:
1010
- cron: "0 6 * * 4"
1111

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
types: [opened, synchronize, reopened]
77
push:
8-
branches: [master]
8+
branches: [main]
99

1010
workflow_dispatch:
1111

.github/workflows/quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
types: [opened, synchronize, reopened]
77
push:
8-
branches: [master]
8+
branches: [main]
99

1010
permissions:
1111
contents: read

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
types: [opened, synchronize, reopened]
77
push:
8-
branches: [master]
8+
branches: [main]
99

1010
jobs:
1111
tests:

.github/workflows/typecheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
types: [opened, synchronize, reopened]
77
push:
8-
branches: [master]
8+
branches: [main]
99

1010
permissions:
1111
contents: read

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: trailing-whitespace
1010

1111
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: "v0.12.0"
12+
rev: "v0.12.1"
1313
hooks:
1414
- id: ruff-format
1515
args: [--config=pyproject.toml]

CHANGELOG.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
prompts.
102102
- This fix introduces behavior where an updated prompt won't display after an aborted search
103103
until a user presses Enter. See
104-
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/master/examples/async_printing.py)
104+
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/main/examples/async_printing.py)
105105
example for how to handle this case using `Cmd.need_prompt_refresh()` and
106106
`Cmd.async_refresh_prompt()`.
107107
- Enhancements
@@ -321,8 +321,8 @@
321321
persistent history files created with versions older than 2.0.0 are not compatible.
322322
- Enhancements
323323
- Added support for custom tab completion and up-arrow input history to `cmd2.Cmd2.read_input`.
324-
See [read_input.py](https://github.com/python-cmd2/cmd2/blob/master/examples/read_input.py)
325-
for an example.
324+
See [read_input.py](https://github.com/python-cmd2/cmd2/blob/main/examples/read_input.py) for
325+
an example.
326326
- Added `cmd2.exceptions.PassThroughException` to raise unhandled command exceptions instead of
327327
printing them.
328328
- Added support for ANSI styles and newlines in tab completion results using
@@ -534,7 +534,7 @@
534534
- See [table_creation](https://cmd2.readthedocs.io/en/latest/features/table_creation.html)
535535
documentation for an overview.
536536
- See
537-
[table_creation.py](https://github.com/python-cmd2/cmd2/blob/master/examples/table_creation.py)
537+
[table_creation.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_creation.py)
538538
for an example.
539539
- Added the following exceptions to the public API
540540
- `SkipPostcommandHooks` - Custom exception class for when a command has a failure bad
@@ -786,7 +786,7 @@
786786
- Greatly simplified using argparse-based tab completion. The new interface is a complete
787787
overhaul that breaks the previous way of specifying completion and choices functions. See
788788
header of
789-
[argparse_custom.py](https://github.com/python-cmd2/cmd2/blob/master/cmd2/argparse_custom.py)
789+
[argparse_custom.py](https://github.com/python-cmd2/cmd2/blob/main/cmd2/argparse_custom.py)
790790
for more information.
791791
- Enabled tab completion on multiline commands
792792
- **Renamed Commands Notice**
@@ -1109,7 +1109,7 @@
11091109
- Added `async_alert`, `async_update_prompt`, and `set_window_title` functions
11101110
- These allow you to provide feedback to the user in an asynchronous fashion, meaning alerts
11111111
can display when the user is still entering text at the prompt. See
1112-
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/master/examples/async_printing.py)
1112+
[async_printing.py](https://github.com/python-cmd2/cmd2/blob/main/examples/async_printing.py)
11131113
for an example.
11141114
- Cross-platform colored output support
11151115
- `colorama` gets initialized properly in `Cmd.__init()`
@@ -1147,7 +1147,7 @@
11471147
- New dependency on `attrs` third party module
11481148
- Added `matches_sorted` member to support custom sorting of tab completion matches
11491149
- Added
1150-
[tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocomp_dynamic.py)
1150+
[tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_autocomp_dynamic.py)
11511151
example
11521152
- Demonstrates updating the argparse object during init instead of during class construction
11531153
- Deprecations
@@ -1190,7 +1190,7 @@
11901190
- If `chop` is `False`, then `self.pager` is used as the pager
11911191
- Otherwise `self.pager_chop` is used as the pager
11921192
- Greatly improved the
1193-
[table_display.py](https://github.com/python-cmd2/cmd2/blob/master/examples/table_display.py)
1193+
[table_display.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_display.py)
11941194
example
11951195
- Now uses the new [tableformatter](https://github.com/python-tableformatter/tableformatter)
11961196
module which looks better than `tabulate`
@@ -1224,7 +1224,7 @@
12241224
- Enhancements
12251225
- Automatic completion of `argparse` arguments via `cmd2.argparse_completer.AutoCompleter`
12261226
- See the
1227-
[tab_autocompletion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocompletion.py)
1227+
[tab_autocompletion.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_autocompletion.py)
12281228
example for a demonstration of how to use this feature
12291229
- `cmd2` no longer depends on the `six` module
12301230
- `cmd2` is now a multi-file Python package instead of a single-file module
@@ -1262,7 +1262,7 @@
12621262
[Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html)
12631263
section of the documentation for more information on these decorators
12641264
- Alternatively, see the
1265-
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/master/examples/argparse_example.py)
1265+
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/argparse_example.py)
12661266
- Deleted `cmd_with_subs_completer`, `get_subcommands`, and `get_subcommand_completer`
12671267
- Replaced by default AutoCompleter implementation for all commands using argparse
12681268
- Deleted support for old method of calling application commands with `cmd()` and `self`
@@ -1305,7 +1305,7 @@
13051305
[Grouping Commands](http://cmd2.readthedocs.io/en/latest/argument_processing.html?highlight=verbose#grouping-commands)
13061306
section of the docs for more info
13071307
- See
1308-
[help_categories.py](https://github.com/python-cmd2/cmd2/blob/master/examples/help_categories.py)
1308+
[help_categories.py](https://github.com/python-cmd2/cmd2/blob/main/examples/help_categories.py)
13091309
for an example
13101310
- Tab completion of paths now supports ~user user path expansion
13111311
- Simplified implementation of various tab completion functions so they no longer require
@@ -1357,8 +1357,8 @@
13571357
- `cmd_with_subs_completer()` no longer takes an argument called `base`. Adding tab completion
13581358
to subcommands has been simplified to declaring it in the subcommand parser's default
13591359
settings. This easily allows arbitrary completers like path_complete to be used. See
1360-
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/master/examples/subcommands.py) for
1361-
an example of how to use tab completion in subcommands. In addition, the docstring for
1360+
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/main/examples/subcommands.py) for an
1361+
example of how to use tab completion in subcommands. In addition, the docstring for
13621362
`cmd_with_subs_completer()` offers more details.
13631363

13641364
## 0.8.2 (March 21, 2018)
@@ -1376,12 +1376,12 @@
13761376
attribute to enable canceling current line instead of quitting when Ctrl+C is typed
13771377
- Added possibility of having readline history preservation in a SubMenu
13781378
- Added
1379-
[table_display.py](https://github.com/python-cmd2/cmd2/blob/master/examples/table_display.py)
1379+
[table_display.py](https://github.com/python-cmd2/cmd2/blob/main/examples/table_display.py)
13801380
example to demonstrate how to display tabular data
13811381
- Added command aliasing with `alias` and `unalias` commands
13821382
- Added the ability to load an initialization script at startup
13831383
- See
1384-
[alias_startup.py](https://github.com/python-cmd2/cmd2/blob/master/examples/alias_startup.py)
1384+
[alias_startup.py](https://github.com/python-cmd2/cmd2/blob/main/examples/alias_startup.py)
13851385
for an example
13861386
- Added a default SIGINT handler which terminates any open pipe subprocesses and re-raises a
13871387
KeyboardInterrupt
@@ -1394,14 +1394,14 @@
13941394
- Fixed a bug in a unit test which would fail if your home directory was empty on a Linux system
13951395
- Fixed outdated help text for the **edit** command
13961396
- Fixed outdated
1397-
[remove_unused.py](https://github.com/python-cmd2/cmd2/blob/master/examples/remove_unused.py)
1397+
[remove_unused.py](https://github.com/python-cmd2/cmd2/blob/main/examples/remove_unused.py)
13981398
- Enhancements
13991399
- Added support for sub-menus.
1400-
- See [submenus.py](https://github.com/python-cmd2/cmd2/blob/master/examples/submenus.py)
1401-
for an example of how to use it
1400+
- See [submenus.py](https://github.com/python-cmd2/cmd2/blob/main/examples/submenus.py) for
1401+
an example of how to use it
14021402
- Added option for persistent readline history
14031403
- See
1404-
[persistent_history.py](https://github.com/python-cmd2/cmd2/blob/master/examples/persistent_history.py)
1404+
[persistent_history.py](https://github.com/python-cmd2/cmd2/blob/main/examples/persistent_history.py)
14051405
for an example
14061406
- See the
14071407
[Searchable command history](http://cmd2.readthedocs.io/en/latest/freefeatures.html#searchable-command-history)
@@ -1412,10 +1412,10 @@
14121412
- `exclude_from_help` and `excludeFromHistory` are now instance instead of class attributes
14131413
- Added flag and index based tab completion helper functions
14141414
- See
1415-
[tab_completion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_completion.py)
1415+
[tab_completion.py](https://github.com/python-cmd2/cmd2/blob/main/examples/tab_completion.py)
14161416
- Added support for displaying output which won't fit on the screen via a pager using `ppaged()`
14171417
- See
1418-
[paged_output.py](https://github.com/python-cmd2/cmd2/blob/master/examples/paged_output.py)
1418+
[paged_output.py](https://github.com/python-cmd2/cmd2/blob/main/examples/paged_output.py)
14191419
- Attributes Removed (**can cause breaking changes**)
14201420
- `abbrev` - Removed support for abbreviated commands
14211421
- Good tab completion makes this unnecessary and its presence could cause harmful unintended
@@ -1442,13 +1442,13 @@
14421442
- See the [Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html)
14431443
section of the documentation for more information on these decorators
14441444
- Alternatively, see the
1445-
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/master/examples/argparse_example.py)
1446-
and [arg_print.py](https://github.com/python-cmd2/cmd2/blob/master/examples/arg_print.py)
1445+
[argparse_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/argparse_example.py)
1446+
and [arg_print.py](https://github.com/python-cmd2/cmd2/blob/main/examples/arg_print.py)
14471447
examples
14481448
- Added support for Argparse subcommands when using the **with_argument_parser** or \*
14491449
\*with_argparser_and_unknown_args\*\* decorators
14501450
- See
1451-
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/master/examples/subcommands.py)
1451+
[subcommands.py](https://github.com/python-cmd2/cmd2/blob/main/examples/subcommands.py)
14521452
for an example of how to use subcommands
14531453
- Tab completion of subcommand names is automatically supported
14541454
- The **\_\_relative_load** command is now hidden from the help menu by default

0 commit comments

Comments
 (0)