Replace master with main in URLs & docs

This commit is contained in:
noahdietz 2022-04-12 10:25:08 -07:00
parent a85bbad379
commit 5abf802bc2
22 changed files with 36 additions and 36 deletions

View File

@ -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?**

View File

@ -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 its
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.

View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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>

View File

@ -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
/// </summary>
[MemoryDiagnoser]
public class GoogleMessageBenchmark

View File

@ -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.

View File

@ -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.

View File

@ -301,4 +301,4 @@ This table contains the results of three separate languages:
</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.

View File

@ -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",

View File

@ -150,7 +150,7 @@ final class DescriptorMessageInfoFactory implements MessageInfoFactory {
* <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 =

View File

@ -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:

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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
<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

View File

@ -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,

View File

@ -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;

View File

@ -503,7 +503,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartObject(
// 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 @@ 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
// "<name>": {