Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Wiki Replica
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
TPA
Wiki Replica
Commits
a8985857
Verified
Commit
a8985857
authored
4 years ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
evaluate git-subrepo
parent
d4eb5e9c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
howto/puppet.md
+33
-9
33 additions, 9 deletions
howto/puppet.md
with
33 additions
and
9 deletions
howto/puppet.md
+
33
−
9
View file @
a8985857
...
...
@@ -1798,7 +1798,31 @@ twice as well.
### subrepo
TODO. https://github.com/ingydotnet/git-subrepo
The
[
git-subrepo
](
https://github.com/ingydotnet/git-subrepo
)
is "an improvement from
`git-submodule`
and
`git-subtree`
". It is a mix between a monorepo and a submodule system,
with modules being stored in a
`.gitrepo`
file. It is somewhat less
well known than the other alternatives, presumably because it's newer?
It is entirely written in
`bash`
, which I find somewhat scary. It is
[
not packaged in Debian yet
](
http://bugs.debian.org/911397
)
but might be soon.
It works around the "double-commit issue" by having a special
`git
subrepo commit`
command that "does the right thing". That, in general,
is its major flaw: it reproduces many git commands like
`init`
,
`push`
,
`pull`
as subcommands, so you need to remember which command
to run. To quote the (rather terse) manual:
> All the subrepo commands use names of actual Git commands and try to
> do operations that are similar to their Git counterparts. They also
> attempt to give similar output in an attempt to make the subrepo
> usage intuitive to experienced Git users.
>
> Please note that the commands are not exact equivalents, and do not
> take all the same arguments
Still, its feature set is impressive and could be the perfect mix
between the "submodules" and "subtree" approach of still keeping a
monorepo while avoiding the double-commit issue.
### myrepos
...
...
@@ -1820,14 +1844,14 @@ specific remotes in subdirectories of the monorepo automatically.
### Summary table
| Approach | Pros | Cons | Summary |
|------------|----------------------------|------------------------------------------|---------------------------|
| Monorepo | Simple | Double-commit | Status quo |
| Submodules | Well-known | Hard to use, double-commit | Not great |
| Librarian | Dep resolution client-side | Unmaintained, bad integration with git | Not sufficient on its own |
| r10k | Standard | Hard to deploy, opiniated | To evaluate further |
| Subtree | "best of both worlds" | Still get double-commit, rebase problems | Not sure it's worth it |
| Subrepo |
? | ? | ?
|
| Approach | Pros | Cons | Summary
|
|------------|----------------------------|------------------------------------------|---------------------------
--------
|
| Monorepo | Simple | Double-commit | Status quo
|
| Submodules | Well-known | Hard to use, double-commit | Not great
|
| Librarian | Dep resolution client-side | Unmaintained, bad integration with git | Not sufficient on its own
|
| r10k | Standard | Hard to deploy, opiniated | To evaluate further
|
| Subtree | "best of both worlds" | Still get double-commit, rebase problems | Not sure it's worth it
|
| Subrepo |
subtree + optional | Unusual, new commands to learn | To evaluate further
|
| myrepos | Flexible | Esoteric | might be useful with our monorepo |
### Best practices survey
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment