blob: 1718284b97184bd40c780d9972a40460c2ef1dc1 [file] [log] [blame]
Shawn O. Pearce0125ae22009-07-03 18:05:23 -07001repo Manifest Format (submodule)
2================================
3
4A repo manifest describes the structure of a repo client; that is
5the directories that are visible and where they should be obtained
6from with git.
7
8The basic structure of a manifest is a bare Git repository holding
9a 'gitmodules' file in the top level directory, and one or more
10gitlink references pointing at commits from the referenced projects.
11This is the same structure as used by 'git submodule'.
12
13Manifests are inherently version controlled, since they are kept
14within a Git repository. Updates to manifests are automatically
15obtained by clients during `repo sync`.
16
17.gitmodules
18===========
19
20The '.gitmodules' file, located in the top-level directory of the
21client's working tree (or manifest repository), is a text file with
22a syntax matching the requirements of 'git config'.
23
24This file contains one subsection per project (also called a
25submodule by git), and the subsection value is a unique name to
26describe the project. Each submodule section must contain the
27following required keys:
28
29 * path
30 * url
31
32submodule.<name>.path
33---------------------
34
35Defines the path, relative to the top-level directory of the client's
36working tree, where the project is expected to be checked out. The
37path name must not end with a '/'. All paths must be unique within
38the .gitmodules file.
39
40At the specified path within the manifest repository a gitlink
41tree entry (an entry with file mode 160000) must exist referencing
42a commit SHA-1 from the project. This tree entry specifies the
43exact version of the project that `repo sync` will synchronize the
44client's working tree to.
45
46submodule.<name>.url
47--------------------
48
49Defines a URL from where the project repository can be cloned.
50By default `repo sync` will clone from this URL whenever a user
51needs to access this project.
52
53submodule.<name>.revision
54-------------------------
55
56Name of the branch in the project repository that Gerrit Code Review
57should automatically refresh the project's gitlink entry from.
58
59If set, during submit of a change within the referenced project,
60Gerrit Code Review will automatically update the manifest
61repository's corresponding gitlink to the new commit SHA-1 of
62this branch.
63
64Valid values are a short branch name (e.g. 'master'), a full ref
65name (e.g. 'refs/heads/master'), or '.' to request using the same
66branch name as the manifest branch itself. Since '.' automatically
67uses the manifest branch, '.' is the recommended value.
68
69If this key is not set, Gerrit Code Review will NOT automatically
70update the gitlink. An unset key requires the manifest maintainer
71to manually update the gitlink when it is necessary to reference
72a different revision of the project.
73
74submodule.<name>.update
75-----------------------
76
77This key is not supported by repo. If set, it will be ignored.
78
Shawn O. Pearce13f3da52010-12-07 10:31:19 -080079repo.notice
80-----------
81
82A message displayed when repo sync uses this manifest.
83
84
Shawn O. Pearce0125ae22009-07-03 18:05:23 -070085.review
86=======
87
88The optional '.review' file, located in the top-level directory of
89the client's working tree (or manifest repository), is a text file
90with a syntax matching the requirements of 'git config'.
91
92This file describes how `repo upload` should interact with the
93project's preferred code review system.
94
95review.url
96----------
97
98URL of the default Gerrit Code Review server. If a project does
99not have a specific URL in the '.review' file, this default URL
100will be used instead.
101
102review.<name>.url
103-----------------
104
105Project specific URL of the Gerrit Code Review server, for the
106submodule whose project name is <name>.
107
108Example
109=======
110
111 $ cat .gitmodules
112 [submodule "app/Clock"]
113 path = clock
114 url = git://vcs.example.com/ClockWidget.git
115 revision = .
116 [submodule "app/Browser"]
117 path = net/browser
118 url = git://netgroup.example.com/network/web/Browser.git
119 revision = .
120
121 $ cat .review
122 [review]
123 url = vcs-gerrit.example.com
124 [review "app/Browser"]
125 url = netgroup.example.com
126
127In the above example, the app/Clock project will send its code
128reviews to the default server, vcs-gerrit.example.com, while
129app/Browser will send its code reviews to netgroup.example.com.
130
131See Also
132========
133
134 * http://www.kernel.org/pub/software/scm/git/docs/gitmodules.html
135 * http://www.kernel.org/pub/software/scm/git/docs/git-config.html
136 * http://code.google.com/p/gerrit/