Skip to main content

Module first_commit

Module first_commit 

Source
Expand description

A repository’s first commit, written by the server (Repos.Create{readme}). A repository’s first commit, written by the server (the owner, 2026-10-08: a sold private Gunnar is handed over with ONE welcome repository whose README thanks the buyer and says how to start — with no git client anywhere in the sale).

Repos.Create{readme} makes the repository and then this: one blob (the README), one tree holding it, one commit of that tree with no parent, as ONE pack in the repository’s own hash (sha1 or sha256), put through the repository’s store with the default branch set to the commit — the same GitOps::put a push lands through, so the transaction log (and the twin) carries it like any push.

The objects are git’s own formats, written here without gix-object (which this crate keeps out of its shipped dependencies); the unit tests read them back through the store’s reader and check every id against gix-object’s (tests/first_commit.rs).

Constants§

AUTHOR
The identity the first commit is written as: the server, never a person.

Functions§

first_commit_pack
Pure: the pack of a repository’s first commit — one file name holding text, in a tree, committed with message at when_unix (UTC). Answers the pack’s bytes and the commit’s id (hex).
object_id
The id of content as a word object in kind: the hash of <word> <len>\0<content>.