This repository is CockroachDB's fork of Protocol Buffers, Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.
It exists for two reasons: to provide a home for CockroachDB-specific patches, as necessary, and to ensure that the Protocol Buffers submodule in cockroachdb/cockroach has a company-controlled remote to point at.
It is critical that any commit in this repository that is referenced from cockroachdb/cockroach remains available here in perpetuity. For every referenced commit, there must be at least one named branch or tag here that has the commit as an ancestor, or else the commit will be garbage collected by GitHub.
To add a patch to an existing release branch:
-
In your cockroachdb/cockroach clone, change into the submodule's directory,
c-deps/protobuf
:$ cd $GOPATH/src/github.com/cockroachdb/cockroach $ cd c-deps/protobuf
-
Create a feature branch named after yourself, like
tschottdorf/nullable
. -
Commit your patch.
-
Push your changes to the named feature branch. External contributors will need to fork this repository and push to their fork instead.
-
Make a commit in cockroachdb/cockroach that updates the submodule ref.
$ cd $GOPATH/src/github.com/cockroachdb/cockroach $ git add c-deps/protobuf $ git commit -m "protobuf: upgrade to..."
-
Open a pull request against cockroachdb/cockroach and wait for review.
-
Before your downstream PR has merged but after it has been LGTM'd and passed tests, push your changes to the release branch in this repository. You do not need to open a PR against this repository directly; the review of your downstream PR suffices.
$ git checkout crl-release-X.X $ git merge --ff-only FEATURE-BRANCH $ git push origin crl-release-X.X
Important: don't force push! If your push is rejected, either someone else merged an intervening change or you didn't base your feature branch off the tip of the release branch. Rebase your feature branch, update your downstream PR with the new commit SHA, and verify tests still pass. Then try your push again.
-
From the GitHub web UI, verify that the exact submodule SHA that landed in cockroachdb/cockroach is on the appropriate release branch. If it is, delete your feature branch.
$ git push -d origin FEATURE-BRANCH
To create a new release branch:
-
Follow step one above.
-
Add an upstream remote and fetch from it.
$ git remote add upstream https://github.com/google/protobuf $ git fetch upstream
-
Create and push a new branch with the desired start point:
$ git checkout -b crl-release-X.X upstream/RELEASE-BRANCH $ git push origin crl-release-X.X
-
Protect the branch from force-pushes in the repository settings. This is crucial in ensuring that we don't break commit references in cockroachdb/cockroach's submodules.
-
Follow steps three through six above.