summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/internal-fs-layout.md122
1 files changed, 122 insertions, 0 deletions
diff --git a/docs/internal-fs-layout.md b/docs/internal-fs-layout.md
new file mode 100644
index 00000000..231531cd
--- /dev/null
+++ b/docs/internal-fs-layout.md
@@ -0,0 +1,122 @@
1# Repo internal filesystem layout
2
3A reference to the `.repo/` tree in repo client checkouts.
4Hopefully it's complete & up-to-date, but who knows!
5
6*** note
7**Warning**:
8This is meant for developers of the repo project itself as a quick reference.
9**Nothing** in here must be construed as ABI, or that repo itself will never
10change its internals in backwards incompatible ways.
11***
12
13[TOC]
14
15## .repo/ layout
16
17All content under `.repo/` is managed by `repo` itself with few exceptions.
18
19In general, you should not make manual changes in here.
20If a setting was initialized using an option to `repo init`, you should use that
21command to change the setting later on.
22It is always safe to re-run `repo init` in existing repo client checkouts.
23For example, if you want to change the manifest branch, you can simply run
24`repo init --manifest-branch=<new name>` and repo will take care of the rest.
25
26### repo/ state
27
28* `repo/`: A git checkout of the repo project. This is how `repo` re-execs
29 itself to get the latest released version.
30
31 It tracks the git repository at `REPO_URL` using the `REPO_REV` branch.
32 Those are specified at `repo init` time using the `--repo-url=<REPO_URL>`
33 and `--repo-branch=<REPO_REV>` options.
34
35 Any changes made to this directory will usually be automatically discarded
36 by repo itself when it checks for updates. If you want to update to the
37 latest version of repo, use `repo selfupdate` instead. If you want to
38 change the git URL/branch that this tracks, re-run `repo init` with the new
39 settings.
40
41* `.repo_fetchtimes.json`: Used by `repo sync` to record stats when syncing
42 the various projects.
43
44### Manifests
45
46For more documentation on the manifest format, including the local_manifests
47support, see the [manifest-format.md] file.
48
49* `manifests/`: A git checkout of the manifest project. Its `.git/` state
50 points to the `manifest.git` bare checkout (see below). It tracks the git
51 branch specified at `repo init` time via `--manifest-branch`.
52
53 The local branch name is always `default` regardless of the remote tracking
54 branch. Do not get confused if the remote branch is not `default`, or if
55 there is a remote `default` that is completely different!
56
57 No manual changes should be made in here as it will just confuse repo and
58 it won't automatically recover causing no new changes to be picked up.
59
60* `manifests.git/`: A bare checkout of the manifest project. It tracks the
61 git repository specified at `repo init` time via `--manifest-url`.
62
63 No manual changes should be made in here as it will just confuse repo.
64 If you want to switch the tracking settings, re-run `repo init` with the
65 new settings.
66
67* `manifest.xml -> manifests/<manifest-name>.xml`: A symlink to the manifest
68 that the user wishes to sync. It is specified at `repo init` time via
69 `--manifest-name`.
70
71 Do not try to repoint this symlink to other files as it will confuse repo.
72 If you want to switch manifest files, re-run `repo init` with the new
73 setting.
74
75* `manifests.git/.repo_config.json`: JSON cache of the `manifests.git/config`
76 file for repo to read/process quickly.
77
78* `local_manifest.xml` (*Deprecated*): User-authored tweaks to the manifest
79 used to sync. See [local manifests] for more details.
80* `local_manifests/`: Directory of user-authored manifest fragments to tweak
81 the manifest used to sync. See [local manifests] for more details.
82
83### Project objects
84
85* `project.list`: Tracking file used by `repo sync` to determine when projects
86 are added or removed and need corresponding updates in the checkout.
87* `projects/`: Bare checkouts of every project synced by the manifest. The
88 filesystem layout matches the `<project path=...` setting in the manifest
89 (i.e. where it's checked out in the repo client source tree). Those
90 checkouts will symlink their `.git/` state to paths under here.
91
92 Some git state is further split out under `project-objects/`.
93* `project-objects/`: Git objects that are safe to share across multiple
94 git checkouts. The filesystem layout matches the `<project name=...`
95 setting in the manifest (i.e. the path on the remote server). This allows
96 for multiple checkouts of the same remote git repo to share their objects.
97 For example, you could have different branches of `foo/bar.git` checked
98 out to `foo/bar-master`, `foo/bar-release`, etc... There will be multiple
99 trees under `projects/` for each one, but only one under `project-objects/`.
100
101 This can run into problems if different remotes use the same path on their
102 respective servers ...
103* `subprojects/`: Like `projects/`, but for git submodules.
104* `subproject-objects/`: Like `project-objects/`, but for git submodules.
105
106## ~/ dotconfig layout
107
108Repo will create & maintain a few files in the user's home directory.
109
110* `.repoconfig/`: Repo's per-user directory for all random config files/state.
111* `.repoconfig/keyring-version`: Cache file for checking if the gnupg subdir
112 has all the same keys as the repo launcher. Used to avoid running gpg
113 constantly as that can be quite slow.
114* `.repoconfig/gnupg/`: GnuPG's internal state directory used when repo needs
115 to run `gpg`. This provides isolation from the user's normal `~/.gnupg/`.
116
117* `.repo_.gitconfig.json`: JSON cache of the `.gitconfig` file for repo to
118 read/process quickly.
119
120
121[manifest-format.md]: ./manifest-format.md
122[local manifests]: ./manifest-format.md#Local-Manifests