Difference between revisions of "GoVPP/gerrit-review"

From fd.io
Jump to: navigation, search
(Prerequisite)
Line 1: Line 1:
In order to submit patches made in the go-getted repository of GoVPP into Gerrit, please follow these steps:
+
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.
  
=== Prerequisite: ===
+
== 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
 
  go get git.fd.io/govpp.git
  
=== Initial setup: ===
+
=== Initial setup ===
* Setup your SSH key in Gerrit: https://gerrit.fd.io/r/#/admin/projects/govpp
+
* Add gerrit git remote:
* Add gerrit git remote and initialize the repo for review:
+
 
  cd $GOPATH/src/git.fd.io/govpp.git
 
  cd $GOPATH/src/git.fd.io/govpp.git
 
  git remote add gerrit ssh://<USERNAME>@gerrit.fd.io:29418/govpp
 
  git remote add gerrit ssh://<USERNAME>@gerrit.fd.io:29418/govpp
 +
* Initialize the repo for review:
 
  git review -s -r gerrit
 
  git review -s -r gerrit
  
=== Submitting the changes: ===
+
=== Submitting the changes ===
  
 
  git commit -as -m "commit message"
 
  git commit -as -m "commit message"
 
  git review -r gerrit
 
  git review -r gerrit

Revision as of 08:39, 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