docs: improve project-objects & worktrees layout info

Make it clear that the paths have a .git suffix, and clarify the
reason for not using remote servers in the layout.

Change-Id: I62c6977ee6f4e1e9882d45727eb239cf5489d2b6
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256033
Reviewed-by: Jonathan Nieder <jrn@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Mike Frysinger 2020-02-19 15:47:46 -05:00
parent 7ff80afdf6
commit 0334b8c673

View File

@ -92,19 +92,23 @@ support, see the [manifest-format.md] file.
Some git state is further split out under `project-objects/`. Some git state is further split out under `project-objects/`.
* `project-objects/`: Git objects that are safe to share across multiple * `project-objects/`: Git objects that are safe to share across multiple
git checkouts. The filesystem layout matches the `<project name=...` git checkouts. The filesystem layout matches the `<project name=...`
setting in the manifest (i.e. the path on the remote server). This allows setting in the manifest (i.e. the path on the remote server) with a `.git`
for multiple checkouts of the same remote git repo to share their objects. suffix. This allows for multiple checkouts of the same remote git repo to
For example, you could have different branches of `foo/bar.git` checked share their objects. For example, you could have different branches of
out to `foo/bar-master`, `foo/bar-release`, etc... There will be multiple `foo/bar.git` checked out to `foo/bar-master`, `foo/bar-release`, etc...
trees under `projects/` for each one, but only one under `project-objects/`. There will be multiple trees under `projects/` for each one, but only one
under `project-objects/`.
This can run into problems if different remotes use the same path on their This layout is designed to allow people to sync against different remotes
respective servers ... (e.g. a local mirror & a public review server) while avoiding duplicating
the content. However, this can run into problems if different remotes use
the same path on their respective servers. Best to avoid that.
* `subprojects/`: Like `projects/`, but for git submodules. * `subprojects/`: Like `projects/`, but for git submodules.
* `subproject-objects/`: Like `project-objects/`, but for git submodules. * `subproject-objects/`: Like `project-objects/`, but for git submodules.
* `worktrees/`: Bare checkouts of every project synced by the manifest. The * `worktrees/`: Bare checkouts of every project synced by the manifest. The
filesystem layout matches the `<project name=...` setting in the manifest filesystem layout matches the `<project name=...` setting in the manifest
(i.e. the path on the remote server). (i.e. the path on the remote server) with a `.git` suffix. This has the
same advantages as the `project-objects/` layout above.
This is used when git worktrees are enabled. This is used when git worktrees are enabled.