master
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]>
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\0headers, loose objects (written as stored zlib blocks, read withcompression's inflate, Adler-32 checked), trees in Git's sort order, commits, refs andpacked-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-styleuser@host:path, remote helpers, IPv6 literals, percent escapes), andGitSanitizeUrl, which removes user names and passwords for display while keeping SSH's conventionalgituser.
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.
Description
Git object and packfile handling with remote URL sanitization.
49 KiB
0 Stars
1 Watchers
0 Forks