OXYGENHUB

A Git view of every repository: git clone https://hub/OWNER/NAME.git issue #355 open andymccall opened this · 1 comment

andymccall

Andy, 2026-10-31 (his drop 29d0bca6…, "git operability"): git clone https://oxygenhub.io/OWNER/NAME.git works, read-only, so Git tools (CI systems, editors, people without oxy) can read an Oxygen repository.

  • oxy-core 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.
  • The hub keeps a bare mirror per repository, refreshed when a push has moved something, and serves it with Git's smart HTTP (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 .git address is refused, saying to use oxy.
  • Tests clone with real git from a test hub.

andymccall set labels feature ·

andymccall

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:

  1. Turn the mirror on for every repository by default (disk: a Git copy per repository; CPU: an export per push)?
  2. Export other bookmarks too (as linear histories of each)?