diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c5d4e2891b..f9411a6062 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -16,7 +16,7 @@ Stack Overflow is also a useful if unofficial resource https://stackoverflow.com --> **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 8ef5dd29c8..a16d63c65f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,11 +53,11 @@ conforming. ## 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 @@ the final release. 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 618dc2a775..fe3430b92d 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ page, check out the maven repo here: [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 19a26e1f32..70c359660b 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -5,7 +5,7 @@ This directory contains benchmarking schemas and data sets that you 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 @@ PHP benchmark's requirement is the same as PHP protobuf's requirements. The benc 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 3fee4a0414..ce3e680234 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -59,7 +59,7 @@ Or you can use git to clone from protobuf git repository. 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 06925dbb55..063766060c 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -57,10 +57,10 @@ Testing other Protocol Buffer implementations 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 06081690fe..29b698e182 100644 --- a/csharp/Google.Protobuf.Tools.nuspec +++ b/csharp/Google.Protobuf.Tools.nuspec @@ -8,7 +8,7 @@ 3.20.1-rc1 Google Inc. protobuf-packages - https://github.com/protocolbuffers/protobuf/blob/master/LICENSE + https://github.com/protocolbuffers/protobuf/blob/main/LICENSE https://github.com/protocolbuffers/protobuf false Tools for Protocol Buffers diff --git a/csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs b/csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs index 132967e00a..40fb3bab29 100644 --- a/csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs +++ b/csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs @@ -41,8 +41,8 @@ namespace Google.Protobuf.Benchmarks /// 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 /// [MemoryDiagnoser] public class GoogleMessageBenchmark diff --git a/docs/implementing_proto3_presence.md b/docs/implementing_proto3_presence.md index ae8b369579..7c3e21339a 100644 --- a/docs/implementing_proto3_presence.md +++ b/docs/implementing_proto3_presence.md @@ -30,7 +30,7 @@ Presence tracking was added to proto3 in response to user feedback, both from 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 4eb682f54b..304c82961c 100644 --- a/docs/jvm_aot.md +++ b/docs/jvm_aot.md @@ -4,7 +4,7 @@ Ahead Of Time (AOT) compilation build tools such as those provided by [GraalVM's 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 8734c700c1..245fdf1450 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -301,4 +301,4 @@ This table contains the results of three separate languages: -\* 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 fb36639ae8..3897572a23 100644 --- a/examples/WORKSPACE +++ b/examples/WORKSPACE @@ -10,8 +10,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # # 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 6090985e18..b856952c73 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 @@ final class DescriptorMessageInfoFactory implements MessageInfoFactory { *

This class is thread-safe. */ //

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 resultCache = diff --git a/js/README.md b/js/README.md index 6169700301..f700237b38 100644 --- a/js/README.md +++ b/js/README.md @@ -35,7 +35,7 @@ a pre-built binary from [https://github.com/protocolbuffers/protobuf/releases](h 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 @@ The syntax of the `--js_out` flag is: 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 eaa973fa7a..555d057607 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 457a24f176..e6caf2df92 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 db7e90b2e8..4cb78a564a 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 1864d91274..c459391e08 100644 --- a/objectivec/GPBCodedInputStream.m +++ b/objectivec/GPBCodedInputStream.m @@ -46,9 +46,9 @@ NSString *const GPBCodedInputStreamErrorDomain = 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 e024aaa479..6b38398fe1 100755 --- a/python/docs/generate_docs.py +++ b/python/docs/generate_docs.py @@ -111,7 +111,7 @@ AUTOMODULE_TEMPLATE = """.. DO NOT EDIT, generated by generate_docs.py. .. warning:: You are reading the documentation for the `latest committed changes - `_ of + `_ of the `Protocol Buffers package for Python `_. 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 551f2244c5..b7c6ddd319 100644 --- a/src/google/protobuf/compiler/annotation_test_util.h +++ b/src/google/protobuf/compiler/annotation_test_util.h @@ -78,7 +78,7 @@ bool RunProtoCompiler(const std::string& filename, 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 @@ void FindAnnotationsOnPath( // 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 4bac87a32b..cf2770344c 100644 --- a/src/google/protobuf/compiler/java/file.cc +++ b/src/google/protobuf/compiler/java/file.cc @@ -250,7 +250,7 @@ bool FileGenerator::Validate(std::string* error) { << "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 3e54b1cc9a..ecb219e06e 100644 --- a/src/google/protobuf/util/internal/protostream_objectwriter.cc +++ b/src/google/protobuf/util/internal/protostream_objectwriter.cc @@ -503,7 +503,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartObject( // stream, we write those values. if (master_type_.name() == kStructType) { // Struct has a map 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 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartObject( // 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 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartList( // 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 // "": {