Skip to content

Commit

Permalink
chore: rename default branch to main (#6071)
Browse files Browse the repository at this point in the history
* chore: rename default branch to main

* Rename new master references
  • Loading branch information
billyjacobson committed May 10, 2021
1 parent 73ff44e commit e483b4d
Show file tree
Hide file tree
Showing 24 changed files with 59 additions and 59 deletions.
16 changes: 8 additions & 8 deletions ARCHITECTURE.md
Expand Up @@ -203,14 +203,14 @@ options it accepts should also call
[`google::cloud::internal::CheckExpectedOptions<...>(...)`][check-expected-example-link]
in order to help users diagnose option-related issues in their code.

[spanner-connection-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/spanner/connection_options.h
[query-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/spanner/query_options.h
[client-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/storage/client_options.h
[common-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/common_options.h
[grpc-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/grpc_options.h
[spanner-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/spanner/options.h
[options-link]: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/options.h
[spanner-defaults-link]: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/spanner/internal/defaults.h
[spanner-connection-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/spanner/connection_options.h
[query-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/spanner/query_options.h
[client-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/storage/client_options.h
[common-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/common_options.h
[grpc-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/grpc_options.h
[spanner-options-link]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/spanner/options.h
[options-link]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/options.h
[spanner-defaults-link]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/spanner/internal/defaults.h
[check-expected-example-link]: https://github.com/googleapis/google-cloud-cpp/blob/6bd0fae69af98939a1ba4fedea7bb20366ad15d9/google/cloud/spanner/client.cc#L358-L360

## Deviations from the "normal" Architecture
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Expand Up @@ -136,10 +136,10 @@ option(GOOGLE_CLOUD_CPP_GEN_DOCS_FOR_GOOGLEAPIS_DEV
"Use relative URLs in docs for googleapis.dev" OFF)
mark_as_advanced(GOOGLE_CLOUD_CPP_GEN_DOCS_FOR_GOOGLEAPIS_DEV)

# Use master as the version part of the relative URLs.
option(GOOGLE_CLOUD_CPP_USE_MASTER_FOR_REFDOC_LINKS
"Use master as the version part for refdoc relative links" OFF)
mark_as_advanced(GOOGLE_CLOUD_CPP_USE_MASTER_FOR_REFDOC_LINKS)
# Use main as the version part of the relative URLs.
option(GOOGLE_CLOUD_CPP_USE_MAIN_FOR_REFDOC_LINKS
"Use main as the version part for refdoc relative links" OFF)
mark_as_advanced(GOOGLE_CLOUD_CPP_USE_MAIN_FOR_REFDOC_LINKS)

set(PROJECT_THIRD_PARTY_DIR "${PROJECT_SOURCE_DIR}/third_party")

Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -18,7 +18,7 @@
[kokoro-macos-cmake-link]: https://storage.googleapis.com/cloud-cpp-kokoro-status/macos/kokoro-cmake-super-link.html
[kokoro-macos-bazel-shield]: https://storage.googleapis.com/cloud-cpp-kokoro-status/macos/kokoro-bazel.svg
[kokoro-macos-bazel-link]: https://storage.googleapis.com/cloud-cpp-kokoro-status/macos/kokoro-bazel-link.html
[codecov-shield]: https://codecov.io/gh/googleapis/google-cloud-cpp/branch/master/graph/badge.svg
[codecov-shield]: https://codecov.io/gh/googleapis/google-cloud-cpp/branch/main/graph/badge.svg
[codecov-link]: https://codecov.io/gh/googleapis/google-cloud-cpp
[gcb-clang-tidy-shield]: https://storage.googleapis.com/cloud-cpp-community-publiclogs/badges/google-cloud-cpp/main/clang-tidy.svg
[gcb-clang-tidy-link]: https://storage.googleapis.com/cloud-cpp-community-publiclogs/badges/google-cloud-cpp/main/clang-tidy.html
Expand Down Expand Up @@ -156,7 +156,7 @@ int main(int argc, char* argv[]) {
* This project supports Windows, macOS, Linux
* This project supports C++11 (and higher) compilers (we test with GCC \>= 5.4, Clang >= 3.8, and MSVC \>= 2019)
* This project supports Bazel and CMake builds. See the [Quickstart examples](https://github.com/googleapis/google-cloud-cpp#quickstart)
* This project uses dependencies described in [doc/packaging.md](https://github.com/googleapis/google-cloud-cpp/blob/master/doc/packaging.md)
* This project uses dependencies described in [doc/packaging.md](https://github.com/googleapis/google-cloud-cpp/blob/main/doc/packaging.md)
* This project works with or without exceptions enabled
* This project cuts [monthly releases](https://github.com/googleapis/google-cloud-cpp/releases) with detailed release notes
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/builds/cmake-super.sh
Expand Up @@ -29,4 +29,4 @@ cmake -GNinja \
-Hsuper -Bcmake-out
cmake --build cmake-out
# Testing is automatically done by the super build itself. See
# https://github.com/googleapis/google-cloud-cpp/blob/master/super/CMakeLists.txt
# https://github.com/googleapis/google-cloud-cpp/blob/main/super/CMakeLists.txt
2 changes: 1 addition & 1 deletion ci/coverity-scan.sh
Expand Up @@ -57,6 +57,6 @@ tar caf google-cloud-cpp.tar.xz cov-int
curl --form "token=${COVERITY_SCAN_TOKEN}" \
--form email="${COVERITY_SCAN_EMAIL}" \
--form file=@google-cloud-cpp.tar.xz \
--form version="master" \
--form version="main" \
--form description="Automatically Compiled Coverity Scan" \
https://scan.coverity.com/builds?project=googleapis%2Fgoogle-cloud-cpp
2 changes: 1 addition & 1 deletion ci/generate-markdown/generate-bigtable-readme.sh
Expand Up @@ -49,7 +49,7 @@ Please note that the Google Cloud C++ client libraries do **not** follow
[doxygen-link]: https://googleapis.dev/cpp/google-cloud-bigtable/latest/
[cloud-bigtable-docs]: https://cloud.google.com/bigtable/docs/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/bigtable
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/bigtable
## Quickstart
Expand Down
2 changes: 1 addition & 1 deletion ci/generate-markdown/generate-pubsub-readme.sh
Expand Up @@ -49,7 +49,7 @@ Please note that the Google Cloud C++ client libraries do **not** follow
[doxygen-link]: https://googleapis.dev/cpp/google-cloud-pubsub/latest/
[cloud-spanner-docs]: https://cloud.google.com/pubsub/docs/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/pubsub
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/pubsub
## Quickstart
Expand Down
4 changes: 2 additions & 2 deletions ci/generate-markdown/generate-readme.sh
Expand Up @@ -43,7 +43,7 @@ cat <<"EOF"
[kokoro-macos-cmake-link]: https://storage.googleapis.com/cloud-cpp-kokoro-status/macos/kokoro-cmake-super-link.html
[kokoro-macos-bazel-shield]: https://storage.googleapis.com/cloud-cpp-kokoro-status/macos/kokoro-bazel.svg
[kokoro-macos-bazel-link]: https://storage.googleapis.com/cloud-cpp-kokoro-status/macos/kokoro-bazel-link.html
[codecov-shield]: https://codecov.io/gh/googleapis/google-cloud-cpp/branch/master/graph/badge.svg
[codecov-shield]: https://codecov.io/gh/googleapis/google-cloud-cpp/branch/main/graph/badge.svg
[codecov-link]: https://codecov.io/gh/googleapis/google-cloud-cpp
[gcb-clang-tidy-shield]: https://storage.googleapis.com/cloud-cpp-community-publiclogs/badges/google-cloud-cpp/main/clang-tidy.svg
[gcb-clang-tidy-link]: https://storage.googleapis.com/cloud-cpp-community-publiclogs/badges/google-cloud-cpp/main/clang-tidy.html
Expand Down Expand Up @@ -142,7 +142,7 @@ cat <<"EOF"
* This project supports Windows, macOS, Linux
* This project supports C++11 (and higher) compilers (we test with GCC \>= 5.4, Clang >= 3.8, and MSVC \>= 2019)
* This project supports Bazel and CMake builds. See the [Quickstart examples](https://github.com/googleapis/google-cloud-cpp#quickstart)
* This project uses dependencies described in [doc/packaging.md](https://github.com/googleapis/google-cloud-cpp/blob/master/doc/packaging.md)
* This project uses dependencies described in [doc/packaging.md](https://github.com/googleapis/google-cloud-cpp/blob/main/doc/packaging.md)
* This project works with or without exceptions enabled
* This project cuts [monthly releases](https://github.com/googleapis/google-cloud-cpp/releases) with detailed release notes
Expand Down
2 changes: 1 addition & 1 deletion ci/generate-markdown/generate-spanner-readme.sh
Expand Up @@ -49,7 +49,7 @@ Please note that the Google Cloud C++ client libraries do **not** follow
[doxygen-link]: https://googleapis.dev/cpp/google-cloud-spanner/latest/
[cloud-spanner-docs]: https://cloud.google.com/spanner/docs/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/spanner
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/spanner
## Quickstart
Expand Down
2 changes: 1 addition & 1 deletion ci/generate-markdown/generate-storage-readme.sh
Expand Up @@ -52,7 +52,7 @@ Please note that the Google Cloud C++ client libraries do **not** follow
[doxygen-link]: https://googleapis.dev/cpp/google-cloud-storage/latest/
[cloud-storage-docs]: https://cloud.google.com/storage/docs/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/storage
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/storage
## Quickstart
Expand Down
2 changes: 1 addition & 1 deletion ci/kokoro/README.md
Expand Up @@ -62,7 +62,7 @@ little bit, we cache these images in Google Container Registry (GCR). Builds
triggered by GitHub pull requests download the cached image, then use that cache
to rebuild the image (which usually results in "nothing to rebuild") and then
run the build using the newly created image. Builds triggered by GitHub commits
to a branch (typically `master` or a release branch) only use the cache if
to a branch (typically `main` or a release branch) only use the cache if
rebuilding the image from scratch fails. Such builds also push new versions of
the cached image to GCR.

Expand Down
2 changes: 1 addition & 1 deletion ci/kokoro/macos/build.sh
Expand Up @@ -136,7 +136,7 @@ rm -f "${GRPC_DEFAULT_SSL_ROOTS_FILE_PATH}"
curl -sSL --retry 10 -o "${GRPC_DEFAULT_SSL_ROOTS_FILE_PATH}" \
https://pki.google.com/roots.pem

BRANCH="${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH:-master}"
BRANCH="${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH:-main}"
readonly BRANCH
echo "================================================================"
io::log_yellow "detected the branch name: ${BRANCH}."
Expand Down
2 changes: 1 addition & 1 deletion ci/kokoro/windows/build.ps1
Expand Up @@ -50,7 +50,7 @@ the KOKORO_JOB_NAME environment variable.
# TODO(#4896): Enable generator integration tests for windows.
$env:GOOGLE_CLOUD_CPP_GENERATOR_RUN_INTEGRATION_TESTS = "no"

$env:BUILD_CACHE = "gs://cloud-cpp-kokoro-results/build-cache/google-cloud-cpp/master/vcpkg-binary-cache/windows/${BuildName}/"
$env:BUILD_CACHE = "gs://cloud-cpp-kokoro-results/build-cache/google-cloud-cpp/main/vcpkg-binary-cache/windows/${BuildName}/"
$DependencyScriptArgs=@()
if (($BuildName -eq "cmake") -or ($BuildName -eq "cmake-debug")) {
$env:CONFIG = "Debug"
Expand Down
4 changes: 2 additions & 2 deletions doc/adr/2019-01-04-error-reporting-with-statusor.md
Expand Up @@ -31,7 +31,7 @@ no immediate plans to change the API for Cloud Bigtable. We will communicate a
timeline to change this API in a separate document.

[badbit-link]: https://en.cppreference.com/w/cpp/io/ios_base/iostate
[gcs-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/storage
[bigtable-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/bigtable
[gcs-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/storage
[bigtable-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/bigtable
[survey-link]: https://isocpp.org/blog/2018/03/results-summary-cpp-foundation-developer-survey-lite-2018-02

16 changes: 8 additions & 8 deletions doc/contributor/howto-guide-forks-and-pull-requests.md
Expand Up @@ -37,13 +37,13 @@ To pull new commits from `upstream` into your local repo and
[sync your fork][syncing-a-fork] you can do the following:

```console
git checkout master
git pull --ff-only upstream master
git checkout main
git pull --ff-only upstream main
git push # Pushes new commits up to your fork on GitHub
```

> :attention: you probably want to do this periodically, and almost certainly
> before starting any new branches. Keeping your default branch (aka `master`)
> before starting any new branches. Keeping your default branch (aka `main`)
> in sync is important to make your pull requests easy to review.
## Preparing to make a pull requests
Expand All @@ -55,7 +55,7 @@ change for review you need to create a pull request. Typically you start by:
1. Picking an existing [GitHub bug][mastering-issues] to work on.
1. Create a new [branch][about-branches] for each feature (or bug fix).
```console
git checkout master
git checkout main
git checkout -b my-feature-branch
git push -u origin my-feature-branch # Tells fork on GitHub about new branch
# make your changes
Expand All @@ -71,15 +71,15 @@ change for review you need to create a pull request. Typically you start by:
### Resolving Conflicts and Rebasing

From time to time your pull request may have conflicts with the destination
branch (likely `master`). If so, we request that you [rebase][about-rebase]
branch (likely `main`). If so, we request that you [rebase][about-rebase]
your branch instead of merging. The reviews can become very confusing if you
merge during a pull request. You should first ensure that your `master`
merge during a pull request. You should first ensure that your `main`
branch has all the latest commits by syncing your fork (see above), then do
the following:

```shell
git checkout my-feature-branch
git rebase master
git rebase main
git push --force-with-lease
```

Expand Down Expand Up @@ -108,7 +108,7 @@ ci/cloudbuild/build.sh -t asan-pr --docker
## Merging the changes

Eventually the reviewers accept your changes, and they are merged into the
`master` branch. We use "squash commits", where all your commits become a single
`main` branch. We use "squash commits", where all your commits become a single
commit into the default branch. A project owner needs to merge your changes,
if you are a project owner, the expectation is that you will perform the merge
operation, and update the commit comments to something readable.
Expand Down
Expand Up @@ -38,7 +38,7 @@ install additional tools to run the unit and integration tests.

These instructions will describe how to install these tools for Ubuntu 18.04
(Bionic Beaver). For other distributions you may consult the Dockerfiles in
[ci/cloudbuild/dockerfiles/](https://github.com/googleapis/google-cloud-cpp/tree/master/ci/cloudbuild/dockerfiles)
[ci/cloudbuild/dockerfiles/](https://github.com/googleapis/google-cloud-cpp/tree/main/ci/cloudbuild/dockerfiles)
If you use a different distribution, you will need to use the corresponding
package manager (`dnf`, `zypper`, `apk`, etc.) and find the corresponding
package names.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/README.md
Expand Up @@ -30,7 +30,7 @@ notice. These include `google/cloud/internal/`, and
* Detailed header comments in our [public `.h`][source-link] files

[doxygen-link]: https://googleapis.dev/cpp/google-cloud-common/latest/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud

## Contributing changes

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/bigtable/README.md
Expand Up @@ -25,7 +25,7 @@ Please note that the Google Cloud C++ client libraries do **not** follow

[doxygen-link]: https://googleapis.dev/cpp/google-cloud-bigtable/latest/
[cloud-bigtable-docs]: https://cloud.google.com/bigtable/docs/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/bigtable
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/bigtable

## Quickstart

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/pubsub/README.md
Expand Up @@ -25,7 +25,7 @@ Please note that the Google Cloud C++ client libraries do **not** follow

[doxygen-link]: https://googleapis.dev/cpp/google-cloud-pubsub/latest/
[cloud-spanner-docs]: https://cloud.google.com/pubsub/docs/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/pubsub
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/pubsub

## Quickstart

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/spanner/README.md
Expand Up @@ -25,7 +25,7 @@ Please note that the Google Cloud C++ client libraries do **not** follow

[doxygen-link]: https://googleapis.dev/cpp/google-cloud-spanner/latest/
[cloud-spanner-docs]: https://cloud.google.com/spanner/docs/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/spanner
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/spanner

## Quickstart

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/spanner/options.cc
Expand Up @@ -22,7 +22,7 @@ inline namespace SPANNER_CLIENT_NS {
// This empty .cc file eliminated false positive errors from clang-tidy in our
// presubmit CI. Not exactly sure why, but I was able to reproduce the error
// locally with:
// $ KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH=master
// $ KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH=main
// KOKORO_JOB_TYPE=PRESUBMIT_GITHUB
// ./ci/kokoro/docker/build.sh clang-tidy

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/storage/README.md
Expand Up @@ -28,7 +28,7 @@ Please note that the Google Cloud C++ client libraries do **not** follow

[doxygen-link]: https://googleapis.dev/cpp/google-cloud-storage/latest/
[cloud-storage-docs]: https://cloud.google.com/storage/docs/
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/master/google/cloud/storage
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/storage

## Quickstart

Expand Down

0 comments on commit e483b4d

Please sign in to comment.