Skip to content
Permalink
Browse files

doc: Replaced refs/meta with refs/commits to reflect code behavior.

  • Loading branch information...
jhdub23 authored and novalis committed Sep 6, 2019
1 parent 02f9948 commit 38c5e9e17adadacca44951c08c4da654dcd770c1
Showing with 47 additions and 47 deletions.
  1. +47 −47 doc/architecture.md
@@ -328,7 +328,7 @@ of this strategy on client-side checkouts.
A synthetic-meta-ref is a ref in a sub-repo whose name includes the commit ID
of the commit to which it points, such as:
`refs/meta/929e8afc03fef8d64249ad189341a4e8889561d7`. The term is derived from
`refs/commits/929e8afc03fef8d64249ad189341a4e8889561d7`. The term is derived from
the fact that such a ref is:
1. _synthetic_ -- generated by a tool
@@ -347,35 +347,35 @@ A mono-repo has two invariants with respect to synthetic-meta-refs:
Some mono-repos in valid states:
```
'-------------------` '-------------------`
| meta-repo | | a |
| - - - - - - - - - | | - - - - - - - - - |
| master | a [a1] | | refs/meta/a1 [a1] |
`-------------------, `-------------------,
'-------------------` '-----------------------`
| meta-repo | | a |
| - - - - - - - - - | | - - - - - - - - - - - |
| master | a [a1] | | refs/commits/a1 [a1] |
`-------------------, `-----------------------,
The 'master' branch in the meta-repo indicates commit 'a1' for repo 'a' and a
valid synthetic-meta-ref exists.
```
```
'-------------------` '-------------------`
| meta-repo | | a |
| - - - - - - - - - | | - - - - - - - - - |
| master | a [a1] | | refs/meta/a1 [a1] |
| - - - - -+- - - - | | refs/meta/ab [ab] |
| release | a [ab] | `-------------------,
'-------------------` '-----------------------`
| meta-repo | | a |
| - - - - - - - - - | | - - - - - - - - - - - |
| master | a [a1] | | refs/commits/a1 [a1] |
| - - - - -+- - - - | | refs/commits/ab [ab] |
| release | a [ab] | `-----------------------,
`-------------------,
The meta-repo has another branch, 'release', indicating commit 'ab' in 'a',
which also has a valid synthetic-meta-ref.
```
```
'-----------------------` '-------------------`
| meta-repo | | a |
| - - - - - - - - - - - | | - - - - - - - - - |
| master | a [a1] | | refs/meta/a2 [a2] |
| - - - - -+- - - - - - | `-------------------,
'-----------------------` '-----------------------`
| meta-repo | | a |
| - - - - - - - - - - - | | - - - - - - - - - - - |
| master | a [a1] | | refs/commits/a2 [a2] |
| - - - - -+- - - - - - | `-----------------------,
| release | a [a2->a1] |
`-----------------------,
@@ -387,31 +387,31 @@ for 'a1'.
A few mono-repos in invalid states:
```
'-------------------` '-------------------`
| meta-repo | | a |
| - - - - - - - - - | | - - - - - - - - - |
| master | a [a1] | | refs/meta/a1 [a2] |
`-------------------, `-------------------,
'-------------------` '-----------------------`
| meta-repo | | a |
| - - - - - - - - - | | - - - - - - - - - - - |
| master | a [a1] | | refs/commits/a1 [a2] |
`-------------------, `-----------------------,
The synthetic-meta-ref for 'a1' does not point to 'a1'.
```
```
'-------------------` '-------------------`
| meta-repo | | a |
| - - - - - - - - - | | - - - - - - - - - |
| master | a [a1] | | refs/meta/ab [ab] |
`-------------------, `-------------------,
'-------------------` '-----------------------`
| meta-repo | | a |
| - - - - - - - - - | | - - - - - - - - - - - |
| master | a [a1] | | refs/commits/ab [ab] |
`-------------------, `-----------------------,
No synthetic-meta-ref for commit 'a1'.
```
```
'-----------------------` '-------------------`
| meta-repo | | a |
| - - - - - - - - - - - | | - - - - - - - - - |
| master | a [a1] | | refs/meta/a1 [a1] |
| - - - - -+- - - - - - | `-------------------,
'-----------------------` '-----------------------`
| meta-repo | | a |
| - - - - - - - - - - - | | - - - - - - - - - - - |
| master | a [a1] | | refs/commits/a1 [a1] |
| - - - - -+- - - - - - | `-----------------------,
| release | a [a2->a1] |
`-----------------------,
@@ -458,32 +458,32 @@ local
`---------------------------------,
remote
'---------------------` '--------------` '--------------`
| meta-repo | | | a | | b |
| master | a [a1] | | refs/meta/a1 | | refs/meta/b1 |
| [m1] | b [b1] | | [a1] | | [b1] |
`---------------------, `--------------, `--------------,
'---------------------` '-----------------` '-----------------`
| meta-repo | | | a | | b |
| master | a [a1] | | refs/commits/a1 | | refs/commits/b1 |
| [m1] | b [b1] | | [a1] | | [b1] |
`---------------------, `-----------------, `-----------------,
```
Where we have new commits, `a2` and `b2` in repos `a` and `b`, respectively,
and a new meta-repo commit, `m2` that references them. Note that `a1` and `b1`
have appropriate synthetic-meta-refs
have appropriate synthetic-meta-refs
After invoking `git meta push`, the remote repos would look like:
```
'---------------------` '--------------` '--------------`
| meta-repo | | | a | | b |
| master | a [a2] | | refs/meta/a1 | | refs/meta/b1 |
| [m2] | b [b2] | | [a1] | | [b1] |
`---------------------, | refs/meta/a2 | | refs/meta/b2 |
| [a2] | | [b2] |
`--------------, `--------------,
'---------------------` '-----------------` '-----------------`
| meta-repo | | | a | | b |
| master | a [a2] | | refs/commits/a1 | | refs/commits/b1 |
| [m2] | b [b2] | | [a1] | | [b1] |
`---------------------, | refs/commits/a2 | | refs/commits/b2 |
| [a2] | | [b2] |
`-----------------, `-----------------,
```
Note that `git meta push` created meta-refs in the sub-repos for the new
commits before it updated the meta-repo. If the process had been interrupted,
for example, after pushing `refs/meta/a2` but before pushing `refs/meta/b2`,
for example, after pushing `refs/commits/a2` but before pushing `refs/commits/b2`,
the mono-repo would still be in a valid state. If no meta-repo commit ever
referenced `a2`, the synthetic-meta-ref `refs/meta/a2` would eventually be
referenced `a2`, the synthetic-meta-ref `refs/commits/a2` would eventually be
cleand up.
### Client-side access to sub-repo commits

0 comments on commit 38c5e9e

Please sign in to comment.
You can’t perform that action at this time.