NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #796 most downloaded on crates.io
Bindings to libgit2 for interoperating with git repositories. This library is both threadsafe and memory safe and allows both reading and writing git repositories.
Last release 4 months ago
18 May 2026
Ships fairly regularly
a new release about every 3 months
Some releases are documented
notes for 22 of the last 60 stable releases
6 versions withdrawn
withdrawn after publishing
12 years old
125 releases · first in 2014
Added experimental SHA256 repository support behind the new unstable-sha256 Cargo feature, along with *_ext API variants that accept an ObjectFormat.
unstable-sha256 Cargo feature,
along with *_ext API variants that accept an ObjectFormat.
#1206opts::set_cache_max_size() and opts::get_cached_memory().
#1188Repository::object_format() and a new ObjectFormat enum.
#1204Repository::set_config().
#1208merge_file() along with MergeFileInput.
#1210Repository::refdb_compress() for packing loose refs.
#1221Refdb type, along with Repository::refdb() and Repository::set_refdb(). Repository::refdb_compress() now delegates to Refdb::compress().
#1228Revspec::into_objects().
#1230BlameHunk::final_committer(), BlameHunk::orig_committer(), BlameHunk::summary(), and BlameHunk::summary_bytes().
#1231Clone for Reference.
#1233Repository::author_from_env() and Repository::committer_from_env().
#1237impl From<Utf8Error> for Error.
#1239ssh, https, and cred Cargo features are no longer enabled by default.
Previously default = ["ssh", "https"]; now default = [].
Enable them explicitly if you rely on credential helpers or transport support.
#1168CredentialHelper and the url dependency are now gated behind the new cred Cargo feature.
Enabling ssh or https transitively enables cred.
#1168Option<&str>
now return Result<&str, Error> or Result<Option<&str>, Error>,
so callers can distinguish a missing value from a non-UTF-8 one.
#1241BlameHunk::final_signature, BlameHunk::final_committer, BlameHunk::orig_signature, and BlameHunk::orig_committer
now return Option to avoid segfaults when signature information is missing.
#1254MergeOptions::skip_reuc() to use the correct GIT_MERGE_SKIP_REUC flag.
#1194Repository::submodules() now returns an Error when the underlying git_submodule_lookup() call to libgit2 fails, rather than panicking with a failed assertion.
#1220Reference::is_valid_name() now propagates errors from CString conversion instead of panicking.
#1229Remote::list() to return an empty list instead of erroring
when the remote advertises no refs.
#1250ReferenceNames now returns an Err for non-UTF-8 branch names instead of panicking.
#1239git_checkout_head.
#1149IndexAddOption flags.
#1163ssh feature.
#1187Repository::tag_foreach().
#1190StatusOptions.
#1199Signature::from_raw_const() docs.
#1222CheckoutBuilder::update_index() documentation.
#1232Repository::stash_save_ext() docs.
#1245CheckoutBuilder::refresh() docs.
#1252civet/conduit from dev-dependencies.
#1170time from 0.3.41 to 0.3.47.
#1215Repository::statuses().
#1251One column per quarter.
Fix undefined behavior when dereferencing empty Buf. #1213
Bumped requirement to libgit2-sys 0.18.3, which updates libgit2 from 1.9.0 to 1.9.2. #1197
Added Status::WT_UNREADABLE. #1151
Added Repository::branch_upstream_merge() #1131
Repository::branch_upstream_merge()
#1131Index::conflict_get()
#1134Index::conflict_remove()
#1133opts::set_cache_object_limit()
#1118Repo::merge_file_from_index() and associated MergeFileOptions and MergeFileResult.
#1062url dependency minimum raised to 2.5.4
#1128CredentialHelper::config) now checks for helpers that start with something that looks like an absolute path, rather than checking for a / or \ anywhere in the helper string (which resolves an issue if the helper had arguments with / or \).
#1137Debug is now implemented for transport::Service #1074
Debug is now implemented for transport::Service
#1074Repository::commondir
#1079Repository::merge_base_octopus
#1088PartialOrd, Ord, and Hash for bitflags types that were inadvertently removed in a prior release.
#1096CheckoutBuilder::disable_pathspec_match
#1107PackBuilder::write
#1110ssh_key_from_memory Cargo feature, it was unused.
#1087Tree::walk are now correctly reported to the caller.
#1098trace_set callback now takes a &[u8] instead of a &str.
#1071Error::last_error now returns Error instead of Option<Error>.
#1072Added opts functions to control server timeouts (get_server_connect_timeout_in_milliseconds, set_server_connect_timeout_in_milliseconds, get_server_ti
opts functions to control server timeouts (get_server_connect_timeout_in_milliseconds, set_server_connect_timeout_in_milliseconds, get_server_timeout_in_milliseconds, set_server_timeout_in_milliseconds), and add ErrorCode::Timeout.
#1052Added opts:: functions to get / set libgit2 mwindow options #1035
❗ Updated to libgit2 1.7.2. This fixes CVE-2024-24575 and CVE-2024-24577. #1017
opts::set_ssl_cert_file and opts::set_ssl_cert_dir for setting Certificate Authority file locations.
#997TreeIter::nth which makes jumping ahead in the iterator more efficient.
#1004Repository::find_commit_by_prefix to find a commit by a shortened hash.
#1011Repository::find_tag_by_prefix to find a tag by a shortened hash.
#1015Repository::find_object_by_prefix to find an object by a shortened hash.
#1014Added FetchOptions::depth to set the depth of a fetch or clone, adding support for shallow clones. #979
FetchOptions::depth to set the depth of a fetch or clone, adding support for shallow clones.
#979Added Blame::blame_buffer for getting blame data for a file that has been modified in memory. #981
Blame::blame_buffer for getting blame data for a file that has been modified in memory.
#981Revwalk::with_hide_callback to take a mutable reference to its callback to enforce type safety.
#970FusedIterator for many iterators that can support it.
#955-Zminimal-versions.
#960Added support for stashing with options (which can support partial stashing). #930
0.17.0...0.17.1 ### Changed - Updated to libgit2 1.6.4. #948
Added support for the deprecated group-writeable blob mode. This adds a new variant to FileMode. #887
IntoIterator implementation for Statuses.
#880Reference::symbolic_set_target
#893Copy, Clone, Debug, PartialEq, and Eq implementations for AutotagOption and FetchPrune.
#889Eq and PartialEq implementations for Signature.
#890Repository::discover_path.
#883Submodule::repo_init.
#914Tag::is_valid_name.
#882Repository::set_head_bytes.
#931Indexer type which is a low-level API for storing and indexing pack files.
#911Index::find_prefix.
#903FileMode.
#887PushCallbacks::push_negotiation callback and the corresponding PushUpdate type for getting receiving information about the updates to perform.
#926RemoteCallbacks::credentials callback error handler to correctly set the libgit2 error class.
#918DiffOptions::flag now takes a git_diff_option_t type.
#935Updated to libgit2-sys 0.14.2+1.5.1
Added ability to get the SSH host key and its type. This includes an API breaking change to the certificate_check callback. #909
certificate_check callback.
#909Added the EmailCreateOptions struct to control formatting of the email. Deprecates Diff::format_email, use Email::from_diff instead. #847
Repository::tag_annotation_create binding git_tag_annotation_create.
#845Email type which represents a patch in mbox format for sending via email.
Added the EmailCreateOptions struct to control formatting of the email.
Deprecates Diff::format_email, use Email::from_diff instead.
#847ErrorCode::Owner to map to the new GIT_EOWNER errors.
#839opts::set_verify_owner_validation to set whether or not ownership validation is performed.
#839Iterator implementation for ConfigEntries due to the unsound usage of the API which allowed values to be used after free.
Added ConfigEntries::next and ConfigEntries::for_each for iterating over all entries in a safe manor.
#854Added Commit::body and Commit::body_bytes for retrieving the commit message body. #835
Commit::body and Commit::body_bytes for retrieving the commit message body.
#835Tree::get_name_bytes to handle non-UTF-8 entry names.
#841Updated to libgit2-sys 0.13.3+1.4.2
Remote::create_detached.
#825Added Odb::exists_ext to checks if an object database has an object, with extended flags. #818
Odb::exists_ext to checks if an object database has an object, with extended flags.
#818Updated to libgit2-sys 0.13.1+1.4.2
Deprecated PackBuilder::hash, use PackBuilder::name instead.
opts::get_extensions and opts::set_extensions to support git extensions.
#791PackBuilder::name and PackBuilder::name_bytes.
#806
PackBuilder::hash, use PackBuilder::name instead.FetchOptions::follow_redirects and PushOptions::follow_redirects.
#806StatusOptions::rename_threshold.
#806Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →