GoVPP/gerrit-review

From fd.io
< GoVPP
Revision as of 08:39, 15 May 2017 by Raszabo (Talk | contribs)

Jump to: navigation, search

There are two possible workflows for contributing to GoVPP using Gerrit review system. One of them requires manual tweaks in GOPATH, the other one relies on adding of a git remote. For both options, you first need to setup your SSH key in Gerrit on https://gerrit.fd.io/r/#/admin/projects/govpp.

Option 1: Manual Tweaks in GOPATH

Uses custom git clone instead of the go get-ed repo. NOTE: the setup procedure removes the contents of your $GOPATH/src/git.fd.io/govpp.git/ directory!

Initial setup

  • Remove the go get-ed source code and replace it with a git cloned repo:
rm -rf $GOPATH/src/git.fd.io/govpp.git/
mkdir $GOPATH/src/git.fd.io/
cd $GOPATH/src/git.fd.io/
git clone ssh://<USERNAME>@gerrit.fd.io:29418/govpp govpp.git
  • Initialize the repo for review:
git review -s

Submitting the changes

git commit -as -m "commit message"
git review


Option 2: Git Remote

Assumes you have previously go get-ed the code using:

go get git.fd.io/govpp.git

Initial setup

  • Add gerrit git remote:
cd $GOPATH/src/git.fd.io/govpp.git
git remote add gerrit ssh://<USERNAME>@gerrit.fd.io:29418/govpp
  • Initialize the repo for review:
git review -s -r gerrit

Submitting the changes

git commit -as -m "commit message"
git review -r gerrit