Difference between revisions of "GoVPP/gerrit-review"

From fd.io
Jump to: navigation, search
(Option 1: Manual Tweaks in GOPATH)
Line 3: Line 3:
 
== Option 1: Manual Tweaks in GOPATH ==
 
== Option 1: Manual Tweaks in GOPATH ==
 
Uses custom git clone instead of the go get-ed repo.
 
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!
+
NOTE: the setup procedure removes the contents of your ''$GOPATH/src/git.fd.io/govpp.git/'' directory!
  
 
=== Initial setup ===
 
=== Initial setup ===
Line 18: Line 18:
 
  git commit -as -m "commit message"
 
  git commit -as -m "commit message"
 
  git review
 
  git review
 
  
 
== Option 2: Git Remote ==
 
== Option 2: Git Remote ==

Revision as of 08:42, 15 May 2017

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