git-antioxidant is an implementation of Git in Rust by HORNET Storage. It began as a fork of gitoxide and is now a project of its own: it no longer takes changes from gitoxide, and its own changes stay here.
It aims for the highest quality in speed and security:
- Speed: Git's algorithms, using every core where the work allows it, measured against Git on representative repositories.
- Security: whatever repositories, remotes and configuration files contain is untrusted until it has been checked.
The paths of trees and of the index are validated before files are written or removed, with Git's protections for
NTFS and HFS. Hooks and the
execcommands of rebases only run in repositories whose Git directory is fully trusted, as Git refuses to work in repositories of other owners unlesssafe.directoryallows it, and editors only come from trusted configuration and the environment. - Compatibility: repositories, configuration, hooks, credential helpers and remotes work as they do with Git. Git is the reference that the tests compare against, and every remaining difference is documented.
The library keeps the name gix and its plumbing crates the names gix-*; the command-line programs gix and ein,
the packages that build them and the configuration keys of the gitoxide section, which gix adds to Git's, keep theirs
too. Code, scripts and configuration written for them keep working.
git-antioxidant implements Git's workflows on top of gitoxide's plumbing:
- Commits:
Repository::commit_index()commits the index asgit commitdoes, with its hooks, the cleanup of the message,--amend, merge commits and signatures. - Merges:
Repository::merge_into_head()merges asgit mergedoes with its default strategy: fast-forwards,--no-ff,--ff-only,--squashand--no-commit, conflicts kept inMERGE_HEAD,MERGE_MSGandMERGE_MODE, and--continue,--abortand--quit. - Rebases:
Repository::rebase()rebases asgit rebasedoes with its merge backend: the commands of the todo list, stops at conflicts,edit,breakand failedexeclines, the sequence editor, the hooks, and--continue,--skip,--abortand--quit.gix-rebaseplans the todo list, andgix-sequencerreads and writes it with the state of the rebase. - Pushes: refspecs,
push.default,--delete,--tags,--follow-tags,--force,--force-with-lease,--atomic,--dry-run, push options, thepre-pushhook and the update of remote-tracking references, with thin packs whose deltas are searched asgit pack-objectssearches them. - Reset, switch and add:
Repository::reset()with--soft,--mixed,--hard,--mergeand--keep, and the reset of paths;gix_worktree_state::switch()with Git's two-way merge rules;gix::add::plumbing::add_all()asgit add --alldoes. - Hooks:
gix-hookfinds and runs hooks as Git does, fromcore.hooksPathand thehook.*configuration, with Git's working directory, environment, arguments and input. - Packs: delta compression in
gix-pack, repacking with deltas ingix-odbasgit repackdoes, and pack imports that stream blobs abovecore.bigFileThresholdasgit index-packdoes. - Diffs: rename and copy detection that chooses its sources as Git's
diffcore-rename.cdoes. - Integrity:
gix-fsckchecks commits, tags and trees, and the.gitmodulesand.gitattributesfiles that trees name, with Git's messages, severities andfsck.<id>configuration. - Trust: whether a repository of another owner is fully trusted is decided as Git decides it, by
safe.directory. - Credentials: Git's
storehelper runs in process, and other helpers are found in Git's directories and onPATH. - Bundles:
gix-bundlereads and writes the headers of bundles, verifies them and writes their packs. Creating bundles and fetching from them are in progress.
crate-status.md lists the state of every crate. SHORTCOMINGS.md and the
documentation of each function list where they still differ from Git.
The crates aren't published on crates.io, where the crates of the same names belong to gitoxide. Use them from this repository at an exact commit:
[dependencies]
gix = { git = "https://github.com/HORNET-Storage/git-antioxidant", rev = "<commit>" }or by path from a checkout. cargo doc -p gix --open builds the documentation. The Cargo.toml of each crate describes
its features, which cargo +nightly doc -p gix --features document-features --open also lists in the documentation.
The minimum supported Rust version is the rust-version of gix/Cargo.toml.
gix offers low-level commands for development and for trying functionality in real repositories, ein higher-level
ones. Neither is meant for use in scripts. To install both from this repository:
# Pure Rust, needing only a Rust toolchain and a C compiler.
cargo install --git https://github.com/HORNET-Storage/git-antioxidant --locked --no-default-features --features max-pure gitoxide
# The default build, `max`, which also needs `cmake`.
cargo install --git https://github.com/HORNET-Storage/git-antioxidant --locked gitoxideDEVELOPMENT.md describes the tools and practices, AGENTS.md the rules that every
change follows and STABILITY.md how the interfaces change. just test runs the lints, the builds of
the feature sets, the tests and the documentation builds.
Report vulnerabilities privately, as SECURITY.md describes. The
threat model describes what git-antioxidant defends against.
See CONTRIBUTING.md.
git-antioxidant is built on gitoxide by Sebastian Thiel and its
contributors, whose work makes up most of this repository. The history before the split is gitoxide's, including the
changelogs of the crates and the monthly reports in etc/reports. Git itself is the reference for every
behavior implemented here.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option, as gitoxide is.