... | @@ -582,6 +582,69 @@ If your repository relies on Transifex for translations, make sure to |
... | @@ -582,6 +582,69 @@ If your repository relies on Transifex for translations, make sure to |
|
update the Transifex config to pull from the new branch. To do so,
|
|
update the Transifex config to pull from the new branch. To do so,
|
|
[open a l10n ticket](https://gitlab.torproject.org/tpo/community/l10n/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=) with the new branch name changes.
|
|
[open a l10n ticket](https://gitlab.torproject.org/tpo/community/l10n/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=) with the new branch name changes.
|
|
|
|
|
|
|
|
## Find the Git repository of a project
|
|
|
|
|
|
|
|
Normally, you can browse, clone, and generally operate Git
|
|
|
|
repositories as normal through the usual `https://` and `git://`
|
|
|
|
URLs. But sometimes you need access to the repositories on-disk
|
|
|
|
directly.
|
|
|
|
|
|
|
|
You can find the repository identifier by clicking on the three dots
|
|
|
|
menu on the top-right of a project's front page. For example, the
|
|
|
|
[arti project](https://gitlab.torproject.org/tpo/core/arti) says:
|
|
|
|
|
|
|
|
Project ID: 647
|
|
|
|
|
|
|
|
Then, from there, the path to the Git repository is the SHA256 hash of
|
|
|
|
that project identifier:
|
|
|
|
|
|
|
|
```
|
|
|
|
> printf 647 | sha256sum
|
|
|
|
86bc00bf176c8b99e9cbdd89afdd2492de002c1dcce63606f711e0c04203c4da -
|
|
|
|
```
|
|
|
|
|
|
|
|
In that case, the hash is
|
|
|
|
`86bc00bf176c8b99e9cbdd89afdd2492de002c1dcce63606f711e0c04203c4da`. Take
|
|
|
|
the first 4 characters of that, split that in two, and those are the
|
|
|
|
first two directory components. The full path to the repository
|
|
|
|
becomes:
|
|
|
|
|
|
|
|
/var/opt/gitlab/git-data/repositories/@hashed/86/bc/86bc00bf176c8b99e9cbdd89afdd2492de002c1dcce63606f711e0c04203c4da.git
|
|
|
|
|
|
|
|
Note that forks are "special" in the sense that they store some of
|
|
|
|
their objects outside of their repository. For example, the
|
|
|
|
[ahf/arti](https://gitlab.torproject.org/ahf/arti) fork (project ID 744) is in:
|
|
|
|
|
|
|
|
/var/opt/gitlab/git-data/repositories/@hashed/a1/5f/a15faf6f6c7e4c11d7956175f4a1c01edffff6e114684eee28c255a86a8888f8.git
|
|
|
|
|
|
|
|
has a file (`objects/info/alternates`) that points to a "pool" in:
|
|
|
|
|
|
|
|
../../../../../@pools/59/e1/59e19706d51d39f66711c2653cd7eb1291c94d9b55eb14bda74ce4dc636d015a.git/objects
|
|
|
|
|
|
|
|
or:
|
|
|
|
|
|
|
|
/var/opt/gitlab/git-data/repositories/@pools/59/e1/59e19706d51d39f66711c2653cd7eb1291c94d9b55eb14bda74ce4dc636d015a.git/objects
|
|
|
|
|
|
|
|
Therefore, the space used by a repository is not only in the `@hashed`
|
|
|
|
repository, but needs to take into account the shared `@pool` part. To
|
|
|
|
take another example, [tpo/applications/tor-browser](https://gitlab.torproject.org/tpo/applications/tor-browser) is:
|
|
|
|
|
|
|
|
/var/opt/gitlab/git-data/repositories/@hashed/b6/cb/b6cb293891dd62748d85aa2e00eb97e267870905edefdfe53a2ea0f3da49e88d.git
|
|
|
|
|
|
|
|
yet that big repository is not actually there:
|
|
|
|
|
|
|
|
```
|
|
|
|
root@gitlab-02:~# du -sh /var/opt/gitlab/git-data/repositories/@hashed/b6/cb/b6cb293891dd62748d85aa2e00eb97e267870905edefdfe53a2ea0f3da49e88d.git
|
|
|
|
252M /var/opt/gitlab/git-data/repositories/@hashed/b6/cb/b6cb293891dd62748d85aa2e00eb97e267870905edefdfe53a2ea0f3da49e88d.git
|
|
|
|
```
|
|
|
|
|
|
|
|
... but in the `@pool` repository:
|
|
|
|
|
|
|
|
```
|
|
|
|
root@gitlab-02:~# du -sh /var/opt/gitlab/git-data/repositories/@pools/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.git/objects
|
|
|
|
6.1G /var/opt/gitlab/git-data/repositories/@pools/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.git/objects
|
|
|
|
```
|
|
|
|
|
|
## Find the project associated with a project ID
|
|
## Find the project associated with a project ID
|
|
|
|
|
|
Sometimes you'll find a numeric project ID instead of a human-readable
|
|
Sometimes you'll find a numeric project ID instead of a human-readable
|
... | | ... | |