Replace master with main in URLs & docs
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index c5d4e28..f9411a6 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -16,7 +16,7 @@
-->
**What version of protobuf and what language are you using?**
-Version: master/v3.6.0/v3.5.0 etc.
+Version: main/v3.6.0/v3.5.0 etc.
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript
**What operating system (Linux, Windows, ...) and version?**
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8ef5dd2..a16d63c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -53,11 +53,11 @@
## Contributing Process
-Most pull requests should go to the master branch and the change will be
+Most pull requests should go to the main branch and the change will be
included in the next major/minor version release (e.g., 3.6.0 release). If you
need to include a bug fix in a patch release (e.g., 3.5.2), make sure it’s
-already merged to master, and then create a pull request cherry-picking the
-commits from master branch to the release branch (e.g., branch 3.5.x).
+already merged to main, and then create a pull request cherry-picking the
+commits from main branch to the release branch (e.g., branch 3.5.x).
For each pull request, a protobuf team member will be assigned to review the
pull request. For minor cleanups, the pull request may be merged right away
@@ -96,9 +96,9 @@
of inactivity.
* Maintain clean commit history and use meaningful commit messages. PRs with
messy commit history are difficult to review and won't be merged. Use rebase
- -i upstream/master to curate your commit history and/or to bring in latest
- changes from master (but avoid rebasing in the middle of a code review).
-* Keep your PR up to date with upstream/master (if there are merge conflicts,
+ -i upstream/main to curate your commit history and/or to bring in latest
+ changes from main (but avoid rebasing in the middle of a code review).
+* Keep your PR up to date with upstream/main (if there are merge conflicts,
we can't really merge your change).
* All tests need to be passing before your change can be merged. We recommend
you run tests locally before creating your PR to catch breakages early on.
diff --git a/README.md b/README.md
index 618dc2a..fe3430b 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
[https://repo1.maven.org/maven2/com/google/protobuf/protoc/](https://repo1.maven.org/maven2/com/google/protobuf/protoc/)
These pre-built binaries are only provided for released versions. If you want
-to use the github master version at HEAD, or you need to modify protobuf code,
+to use the github main version at HEAD, or you need to modify protobuf code,
or you are using C++, it's recommended to build your own protoc binary from
source.
diff --git a/benchmarks/README.md b/benchmarks/README.md
index 19a26e1..70c3596 100644
--- a/benchmarks/README.md
+++ b/benchmarks/README.md
@@ -5,7 +5,7 @@
can use to test a variety of performance scenarios against your
protobuf language runtime. If you are looking for performance
numbers of officially supported languages, see [Protobuf Performance](
-https://github.com/protocolbuffers/protobuf/blob/master/docs/performance.md).
+https://github.com/protocolbuffers/protobuf/blob/main/docs/performance.md).
## Prerequisite
@@ -61,7 +61,7 @@
include PHP protobuf's src and build the c extension if required.
### Node.js
-Node.js benchmark need [node](https://nodejs.org/en/)(higher than V6) and [npm](https://www.npmjs.com/) package manager installed. This benchmark is using the [benchmark](https://www.npmjs.com/package/benchmark) framework to test, which needn't to manually install. And another prerequisite is [protobuf js](https://github.com/protocolbuffers/protobuf/tree/master/js), which needn't to manually install either
+Node.js benchmark need [node](https://nodejs.org/en/)(higher than V6) and [npm](https://www.npmjs.com/) package manager installed. This benchmark is using the [benchmark](https://www.npmjs.com/package/benchmark) framework to test, which needn't to manually install. And another prerequisite is [protobuf js](https://github.com/protocolbuffers/protobuf/tree/main/js), which needn't to manually install either
### C#
The C# benchmark code is built as part of the main Google.Protobuf
diff --git a/cmake/README.md b/cmake/README.md
index 3fee4a0..ce3e680 100644
--- a/cmake/README.md
+++ b/cmake/README.md
@@ -59,7 +59,7 @@
C:\Path\to> mkdir src & cd src
C:\Path\to\src> git clone -b [release_tag] https://github.com/protocolbuffers/protobuf.git
-Where *[release_tag]* is a git tag like *v3.0.0-beta-1* or a branch name like *master*
+Where *[release_tag]* is a git tag like *v3.0.0-beta-1* or a branch name like *main*
if you want to get the latest code.
Go to the project folder:
diff --git a/conformance/README.md b/conformance/README.md
index 06925db..0637660 100644
--- a/conformance/README.md
+++ b/conformance/README.md
@@ -57,10 +57,10 @@
To run these tests against a new Protocol Buffers implementation, write a
program in your language that uses the protobuf implementation you want
to test. This program should implement the testing protocol defined in
-[conformance.proto](https://github.com/protocolbuffers/protobuf/blob/master/conformance/conformance.proto).
+[conformance.proto](https://github.com/protocolbuffers/protobuf/blob/main/conformance/conformance.proto).
This is designed to be as easy as possible: the C++ version is only
150 lines and is a good example for what this program should look like
-(see [conformance_cpp.cc](https://github.com/protocolbuffers/protobuf/blob/master/conformance/conformance_cpp.cc)).
+(see [conformance_cpp.cc](https://github.com/protocolbuffers/protobuf/blob/main/conformance/conformance_cpp.cc)).
The program only needs to be able to read from stdin and write to stdout.
Portability
diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec
index 0608169..29b698e 100644
--- a/csharp/Google.Protobuf.Tools.nuspec
+++ b/csharp/Google.Protobuf.Tools.nuspec
@@ -8,7 +8,7 @@
<version>3.20.1-rc1</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
- <licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>
+ <licenseUrl>https://github.com/protocolbuffers/protobuf/blob/main/LICENSE</licenseUrl>
<projectUrl>https://github.com/protocolbuffers/protobuf</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes>Tools for Protocol Buffers</releaseNotes>
diff --git a/csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs b/csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs
index 132967e..40fb3ba 100644
--- a/csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs
+++ b/csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs
@@ -41,8 +41,8 @@
/// Benchmark for serializing and deserializing of standard datasets that are also
/// measured by benchmarks in other languages.
/// Over time we may wish to test the various different approaches to serialization and deserialization separately.
- /// See https://github.com/protocolbuffers/protobuf/blob/master/benchmarks/README.md
- /// See https://github.com/protocolbuffers/protobuf/blob/master/docs/performance.md
+ /// See https://github.com/protocolbuffers/protobuf/blob/main/benchmarks/README.md
+ /// See https://github.com/protocolbuffers/protobuf/blob/main/docs/performance.md
/// </summary>
[MemoryDiagnoser]
public class GoogleMessageBenchmark
diff --git a/docs/implementing_proto3_presence.md b/docs/implementing_proto3_presence.md
index ae8b369..7c3e213 100644
--- a/docs/implementing_proto3_presence.md
+++ b/docs/implementing_proto3_presence.md
@@ -30,7 +30,7 @@
inside Google and [from open-source
users](https://github.com/protocolbuffers/protobuf/issues/1606). The [proto3
wrapper
-types](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto)
+types](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/wrappers.proto)
were previously the only supported presence mechanism for proto3. Users have
pointed to both efficiency and usability issues with the wrapper types.
diff --git a/docs/jvm_aot.md b/docs/jvm_aot.md
index 4eb682f..304c829 100644
--- a/docs/jvm_aot.md
+++ b/docs/jvm_aot.md
@@ -4,7 +4,7 @@
Protobuf for the JVM uses reflection and some of its target classes are not possible to determine in advance.
Historically, there were good reasons to use reflection based on APIs that were published effectively requiring them, and this situation is unlikely to change.
-[The Lite version of protobuf for the JVM](https://github.com/protocolbuffers/protobuf/blob/master/java/lite.md)
+[The Lite version of protobuf for the JVM](https://github.com/protocolbuffers/protobuf/blob/main/java/lite.md)
avoids reflection and may be better suited for use with AOT compilation tooling. This Lite version was originally targeted for use on Android which has similar AOT compilation
goals as GraalVM's native-image tool.
diff --git a/docs/performance.md b/docs/performance.md
index 8734c70..245fdf1 100644
--- a/docs/performance.md
+++ b/docs/performance.md
@@ -301,4 +301,4 @@
</tr>
</tbody></table>
-\* The cpp performance can be improved by using [tcmalloc](https://gperftools.github.io/gperftools/tcmalloc.html), please follow the (instruction)[https://github.com/protocolbuffers/protobuf/blob/master/benchmarks/README.md] to link with tcmalloc to get the faster result.
+\* The cpp performance can be improved by using [tcmalloc](https://gperftools.github.io/gperftools/tcmalloc.html), please follow the (instruction)[https://github.com/protocolbuffers/protobuf/blob/main/benchmarks/README.md] to link with tcmalloc to get the faster result.
diff --git a/examples/WORKSPACE b/examples/WORKSPACE
index fb36639..3897572 100644
--- a/examples/WORKSPACE
+++ b/examples/WORKSPACE
@@ -10,8 +10,8 @@
#
# http_archive(
# name = "com_google_protobuf",
-# strip_prefix = "protobuf-master",
-# urls = ["https://github.com/protocolbuffers/protobuf/archive/master.zip"],
+# strip_prefix = "protobuf-main",
+# urls = ["https://github.com/protocolbuffers/protobuf/archive/main.zip"],
# )
local_repository(
name = "com_google_protobuf",
diff --git a/java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java b/java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java
index 6090985..b856952 100644
--- a/java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java
+++ b/java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java
@@ -150,7 +150,7 @@
* <p>This class is thread-safe.
*/
// <p>The code is adapted from the C++ implementation:
- // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/compiler/java/java_helpers.h
+ // https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/compiler/java/java_helpers.h
static class IsInitializedCheckAnalyzer {
private final Map<Descriptor, Boolean> resultCache =
diff --git a/js/README.md b/js/README.md
index 6169700..f700237 100644
--- a/js/README.md
+++ b/js/README.md
@@ -35,7 +35,7 @@
If you want, you can compile `protoc` from source instead. To do this
follow the instructions in [the top-level
-README](https://github.com/protocolbuffers/protobuf/blob/master/src/README.md).
+README](https://github.com/protocolbuffers/protobuf/blob/main/src/README.md).
Once you have `protoc` compiled, you can run the tests provided along with our project to examine whether it can run successfully. In order to do this, you should download the Protocol Buffer source code from the release page with the link above. Then extract the source code and navigate to the folder named `js` containing a `package.json` file and a series of test files. In this folder, you can run the commands below to run the tests automatically.
@@ -129,7 +129,7 @@
Where `OPTIONS` are separated by commas. Options are either `opt=val` or
just `opt` (for options that don't take a value). The available options
are specified and documented in the `GeneratorOptions` struct in
-[src/google/protobuf/compiler/js/js_generator.h](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/compiler/js/js_generator.h#L53).
+[src/google/protobuf/compiler/js/js_generator.h](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/compiler/js/js_generator.h#L53).
Some examples:
diff --git a/js/package.json b/js/package.json
index eaa973f..555d057 100644
--- a/js/package.json
+++ b/js/package.json
@@ -20,7 +20,7 @@
},
"repository": {
"type": "git",
- "url": "https://github.com/protocolbuffers/protobuf/tree/master/js"
+ "url": "https://github.com/protocolbuffers/protobuf/tree/main/js"
},
"author": "Google Protocol Buffers Team",
"license": "BSD-3-Clause"
diff --git a/kokoro/docs/publish-python.sh b/kokoro/docs/publish-python.sh
index 457a24f..e6caf2d 100755
--- a/kokoro/docs/publish-python.sh
+++ b/kokoro/docs/publish-python.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Adapted from https://github.com/googleapis/google-cloud-python/blob/master/.kokoro/publish-docs.sh
+# Adapted from https://github.com/googleapis/google-cloud-python/blob/main/.kokoro/publish-docs.sh
set -eo pipefail
diff --git a/kokoro/docs/trampoline.sh b/kokoro/docs/trampoline.sh
index db7e90b..4cb78a5 100755
--- a/kokoro/docs/trampoline.sh
+++ b/kokoro/docs/trampoline.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copied from https://github.com/googleapis/google-cloud-python/blob/master/.kokoro/trampoline.sh
+# Copied from https://github.com/googleapis/google-cloud-python/blob/main/.kokoro/trampoline.sh
set -eo pipefail
diff --git a/objectivec/GPBCodedInputStream.m b/objectivec/GPBCodedInputStream.m
index 1864d91..c459391 100644
--- a/objectivec/GPBCodedInputStream.m
+++ b/objectivec/GPBCodedInputStream.m
@@ -46,9 +46,9 @@
GPBNSStringifySymbol(GPBCodedInputStreamErrorDomain);
// Matching:
-// https://github.com/protocolbuffers/protobuf/blob/master/java/core/src/main/java/com/google/protobuf/CodedInputStream.java#L62
+// https://github.com/protocolbuffers/protobuf/blob/main/java/core/src/main/java/com/google/protobuf/CodedInputStream.java#L62
// private static final int DEFAULT_RECURSION_LIMIT = 100;
-// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/io/coded_stream.cc#L86
+// https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/io/coded_stream.cc#L86
// int CodedInputStream::default_recursion_limit_ = 100;
static const NSUInteger kDefaultRecursionLimit = 100;
diff --git a/python/docs/generate_docs.py b/python/docs/generate_docs.py
index e024aaa..6b38398 100755
--- a/python/docs/generate_docs.py
+++ b/python/docs/generate_docs.py
@@ -111,7 +111,7 @@
.. warning::
You are reading the documentation for the `latest committed changes
- <https://github.com/protocolbuffers/protobuf/tree/master/python>`_ of
+ <https://github.com/protocolbuffers/protobuf/tree/main/python>`_ of
the `Protocol Buffers package for Python
<https://developers.google.com/protocol-buffers/docs/pythontutorial>`_.
Some features may not yet be released. Read the documentation for the
diff --git a/src/google/protobuf/compiler/annotation_test_util.h b/src/google/protobuf/compiler/annotation_test_util.h
index 551f224..b7c6ddd 100644
--- a/src/google/protobuf/compiler/annotation_test_util.h
+++ b/src/google/protobuf/compiler/annotation_test_util.h
@@ -78,7 +78,7 @@
bool DecodeMetadata(const std::string& path, GeneratedCodeInfo* info);
// Finds all of the Annotations for a given source file and path.
-// See Location.path in https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto for
+// See Location.path in https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto for
// explanation of what path vector is.
void FindAnnotationsOnPath(
const GeneratedCodeInfo& info, const std::string& source_file,
@@ -88,7 +88,7 @@
// Finds the Annotation for a given source file and path (or returns null if it
// couldn't). If there are several annotations for given path, returns the first
// one. See Location.path in
-// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto for explanation of what path
+// https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto for explanation of what path
// vector is.
const GeneratedCodeInfo::Annotation* FindAnnotationOnPath(
const GeneratedCodeInfo& info, const std::string& source_file,
diff --git a/src/google/protobuf/compiler/java/file.cc b/src/google/protobuf/compiler/java/file.cc
index 4bac87a..cf27703 100644
--- a/src/google/protobuf/compiler/java/file.cc
+++ b/src/google/protobuf/compiler/java/file.cc
@@ -250,7 +250,7 @@
<< "generate full runtime code for Java. To use Java Lite runtime, "
<< "users should use the Java Lite plugin instead. See:\n"
<< " "
- "https://github.com/protocolbuffers/protobuf/blob/master/java/"
+ "https://github.com/protocolbuffers/protobuf/blob/main/java/"
"lite.md";
}
return true;
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.cc b/src/google/protobuf/util/internal/protostream_objectwriter.cc
index 3e54b1c..ecb219e 100644
--- a/src/google/protobuf/util/internal/protostream_objectwriter.cc
+++ b/src/google/protobuf/util/internal/protostream_objectwriter.cc
@@ -503,7 +503,7 @@
// stream, we write those values.
if (master_type_.name() == kStructType) {
// Struct has a map<string, Value> field called "fields".
- // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto
+ // https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto
// "fields": [
Push("fields", Item::MAP, true, true);
return this;
@@ -514,7 +514,7 @@
// object within that type is a struct type. So start a struct.
//
// The struct field in Value type is named "struct_value"
- // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto
+ // https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto
// Also start the map field "fields" within the struct.
// "struct_value": {
// "fields": [
@@ -703,7 +703,7 @@
// we have to start the "list_value" within google.protobuf.Value.
//
// See
- // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto
+ // https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto
//
// Render
// "<name>": {