A Git view of every repository: git clone https://hub/OWNER/NAME.git issue #355 open andymccall opened this · 1 comment
andymccall set labels feature ·
Found tonight (2026-11-01 01:00 GMT): the hub already has a Git view, the read-only Git mirror (hub spec §14, crates/hub/src/mirror.rs): git clone https://oxygenhub.io/OWNER/NAME.git works, private repositories take a token as the Basic password, pushes are refused, and every push refreshes it. It is off by default, turned on per repository under Settings › Git mirror, and it exports the default bookmark only, as a linear history (oxy's checkout-style git export over the hub's operation log).
What I built and did not wire in: oxy-core's git_export_graph (oxygen 3ce2d633), a deterministic export of every bookmark and tag from the change graph. Its catch: a bookmark with several heads becomes a synthetic merge that is not always a descendant of the previous one, so git pull would sometimes need a merge where the linear mirror always fast-forwards. That is worse for Git users, so the mirror keeps its export.
Decisions for Andy:
- Turn the mirror on for every repository by default (disk: a Git copy per repository; CPU: an export per push)?
- Export other bookmarks too (as linear histories of each)?
Andy, 2026-10-31 (his drop 29d0bca6…, "git operability"):
git clone https://oxygenhub.io/OWNER/NAME.gitworks, read-only, so Git tools (CI systems, editors, people without oxy) can read an Oxygen repository.git_export_graph(oxygen): a deterministic export from the change graph, not a checkout's op log: each change a commit (tree = its dependency closure's state, parents = its dependencies' commits, Change-Id/Oxy-Hash trailers), each bookmark a branch (a merge of its heads when several), tags as tags; incremental by marks, the same commits wherever it runs.git upload-pack) at/OWNER/NAME.git/…. Private repositories need a token (HTTP basic, the token as password), read as oxy reads. A push to the.gitaddress is refused, saying to use oxy.