1
2# Introduction
3The git repository structure is described in this file. It can also be derived
4by scanning the repo itself. The master branch is read only and contains this
5README.md file only.
6
7The repository is organized in several orphaned branches, each one containing
8a sub-project. The naming convention naming branches is described in this
9document.
10
11## Branch naming conventions
12Project cicn contains several sub-projects. Sub-project *subp* has a master
13branch with name  origin/subp/master. All commits associated to sub-project
14subp will belong to the orphaned branch origin/subp. All branches associated
15to subp must be named as subp/branch-name.
16
17## Sub projects contained in the cicn git repository
18
191. cicn-plugin
202. sb-forwarder
213. libicnet
224. cframework
235. ccnxlib
246. http-server
257. viper
268. vicn
279. android-sdk
28
29## Sub projects description
30
31Name                | Description             |  Language and style
32------------------- | ----------------------- | -------------------
331. cicn-plugin      | VPP forwarder           | C GNU style
342. sb-forwarder     | socket-based forwarder  | C GNU style
353. libicnet         | socket API              | C++11 Google style
364. cframework       | C framework             | C GNU style
375. ccnxlibs         | CCNx libraries          | C GNU style
386. http-server      | HTTP server             | C++11 Google style
397. viper            | Qt/QML video player     | C++/QML Qt style
408. vicn             | vICN framework          | python-3 and bash
419. android-sdk      | Android SDK for ICN     | cmake
42
43## Example:
44
45For sub-project cicn-plugin, the master branch is cicn-plugin/master
46that can be cloned as follows:
47
48$ git clone -b cicn-plugin/master https://gerrit.fd.io/r/cicn cicn-plugin
49
50## How to manage different master branches
51
52It is suggested to clone each subproject branch in a different workspace to 
53avoid error prone operations. The cicn git repo stores several projects which
54are independent one to another. While access control and isolation is
55guaranteed at a certain level by gerrit, using one single workspace is
56discouraged.
57
58git clone -b cicn-plugin/master  https://gerrit.fd.io/r/cicn cicn-plugin;
59git clone -b sb-forwarder/master https://gerrit.fd.io/r/cicn sb-forwarder;
60git clone -b libicnet/master     https://gerrit.fd.io/r/cicn libicnet;
61git clone -b cframework/master   https://gerrit.fd.io/r/cicn cframework;
62git clone -b ccnxlibs/master     https://gerrit.fd.io/r/cicn ccnxlibs;
63git clone -b http-server/master  https://gerrit.fd.io/r/cicn http-server;
64git clone -b viper/master        https://gerrit.fd.io/r/cicn viper;
65git clone -b vicn/master         https://gerrit.fd.io/r/cicn vicn;
66git clone -b android-sdk         https://gerrit.fd.io/r/cicn android-sdk;
67
68### For committers
69
70By having multiple sub-projects in the same repo, it is highly recommended
71to use the following approach while using branches and pushing patch sets.
72
73$ subp = cicm-plugin
74$ committer = user
75
76$ git clone -b cicn-plugin/master ssh://committer@gerrit.fd.io:29418/cicn subp;
77$ scp -p -P 29418 committer@gerrit.fd.io:hooks/commit-msg subp/.git/hooks/;
78
79If you use an email alias like user+fdio@email.com that is registered in the
80gerrit frontend it is recommended to set the following kind of configuration
81
82$ git config --local user.email "$committer+fdio@email.com"
83$ git config --local alias.push-for-review "push origin HEAD:refs/for/$subp/master"
84
85this allows to avoid pushing for review to different sub-project branches
86using the command
87
88$ git push-for-review
89