waoziandClaude Opus 5.5 6a1f6a06a4 Git object formats, packfiles and remote URL sanitizing
Object ids, loose objects, trees, commits and refs; packfile index lookup,
entries and deltas; gix-url location validation and credential removal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-15 21:32:50 -03:00

Git

Git's on-disk formats in Ziran, with no allocation and no file I/O: callers read and write .git themselves and hand this package byte slices.

  • git: object ids (SHA-1), kind size\0 headers, loose objects (written as stored zlib blocks, read with compression's inflate, Adler-32 checked), trees in Git's sort order, commits, refs and packed-refs.
  • git_pack: packfile index (version 2) lookup, pack entry headers, entry inflation and delta application, for reading real clones.
  • git_url: remote location validation with the rules of Rust's gix-url 0.40 (URLs, SCP-style user@host:path, remote helpers, IPv6 literals, percent escapes), and GitSanitizeUrl, which removes user names and passwords for display while keeping SSH's conventional git user.

SHA-256 repositories are not supported yet.

make check ZIRAN=path/to/ziran builds and runs the tests as C. The package targets native builds (C, Go): it indexes caller-owned pointers and keeps slices in records, which the portable bundle subset does not allow yet. Xcoder checks object output against the git CLI and the sanitizer against gix-url on generated remotes.

License

BSD 3-Clause; see LICENSE.

S
Description
Git object and packfile handling with remote URL sanitization.
Readme BSD-3-Clause
49 KiB
0 Stars 1 Watchers 0 Forks
No results found.
Languages
Ziran 99.2%
Makefile 0.8%