summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-02-25 03:13:31 -0500
committerMike Frysinger <vapier@google.com>2021-02-25 15:48:03 +0000
commit6db4097f3170a9d1dbe1f66fb49b75e15f4683dd (patch)
tree71ee3d7e472deca575947bd6767d413a12e50994
parentf0925c482f4bd73aa1c6f8e0816955dedddbc678 (diff)
downloadgit-repo-6db4097f3170a9d1dbe1f66fb49b75e15f4683dd.tar.gz
docs: add warnings about repos data model
For people coming across these docs and thinking that repo's methods are good to replicate, add a note warning them against doing so. Change-Id: I443a783794313851a6e7ba1c39baebac988bff9a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/298164 Reviewed-by: Michael Mortensen <mmortensen@google.com> Tested-by: Mike Frysinger <vapier@google.com>
-rw-r--r--docs/internal-fs-layout.md24
1 files changed, 22 insertions, 2 deletions
diff --git a/docs/internal-fs-layout.md b/docs/internal-fs-layout.md
index 53c42638..9cbdefb7 100644
--- a/docs/internal-fs-layout.md
+++ b/docs/internal-fs-layout.md
@@ -93,6 +93,23 @@ support, see the [manifest-format.md] file.
93 93
94### Project objects 94### Project objects
95 95
96*** note
97**Warning**: Please do not use repo's approach to projects/ & project-objects/
98layouts as a model for other tools to implement similar approaches.
99It has a number of known downsides like:
100* [Symlinks do not work well under Windows](./windows.md).
101* Git sometimes replaces symlinks under .git/ with real files (under unknown
102 circumstances), and then the internal state gets out of sync, and data loss
103 may ensue.
104* When sharing project-objects between multiple project checkouts, Git might
105 automatically run `gc` or `prune` which may lead to data loss or corruption
106 (since those operate on leaf projects and miss refs in other leaves). See
107 https://gerrit-review.googlesource.com/c/git-repo/+/254392 for more details.
108
109Instead, you should use standard Git workflows like [git worktree] or
110[gitsubmodules] with [superprojects].
111***
112
96* `project.list`: Tracking file used by `repo sync` to determine when projects 113* `project.list`: Tracking file used by `repo sync` to determine when projects
97 are added or removed and need corresponding updates in the checkout. 114 are added or removed and need corresponding updates in the checkout.
98* `projects/`: Bare checkouts of every project synced by the manifest. The 115* `projects/`: Bare checkouts of every project synced by the manifest. The
@@ -121,7 +138,7 @@ support, see the [manifest-format.md] file.
121 (i.e. the path on the remote server) with a `.git` suffix. This has the 138 (i.e. the path on the remote server) with a `.git` suffix. This has the
122 same advantages as the `project-objects/` layout above. 139 same advantages as the `project-objects/` layout above.
123 140
124 This is used when git worktrees are enabled. 141 This is used when [git worktree]'s are enabled.
125 142
126### Global settings 143### Global settings
127 144
@@ -143,7 +160,7 @@ User controlled settings are initialized when running `repo init`.
143| repo.reference | `--reference` | Reference repo client checkout | 160| repo.reference | `--reference` | Reference repo client checkout |
144| repo.submodules | `--submodules` | Sync git submodules | 161| repo.submodules | `--submodules` | Sync git submodules |
145| repo.superproject | `--use-superproject` | Sync [superproject] | 162| repo.superproject | `--use-superproject` | Sync [superproject] |
146| repo.worktree | `--worktree` | Use `git worktree` for checkouts | 163| repo.worktree | `--worktree` | Use [git worktree] for checkouts |
147| user.email | `--config-name` | User's e-mail address; Copied into `.git/config` when checking out a new project | 164| user.email | `--config-name` | User's e-mail address; Copied into `.git/config` when checking out a new project |
148| user.name | `--config-name` | User's name; Copied into `.git/config` when checking out a new project | 165| user.name | `--config-name` | User's name; Copied into `.git/config` when checking out a new project |
149 166
@@ -228,7 +245,10 @@ Repo will create & maintain a few files in the user's home directory.
228 245
229 246
230[git-config]: https://git-scm.com/docs/git-config 247[git-config]: https://git-scm.com/docs/git-config
248[git worktree]: https://git-scm.com/docs/git-worktree
249[gitsubmodules]: https://git-scm.com/docs/gitsubmodules
231[manifest-format.md]: ./manifest-format.md 250[manifest-format.md]: ./manifest-format.md
232[local manifests]: ./manifest-format.md#Local-Manifests 251[local manifests]: ./manifest-format.md#Local-Manifests
252[superprojects]: https://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects
233[topic]: https://gerrit-review.googlesource.com/Documentation/intro-user.html#topics 253[topic]: https://gerrit-review.googlesource.com/Documentation/intro-user.html#topics
234[upload-notify]: https://gerrit-review.googlesource.com/Documentation/user-upload.html#notify 254[upload-notify]: https://gerrit-review.googlesource.com/Documentation/user-upload.html#notify