mirror of
https://github.com/edg-l/edlang.git
synced 2024-11-12 19:18:24 +00:00
72 lines
50 KiB
HTML
72 lines
50 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="libgit2 bindings for Rust"><title>git2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="git2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../git2/index.html">git2</a><span class="version">0.18.2</span></h2></div><div class="sidebar-elems"><ul class="block">
|
||
<li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Aliases</a></li></ul></section></div></nav><div class="sidebar-resizer"></div>
|
||
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../git2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Crate <a class="mod" href="#">git2</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/git2/lib.rs.html#1-1668">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="libgit2-bindings-for-rust"><a href="#libgit2-bindings-for-rust">libgit2 bindings for Rust</a></h2>
|
||
<p>This library contains bindings to the <a href="https://libgit2.github.com/">libgit2</a> C library which is used
|
||
to manage git repositories. The library itself is a work in progress and is
|
||
likely lacking some bindings here and there, so be warned.</p>
|
||
<p>The git2-rs library strives to be as close to libgit2 as possible, but also
|
||
strives to make using libgit2 as safe as possible. All resource management
|
||
is automatic as well as adding strong types to all interfaces (including
|
||
<code>Result</code>)</p>
|
||
<h3 id="creating-a-repository"><a href="#creating-a-repository">Creating a <code>Repository</code></a></h3>
|
||
<p>The <code>Repository</code> is the source from which almost all other objects in git-rs
|
||
are spawned. A repository can be created through opening, initializing, or
|
||
cloning.</p>
|
||
<h4 id="initializing-a-new-repository"><a href="#initializing-a-new-repository">Initializing a new repository</a></h4>
|
||
<p>The <code>init</code> method will create a new repository, assuming one does not
|
||
already exist.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>git2::Repository;
|
||
|
||
<span class="kw">let </span>repo = <span class="kw">match </span>Repository::init(<span class="string">"/path/to/a/repo"</span>) {
|
||
<span class="prelude-val">Ok</span>(repo) => repo,
|
||
<span class="prelude-val">Err</span>(e) => <span class="macro">panic!</span>(<span class="string">"failed to init: {}"</span>, e),
|
||
};</code></pre></div>
|
||
<h4 id="opening-an-existing-repository"><a href="#opening-an-existing-repository">Opening an existing repository</a></h4>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>git2::Repository;
|
||
|
||
<span class="kw">let </span>repo = <span class="kw">match </span>Repository::open(<span class="string">"/path/to/a/repo"</span>) {
|
||
<span class="prelude-val">Ok</span>(repo) => repo,
|
||
<span class="prelude-val">Err</span>(e) => <span class="macro">panic!</span>(<span class="string">"failed to open: {}"</span>, e),
|
||
};</code></pre></div>
|
||
<h4 id="cloning-an-existing-repository"><a href="#cloning-an-existing-repository">Cloning an existing repository</a></h4>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>git2::Repository;
|
||
|
||
<span class="kw">let </span>url = <span class="string">"https://github.com/alexcrichton/git2-rs"</span>;
|
||
<span class="kw">let </span>repo = <span class="kw">match </span>Repository::clone(url, <span class="string">"/path/to/a/repo"</span>) {
|
||
<span class="prelude-val">Ok</span>(repo) => repo,
|
||
<span class="prelude-val">Err</span>(e) => <span class="macro">panic!</span>(<span class="string">"failed to clone: {}"</span>, e),
|
||
};</code></pre></div>
|
||
<p>To clone using SSH, refer to <a href="./build/struct.RepoBuilder.html">RepoBuilder</a>.</p>
|
||
<h3 id="working-with-a-repository"><a href="#working-with-a-repository">Working with a <code>Repository</code></a></h3>
|
||
<p>All derivative objects, references, etc are attached to the lifetime of the
|
||
source <code>Repository</code>, to ensure that they do not outlive the repository
|
||
itself.</p>
|
||
</div></details><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="build/index.html" title="mod git2::build">build</a></div><div class="desc docblock-short">Builder-pattern objects for configuration various git operations.</div></li><li><div class="item-name"><a class="mod" href="cert/index.html" title="mod git2::cert">cert</a></div><div class="desc docblock-short">Certificate types which are passed to <code>CertificateCheck</code> in
|
||
<code>RemoteCallbacks</code>.</div></li><li><div class="item-name"><a class="mod" href="oid_array/index.html" title="mod git2::oid_array">oid_array</a></div><div class="desc docblock-short">Bindings to libgit2’s raw <code>git_oidarray</code> type</div></li><li><div class="item-name"><a class="mod" href="opts/index.html" title="mod git2::opts">opts</a></div><div class="desc docblock-short">Bindings to libgit2’s git_libgit2_opts function.</div></li><li><div class="item-name"><a class="mod" href="string_array/index.html" title="mod git2::string_array">string_array</a></div><div class="desc docblock-short">Bindings to libgit2’s raw <code>git_strarray</code> type</div></li><li><div class="item-name"><a class="mod" href="transport/index.html" title="mod git2::transport">transport</a></div><div class="desc docblock-short">Interfaces for adding custom transports to libgit2</div></li></ul><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a></div><div class="desc docblock-short">A structure to represent an annotated commit, the input to merge and rebase.</div></li><li><div class="item-name"><a class="struct" href="struct.ApplyOptions.html" title="struct git2::ApplyOptions">ApplyOptions</a></div><div class="desc docblock-short">Options to specify when applying a diff</div></li><li><div class="item-name"><a class="struct" href="struct.AttrCheckFlags.html" title="struct git2::AttrCheckFlags">AttrCheckFlags</a></div></li><li><div class="item-name"><a class="struct" href="struct.Blame.html" title="struct git2::Blame">Blame</a></div><div class="desc docblock-short">Opaque structure to hold blame results.</div></li><li><div class="item-name"><a class="struct" href="struct.BlameHunk.html" title="struct git2::BlameHunk">BlameHunk</a></div><div class="desc docblock-short">Structure that represents a blame hunk.</div></li><li><div class="item-name"><a class="struct" href="struct.BlameIter.html" title="struct git2::BlameIter">BlameIter</a></div><div class="desc docblock-short">An iterator over the hunks in a blame.</div></li><li><div class="item-name"><a class="struct" href="struct.BlameOptions.html" title="struct git2::BlameOptions">BlameOptions</a></div><div class="desc docblock-short">Blame options</div></li><li><div class="item-name"><a class="struct" href="struct.Blob.html" title="struct git2::Blob">Blob</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Internals-Git-Objects">blob</a></div></li><li><div class="item-name"><a class="struct" href="struct.BlobWriter.html" title="struct git2::BlobWriter">BlobWriter</a></div><div class="desc docblock-short">A structure to represent a git writestream for blobs</div></li><li><div class="item-name"><a class="struct" href="struct.Branch.html" title="struct git2::Branch">Branch</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is">branch</a></div></li><li><div class="item-name"><a class="struct" href="struct.Branches.html" title="struct git2::Branches">Branches</a></div><div class="desc docblock-short">An iterator over the branches inside of a repository.</div></li><li><div class="item-name"><a class="struct" href="struct.Buf.html" title="struct git2::Buf">Buf</a></div><div class="desc docblock-short">A structure to wrap an intermediate buffer used by libgit2.</div></li><li><div class="item-name"><a class="struct" href="struct.CheckoutNotificationType.html" title="struct git2::CheckoutNotificationType">CheckoutNotificationType</a></div><div class="desc docblock-short">Types of notifications emitted from checkouts.</div></li><li><div class="item-name"><a class="struct" href="struct.CherrypickOptions.html" title="struct git2::CherrypickOptions">CherrypickOptions</a></div><div class="desc docblock-short">Options to specify when cherry picking</div></li><li><div class="item-name"><a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Internals-Git-Objects">commit</a></div></li><li><div class="item-name"><a class="struct" href="struct.Config.html" title="struct git2::Config">Config</a></div><div class="desc docblock-short">A structure representing a git configuration key/value store</div></li><li><div class="item-name"><a class="struct" href="struct.ConfigEntries.html" title="struct git2::ConfigEntries">ConfigEntries</a></div><div class="desc docblock-short">An iterator over the <code>ConfigEntry</code> values of a <code>Config</code> structure.</div></li><li><div class="item-name"><a class="struct" href="struct.ConfigEntry.html" title="struct git2::ConfigEntry">ConfigEntry</a></div><div class="desc docblock-short">A struct representing a certain entry owned by a <code>Config</code> instance.</div></li><li><div class="item-name"><a class="struct" href="struct.Cred.html" title="struct git2::Cred">Cred</a></div><div class="desc docblock-short">A structure to represent git credentials in libgit2.</div></li><li><div class="item-name"><a class="struct" href="struct.CredentialHelper.html" title="struct git2::CredentialHelper">CredentialHelper</a></div><div class="desc docblock-short">Management of the gitcredentials(7) interface.</div></li><li><div class="item-name"><a class="struct" href="struct.CredentialType.html" title="struct git2::CredentialType">CredentialType</a></div><div class="desc docblock-short">Types of credentials that can be requested by a credential callback.</div></li><li><div class="item-name"><a class="struct" href="struct.Deltas.html" title="struct git2::Deltas">Deltas</a></div><div class="desc docblock-short">An iterator over the diffs in a delta</div></li><li><div class="item-name"><a class="struct" href="struct.Describe.html" title="struct git2::Describe">Describe</a></div><div class="desc docblock-short">The result of a <code>describe</code> operation on either an <code>Describe</code> or a
|
||
<code>Repository</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.DescribeFormatOptions.html" title="struct git2::DescribeFormatOptions">DescribeFormatOptions</a></div><div class="desc docblock-short">Options which can be used to customize how a description is formatted.</div></li><li><div class="item-name"><a class="struct" href="struct.DescribeOptions.html" title="struct git2::DescribeOptions">DescribeOptions</a></div><div class="desc docblock-short">Options which indicate how a <code>Describe</code> is created.</div></li><li><div class="item-name"><a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a></div><div class="desc docblock-short">The diff object that contains all individual file deltas.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffBinary.html" title="struct git2::DiffBinary">DiffBinary</a></div><div class="desc docblock-short">Structure describing the binary contents of a diff.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffBinaryFile.html" title="struct git2::DiffBinaryFile">DiffBinaryFile</a></div><div class="desc docblock-short">The contents of one of the files in a binary diff.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffDelta.html" title="struct git2::DiffDelta">DiffDelta</a></div><div class="desc docblock-short">Description of changes to one entry.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffFile.html" title="struct git2::DiffFile">DiffFile</a></div><div class="desc docblock-short">Description of one side of a delta.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffFindOptions.html" title="struct git2::DiffFindOptions">DiffFindOptions</a></div><div class="desc docblock-short">Control behavior of rename and copy detection</div></li><li><div class="item-name"><a class="struct" href="struct.DiffFlags.html" title="struct git2::DiffFlags">DiffFlags</a></div></li><li><div class="item-name"><a class="struct" href="struct.DiffHunk.html" title="struct git2::DiffHunk">DiffHunk</a></div><div class="desc docblock-short">Structure describing a hunk of a diff.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffLine.html" title="struct git2::DiffLine">DiffLine</a></div><div class="desc docblock-short">Structure describing a line (or data span) of a diff.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffOptions.html" title="struct git2::DiffOptions">DiffOptions</a></div><div class="desc docblock-short">Structure describing options about how the diff should be executed.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffPatchidOptions.html" title="struct git2::DiffPatchidOptions">DiffPatchidOptions</a></div><div class="desc docblock-short">Control behavior of formatting emails</div></li><li><div class="item-name"><a class="struct" href="struct.DiffStats.html" title="struct git2::DiffStats">DiffStats</a></div><div class="desc docblock-short">Structure describing a hunk of a diff.</div></li><li><div class="item-name"><a class="struct" href="struct.DiffStatsFormat.html" title="struct git2::DiffStatsFormat">DiffStatsFormat</a></div><div class="desc docblock-short">Formatting options for diff stats</div></li><li><div class="item-name"><a class="struct" href="struct.Email.html" title="struct git2::Email">Email</a></div><div class="desc docblock-short">A structure to represent patch in mbox format for sending via email</div></li><li><div class="item-name"><a class="struct" href="struct.EmailCreateOptions.html" title="struct git2::EmailCreateOptions">EmailCreateOptions</a></div><div class="desc docblock-short">Options for controlling the formatting of the generated e-mail.</div></li><li><div class="item-name"><a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a></div><div class="desc docblock-short">A structure to represent errors coming out of libgit2.</div></li><li><div class="item-name"><a class="struct" href="struct.FetchOptions.html" title="struct git2::FetchOptions">FetchOptions</a></div><div class="desc docblock-short">Options which can be specified to various fetch operations.</div></li><li><div class="item-name"><a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Internals-Git-Objects">index</a></div></li><li><div class="item-name"><a class="struct" href="struct.IndexAddOption.html" title="struct git2::IndexAddOption">IndexAddOption</a></div><div class="desc docblock-short">Flags for APIs that add files matching pathspec</div></li><li><div class="item-name"><a class="struct" href="struct.IndexConflict.html" title="struct git2::IndexConflict">IndexConflict</a></div><div class="desc docblock-short">A structure to represent the information returned when a conflict is detected in an index entry</div></li><li><div class="item-name"><a class="struct" href="struct.IndexConflicts.html" title="struct git2::IndexConflicts">IndexConflicts</a></div><div class="desc docblock-short">An iterator over the conflicting entries in an index</div></li><li><div class="item-name"><a class="struct" href="struct.IndexEntries.html" title="struct git2::IndexEntries">IndexEntries</a></div><div class="desc docblock-short">An iterator over the entries in an index</div></li><li><div class="item-name"><a class="struct" href="struct.IndexEntry.html" title="struct git2::IndexEntry">IndexEntry</a></div><div class="desc docblock-short">A structure to represent an entry or a file inside of an index.</div></li><li><div class="item-name"><a class="struct" href="struct.IndexEntryExtendedFlag.html" title="struct git2::IndexEntryExtendedFlag">IndexEntryExtendedFlag</a></div><div class="desc docblock-short">Flags for the <code>extended_flags</code> field of an IndexEntry.</div></li><li><div class="item-name"><a class="struct" href="struct.IndexEntryFlag.html" title="struct git2::IndexEntryFlag">IndexEntryFlag</a></div><div class="desc docblock-short">Flags for the <code>flags</code> field of an IndexEntry.</div></li><li><div class="item-name"><a class="struct" href="struct.IndexTime.html" title="struct git2::IndexTime">IndexTime</a></div><div class="desc docblock-short">Time structure used in a git index entry.</div></li><li><div class="item-name"><a class="struct" href="struct.Indexer.html" title="struct git2::Indexer">Indexer</a></div><div class="desc docblock-short">A stream to write and index a packfile</div></li><li><div class="item-name"><a class="struct" href="struct.Mailmap.html" title="struct git2::Mailmap">Mailmap</a></div><div class="desc docblock-short">A structure to represent a repository’s .mailmap file.</div></li><li><div class="item-name"><a class="struct" href="struct.Mempack.html" title="struct git2::Mempack">Mempack</a></div><div class="desc docblock-short">A structure to represent a mempack backend for the object database. The
|
||
Mempack is bound to the Odb that it was created from, and cannot outlive
|
||
that Odb.</div></li><li><div class="item-name"><a class="struct" href="struct.MergeAnalysis.html" title="struct git2::MergeAnalysis">MergeAnalysis</a></div><div class="desc docblock-short">The results of <code>merge_analysis</code> indicating the merge opportunities.</div></li><li><div class="item-name"><a class="struct" href="struct.MergeOptions.html" title="struct git2::MergeOptions">MergeOptions</a></div><div class="desc docblock-short">Options to specify when merging.</div></li><li><div class="item-name"><a class="struct" href="struct.MergePreference.html" title="struct git2::MergePreference">MergePreference</a></div><div class="desc docblock-short">The user’s stated preference for merges.</div></li><li><div class="item-name"><a class="struct" href="struct.MessageTrailersBytes.html" title="struct git2::MessageTrailersBytes">MessageTrailersBytes</a></div><div class="desc docblock-short">Collection of unencoded (bytes) trailers.</div></li><li><div class="item-name"><a class="struct" href="struct.MessageTrailersBytesIterator.html" title="struct git2::MessageTrailersBytesIterator">MessageTrailersBytesIterator</a></div><div class="desc docblock-short">Borrowed iterator over the raw (bytes) trailers.</div></li><li><div class="item-name"><a class="struct" href="struct.MessageTrailersStrs.html" title="struct git2::MessageTrailersStrs">MessageTrailersStrs</a></div><div class="desc docblock-short">Collection of UTF-8-encoded trailers.</div></li><li><div class="item-name"><a class="struct" href="struct.MessageTrailersStrsIterator.html" title="struct git2::MessageTrailersStrsIterator">MessageTrailersStrsIterator</a></div><div class="desc docblock-short">Borrowed iterator over the UTF-8-encoded trailers.</div></li><li><div class="item-name"><a class="struct" href="struct.Note.html" title="struct git2::Note">Note</a></div><div class="desc docblock-short">A structure representing a <a href="http://alblue.bandlem.com/2011/11/git-tip-of-week-git-notes.html">note</a> in git.</div></li><li><div class="item-name"><a class="struct" href="struct.Notes.html" title="struct git2::Notes">Notes</a></div><div class="desc docblock-short">An iterator over all of the notes within a repository.</div></li><li><div class="item-name"><a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Internals-Git-Objects">object</a></div></li><li><div class="item-name"><a class="struct" href="struct.Odb.html" title="struct git2::Odb">Odb</a></div><div class="desc docblock-short">A structure to represent a git object database</div></li><li><div class="item-name"><a class="struct" href="struct.OdbLookupFlags.html" title="struct git2::OdbLookupFlags">OdbLookupFlags</a></div><div class="desc docblock-short">Flags controlling the behavior of ODB lookup operations</div></li><li><div class="item-name"><a class="struct" href="struct.OdbObject.html" title="struct git2::OdbObject">OdbObject</a></div><div class="desc docblock-short">An object from the Object Database.</div></li><li><div class="item-name"><a class="struct" href="struct.OdbPackwriter.html" title="struct git2::OdbPackwriter">OdbPackwriter</a></div><div class="desc docblock-short">A stream to write a packfile to the ODB</div></li><li><div class="item-name"><a class="struct" href="struct.OdbReader.html" title="struct git2::OdbReader">OdbReader</a></div><div class="desc docblock-short">A structure to represent a git ODB rstream</div></li><li><div class="item-name"><a class="struct" href="struct.OdbWriter.html" title="struct git2::OdbWriter">OdbWriter</a></div><div class="desc docblock-short">A structure to represent a git ODB wstream</div></li><li><div class="item-name"><a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a></div><div class="desc docblock-short">Unique identity of any object (commit, tree, blob, tag).</div></li><li><div class="item-name"><a class="struct" href="struct.PackBuilder.html" title="struct git2::PackBuilder">PackBuilder</a></div><div class="desc docblock-short">A builder for creating a packfile</div></li><li><div class="item-name"><a class="struct" href="struct.Parents.html" title="struct git2::Parents">Parents</a></div><div class="desc docblock-short">An iterator over the parent commits of a commit.</div></li><li><div class="item-name"><a class="struct" href="struct.Patch.html" title="struct git2::Patch">Patch</a></div><div class="desc docblock-short">A structure representing the text changes in a single diff delta.</div></li><li><div class="item-name"><a class="struct" href="struct.Pathspec.html" title="struct git2::Pathspec">Pathspec</a></div><div class="desc docblock-short">Structure representing a compiled pathspec used for matching against various
|
||
structures.</div></li><li><div class="item-name"><a class="struct" href="struct.PathspecDiffEntries.html" title="struct git2::PathspecDiffEntries">PathspecDiffEntries</a></div><div class="desc docblock-short">Iterator over the matching diff deltas.</div></li><li><div class="item-name"><a class="struct" href="struct.PathspecEntries.html" title="struct git2::PathspecEntries">PathspecEntries</a></div><div class="desc docblock-short">Iterator over the matched paths in a pathspec.</div></li><li><div class="item-name"><a class="struct" href="struct.PathspecFailedEntries.html" title="struct git2::PathspecFailedEntries">PathspecFailedEntries</a></div><div class="desc docblock-short">Iterator over the failed list of pathspec items that did not match.</div></li><li><div class="item-name"><a class="struct" href="struct.PathspecFlags.html" title="struct git2::PathspecFlags">PathspecFlags</a></div><div class="desc docblock-short">…</div></li><li><div class="item-name"><a class="struct" href="struct.PathspecMatchList.html" title="struct git2::PathspecMatchList">PathspecMatchList</a></div><div class="desc docblock-short">List of filenames matching a pathspec.</div></li><li><div class="item-name"><a class="struct" href="struct.Progress.html" title="struct git2::Progress">Progress</a></div><div class="desc docblock-short">Struct representing the progress by an in-flight transfer.</div></li><li><div class="item-name"><a class="struct" href="struct.ProxyOptions.html" title="struct git2::ProxyOptions">ProxyOptions</a></div><div class="desc docblock-short">Options which can be specified to various fetch operations.</div></li><li><div class="item-name"><a class="struct" href="struct.PushOptions.html" title="struct git2::PushOptions">PushOptions</a></div><div class="desc docblock-short">Options to control the behavior of a git push.</div></li><li><div class="item-name"><a class="struct" href="struct.PushUpdate.html" title="struct git2::PushUpdate">PushUpdate</a></div><div class="desc docblock-short">Represents an update which will be performed on the remote during push.</div></li><li><div class="item-name"><a class="struct" href="struct.Rebase.html" title="struct git2::Rebase">Rebase</a></div><div class="desc docblock-short">Representation of a rebase</div></li><li><div class="item-name"><a class="struct" href="struct.RebaseOperation.html" title="struct git2::RebaseOperation">RebaseOperation</a></div><div class="desc docblock-short">A rebase operation</div></li><li><div class="item-name"><a class="struct" href="struct.RebaseOptions.html" title="struct git2::RebaseOptions">RebaseOptions</a></div><div class="desc docblock-short">Rebase options</div></li><li><div class="item-name"><a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Internals-Git-References">reference</a>.</div></li><li><div class="item-name"><a class="struct" href="struct.ReferenceFormat.html" title="struct git2::ReferenceFormat">ReferenceFormat</a></div><div class="desc docblock-short">Options for <a href="struct.Reference.html#method.normalize_name" title="associated function git2::Reference::normalize_name"><code>Reference::normalize_name</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.ReferenceNames.html" title="struct git2::ReferenceNames">ReferenceNames</a></div><div class="desc docblock-short">An iterator over the names of references in a repository.</div></li><li><div class="item-name"><a class="struct" href="struct.References.html" title="struct git2::References">References</a></div><div class="desc docblock-short">An iterator over the references in a repository.</div></li><li><div class="item-name"><a class="struct" href="struct.Reflog.html" title="struct git2::Reflog">Reflog</a></div><div class="desc docblock-short">A reference log of a git repository.</div></li><li><div class="item-name"><a class="struct" href="struct.ReflogEntry.html" title="struct git2::ReflogEntry">ReflogEntry</a></div><div class="desc docblock-short">An entry inside the reflog of a repository</div></li><li><div class="item-name"><a class="struct" href="struct.ReflogIter.html" title="struct git2::ReflogIter">ReflogIter</a></div><div class="desc docblock-short">An iterator over the entries inside of a reflog.</div></li><li><div class="item-name"><a class="struct" href="struct.Refspec.html" title="struct git2::Refspec">Refspec</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Internals-The-Refspec">refspec</a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Refspecs.html" title="struct git2::Refspecs">Refspecs</a></div><div class="desc docblock-short">An iterator over the refspecs that a remote contains.</div></li><li><div class="item-name"><a class="struct" href="struct.Remote.html" title="struct git2::Remote">Remote</a></div><div class="desc docblock-short">A structure representing a <a href="http://git-scm.com/book/en/Git-Basics-Working-with-Remotes">remote</a> of a git repository.</div></li><li><div class="item-name"><a class="struct" href="struct.RemoteCallbacks.html" title="struct git2::RemoteCallbacks">RemoteCallbacks</a></div><div class="desc docblock-short">A structure to contain the callbacks which are invoked when a repository is
|
||
being updated or downloaded.</div></li><li><div class="item-name"><a class="struct" href="struct.RemoteConnection.html" title="struct git2::RemoteConnection">RemoteConnection</a></div><div class="desc docblock-short">Holds callbacks for a connection to a <code>Remote</code>. Disconnects when dropped</div></li><li><div class="item-name"><a class="struct" href="struct.RemoteHead.html" title="struct git2::RemoteHead">RemoteHead</a></div><div class="desc docblock-short">Description of a reference advertised by a remote server, given out on calls
|
||
to <code>list</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></div><div class="desc docblock-short">An owned git repository, representing all state associated with the
|
||
underlying filesystem.</div></li><li><div class="item-name"><a class="struct" href="struct.RepositoryInitMode.html" title="struct git2::RepositoryInitMode">RepositoryInitMode</a></div><div class="desc docblock-short">Mode options for RepositoryInitOptions</div></li><li><div class="item-name"><a class="struct" href="struct.RepositoryInitOptions.html" title="struct git2::RepositoryInitOptions">RepositoryInitOptions</a></div><div class="desc docblock-short">Options which can be used to configure how a repository is initialized</div></li><li><div class="item-name"><a class="struct" href="struct.RepositoryOpenFlags.html" title="struct git2::RepositoryOpenFlags">RepositoryOpenFlags</a></div><div class="desc docblock-short">Flags for <code>Repository::open_ext</code></div></li><li><div class="item-name"><a class="struct" href="struct.RevertOptions.html" title="struct git2::RevertOptions">RevertOptions</a></div><div class="desc docblock-short">Options to specify when reverting</div></li><li><div class="item-name"><a class="struct" href="struct.RevparseMode.html" title="struct git2::RevparseMode">RevparseMode</a></div><div class="desc docblock-short">Flags for the return value of <code>Repository::revparse</code></div></li><li><div class="item-name"><a class="struct" href="struct.Revspec.html" title="struct git2::Revspec">Revspec</a></div><div class="desc docblock-short">A revspec represents a range of revisions within a repository.</div></li><li><div class="item-name"><a class="struct" href="struct.Revwalk.html" title="struct git2::Revwalk">Revwalk</a></div><div class="desc docblock-short">A revwalk allows traversal of the commit graph defined by including one or
|
||
more leaves and excluding one or more roots.</div></li><li><div class="item-name"><a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a></div><div class="desc docblock-short">A Signature is used to indicate authorship of various actions throughout the
|
||
library.</div></li><li><div class="item-name"><a class="struct" href="struct.Sort.html" title="struct git2::Sort">Sort</a></div><div class="desc docblock-short">Orderings that may be specified for Revwalk iteration.</div></li><li><div class="item-name"><a class="struct" href="struct.StashApplyFlags.html" title="struct git2::StashApplyFlags">StashApplyFlags</a></div></li><li><div class="item-name"><a class="struct" href="struct.StashApplyOptions.html" title="struct git2::StashApplyOptions">StashApplyOptions</a></div><div class="desc docblock-short">Stash application options structure</div></li><li><div class="item-name"><a class="struct" href="struct.StashFlags.html" title="struct git2::StashFlags">StashFlags</a></div></li><li><div class="item-name"><a class="struct" href="struct.StashSaveOptions.html" title="struct git2::StashSaveOptions">StashSaveOptions</a></div><div class="desc docblock-short">Stash application options structure</div></li><li><div class="item-name"><a class="struct" href="struct.Status.html" title="struct git2::Status">Status</a></div><div class="desc docblock-short">Status flags for a single file</div></li><li><div class="item-name"><a class="struct" href="struct.StatusEntry.html" title="struct git2::StatusEntry">StatusEntry</a></div><div class="desc docblock-short">A structure representing an entry in the <code>Statuses</code> structure.</div></li><li><div class="item-name"><a class="struct" href="struct.StatusIter.html" title="struct git2::StatusIter">StatusIter</a></div><div class="desc docblock-short">An iterator over the statuses in a <code>Statuses</code> instance.</div></li><li><div class="item-name"><a class="struct" href="struct.StatusOptions.html" title="struct git2::StatusOptions">StatusOptions</a></div><div class="desc docblock-short">Options that can be provided to <code>repo.statuses()</code> to control how the status
|
||
information is gathered.</div></li><li><div class="item-name"><a class="struct" href="struct.Statuses.html" title="struct git2::Statuses">Statuses</a></div><div class="desc docblock-short">A container for a list of status information about a repository.</div></li><li><div class="item-name"><a class="struct" href="struct.Submodule.html" title="struct git2::Submodule">Submodule</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Tools-Submodules">submodule</a></div></li><li><div class="item-name"><a class="struct" href="struct.SubmoduleStatus.html" title="struct git2::SubmoduleStatus">SubmoduleStatus</a></div><div class="desc docblock-short">Return codes for submodule status.</div></li><li><div class="item-name"><a class="struct" href="struct.SubmoduleUpdateOptions.html" title="struct git2::SubmoduleUpdateOptions">SubmoduleUpdateOptions</a></div><div class="desc docblock-short">Options to update a submodule.</div></li><li><div class="item-name"><a class="struct" href="struct.Tag.html" title="struct git2::Tag">Tag</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Basics-Tagging">tag</a></div></li><li><div class="item-name"><a class="struct" href="struct.Time.html" title="struct git2::Time">Time</a></div><div class="desc docblock-short">Time in a signature</div></li><li><div class="item-name"><a class="struct" href="struct.Transaction.html" title="struct git2::Transaction">Transaction</a></div><div class="desc docblock-short">A structure representing a transactional update of a repository’s references.</div></li><li><div class="item-name"><a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a></div><div class="desc docblock-short">A structure to represent a git <a href="http://git-scm.com/book/en/Git-Internals-Git-Objects">tree</a></div></li><li><div class="item-name"><a class="struct" href="struct.TreeBuilder.html" title="struct git2::TreeBuilder">TreeBuilder</a></div><div class="desc docblock-short">Constructor for in-memory trees (low-level)</div></li><li><div class="item-name"><a class="struct" href="struct.TreeEntry.html" title="struct git2::TreeEntry">TreeEntry</a></div><div class="desc docblock-short">A structure representing an entry inside of a tree. An entry is borrowed
|
||
from a tree.</div></li><li><div class="item-name"><a class="struct" href="struct.TreeIter.html" title="struct git2::TreeIter">TreeIter</a></div><div class="desc docblock-short">An iterator over the entries in a tree.</div></li><li><div class="item-name"><a class="struct" href="struct.Version.html" title="struct git2::Version">Version</a></div><div class="desc docblock-short">Version information about libgit2 and the capabilities it supports.</div></li><li><div class="item-name"><a class="struct" href="struct.Worktree.html" title="struct git2::Worktree">Worktree</a></div><div class="desc docblock-short">An owned git worktree</div></li><li><div class="item-name"><a class="struct" href="struct.WorktreeAddOptions.html" title="struct git2::WorktreeAddOptions">WorktreeAddOptions</a></div><div class="desc docblock-short">Options which can be used to configure how a worktree is initialized</div></li><li><div class="item-name"><a class="struct" href="struct.WorktreePruneOptions.html" title="struct git2::WorktreePruneOptions">WorktreePruneOptions</a></div><div class="desc docblock-short">Options to configure how worktree pruning is performed</div></li></ul><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.ApplyLocation.html" title="enum git2::ApplyLocation">ApplyLocation</a></div><div class="desc docblock-short">Possible application locations for git_apply
|
||
see <a href="https://libgit2.org/libgit2/#HEAD/type/git_apply_options">https://libgit2.org/libgit2/#HEAD/type/git_apply_options</a></div></li><li><div class="item-name"><a class="enum" href="enum.AttrValue.html" title="enum git2::AttrValue">AttrValue</a></div><div class="desc docblock-short">All possible states of an attribute.</div></li><li><div class="item-name"><a class="enum" href="enum.AutotagOption.html" title="enum git2::AutotagOption">AutotagOption</a></div><div class="desc docblock-short">Automatic tag following options.</div></li><li><div class="item-name"><a class="enum" href="enum.BranchType.html" title="enum git2::BranchType">BranchType</a></div><div class="desc docblock-short">An enumeration for the possible types of branches</div></li><li><div class="item-name"><a class="enum" href="enum.CertificateCheckStatus.html" title="enum git2::CertificateCheckStatus">CertificateCheckStatus</a></div><div class="desc docblock-short">The return value for the <a href="struct.RemoteCallbacks.html#method.certificate_check" title="method git2::RemoteCallbacks::certificate_check"><code>RemoteCallbacks::certificate_check</code></a> callback.</div></li><li><div class="item-name"><a class="enum" href="enum.ConfigLevel.html" title="enum git2::ConfigLevel">ConfigLevel</a></div><div class="desc docblock-short">An enumeration of the possible priority levels of a config file.</div></li><li><div class="item-name"><a class="enum" href="enum.Delta.html" title="enum git2::Delta">Delta</a></div><div class="desc docblock-short">What type of change is described by a <code>DiffDelta</code>?</div></li><li><div class="item-name"><a class="enum" href="enum.DiffBinaryKind.html" title="enum git2::DiffBinaryKind">DiffBinaryKind</a></div><div class="desc docblock-short">When producing a binary diff, the binary data returned will be
|
||
either the deflated full (“literal”) contents of the file, or
|
||
the deflated binary delta between the two sides (whichever is
|
||
smaller).</div></li><li><div class="item-name"><a class="enum" href="enum.DiffFormat.html" title="enum git2::DiffFormat">DiffFormat</a></div><div class="desc docblock-short">Possible output formats for diff data</div></li><li><div class="item-name"><a class="enum" href="enum.DiffLineType.html" title="enum git2::DiffLineType">DiffLineType</a></div><div class="desc docblock-short">Line origin constants.</div></li><li><div class="item-name"><a class="enum" href="enum.Direction.html" title="enum git2::Direction">Direction</a></div><div class="desc docblock-short">An enumeration of the possible directions for a remote.</div></li><li><div class="item-name"><a class="enum" href="enum.ErrorClass.html" title="enum git2::ErrorClass">ErrorClass</a></div><div class="desc docblock-short">An enumeration of possible categories of things that can have
|
||
errors when working with a git repository.</div></li><li><div class="item-name"><a class="enum" href="enum.ErrorCode.html" title="enum git2::ErrorCode">ErrorCode</a></div><div class="desc docblock-short">An enumeration of possible errors that can happen when working with a git
|
||
repository.</div></li><li><div class="item-name"><a class="enum" href="enum.FetchPrune.html" title="enum git2::FetchPrune">FetchPrune</a></div><div class="desc docblock-short">Configuration for how pruning is done on a fetch</div></li><li><div class="item-name"><a class="enum" href="enum.FileFavor.html" title="enum git2::FileFavor">FileFavor</a></div><div class="desc docblock-short">Merge file favor options for <code>MergeOptions</code> instruct the file-level
|
||
merging functionality how to deal with conflicting regions of the files.</div></li><li><div class="item-name"><a class="enum" href="enum.FileMode.html" title="enum git2::FileMode">FileMode</a></div><div class="desc docblock-short">Valid modes for index and tree entries.</div></li><li><div class="item-name"><a class="enum" href="enum.ObjectType.html" title="enum git2::ObjectType">ObjectType</a></div><div class="desc docblock-short">An enumeration all possible kinds objects may have.</div></li><li><div class="item-name"><a class="enum" href="enum.PackBuilderStage.html" title="enum git2::PackBuilderStage">PackBuilderStage</a></div><div class="desc docblock-short">Stages that are reported by the <code>PackBuilder</code> progress callback.</div></li><li><div class="item-name"><a class="enum" href="enum.RebaseOperationType.html" title="enum git2::RebaseOperationType">RebaseOperationType</a></div><div class="desc docblock-short">A rebase operation</div></li><li><div class="item-name"><a class="enum" href="enum.ReferenceType.html" title="enum git2::ReferenceType">ReferenceType</a></div><div class="desc docblock-short">An enumeration of all possible kinds of references.</div></li><li><div class="item-name"><a class="enum" href="enum.RemoteRedirect.html" title="enum git2::RemoteRedirect">RemoteRedirect</a></div><div class="desc docblock-short">Remote redirection settings; whether redirects to another host are
|
||
permitted.</div></li><li><div class="item-name"><a class="enum" href="enum.RepositoryState.html" title="enum git2::RepositoryState">RepositoryState</a></div><div class="desc docblock-short">A listing of the possible states that a repository can be in.</div></li><li><div class="item-name"><a class="enum" href="enum.ResetType.html" title="enum git2::ResetType">ResetType</a></div><div class="desc docblock-short">An enumeration of the operations that can be performed for the <code>reset</code>
|
||
method on a <code>Repository</code>.</div></li><li><div class="item-name"><a class="enum" href="enum.StashApplyProgress.html" title="enum git2::StashApplyProgress">StashApplyProgress</a></div></li><li><div class="item-name"><a class="enum" href="enum.StatusShow.html" title="enum git2::StatusShow">StatusShow</a></div><div class="desc docblock-short">Enumeration of possible methods of what can be shown through a status
|
||
operation.</div></li><li><div class="item-name"><a class="enum" href="enum.SubmoduleIgnore.html" title="enum git2::SubmoduleIgnore">SubmoduleIgnore</a></div><div class="desc docblock-short">Submodule ignore values</div></li><li><div class="item-name"><a class="enum" href="enum.SubmoduleUpdate.html" title="enum git2::SubmoduleUpdate">SubmoduleUpdate</a></div><div class="desc docblock-short">Submodule update values</div></li><li><div class="item-name"><a class="enum" href="enum.TraceLevel.html" title="enum git2::TraceLevel">TraceLevel</a></div><div class="desc docblock-short">Available tracing levels. When tracing is set to a particular level,
|
||
callers will be provided tracing at the given level and all lower levels.</div></li><li><div class="item-name"><a class="enum" href="enum.TreeWalkMode.html" title="enum git2::TreeWalkMode">TreeWalkMode</a></div><div class="desc docblock-short">A binary indicator of whether a tree walk should be performed in pre-order
|
||
or post-order.</div></li><li><div class="item-name"><a class="enum" href="enum.TreeWalkResult.html" title="enum git2::TreeWalkResult">TreeWalkResult</a></div><div class="desc docblock-short">Possible return codes for tree walking callback functions.</div></li><li><div class="item-name"><a class="enum" href="enum.WorktreeLockStatus.html" title="enum git2::WorktreeLockStatus">WorktreeLockStatus</a></div><div class="desc docblock-short">Lock Status of a worktree</div></li></ul><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.DEFAULT_COMMENT_CHAR.html" title="constant git2::DEFAULT_COMMENT_CHAR">DEFAULT_COMMENT_CHAR</a></div><div class="desc docblock-short">The default comment character for <code>message_prettify</code> (‘#’)</div></li></ul><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.IntoCString.html" title="trait git2::IntoCString">IntoCString</a></div><div class="desc docblock-short">A class of types that can be converted to C strings.</div></li></ul><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.message_prettify.html" title="fn git2::message_prettify">message_prettify</a></div><div class="desc docblock-short">Clean up a message, removing extraneous whitespace, and ensure that the
|
||
message ends with a newline. If <code>comment_char</code> is <code>Some</code>, also remove comment
|
||
lines starting with that character.</div></li><li><div class="item-name"><a class="fn" href="fn.message_trailers_bytes.html" title="fn git2::message_trailers_bytes">message_trailers_bytes</a></div><div class="desc docblock-short">Get the trailers for the given message.</div></li><li><div class="item-name"><a class="fn" href="fn.message_trailers_strs.html" title="fn git2::message_trailers_strs">message_trailers_strs</a></div><div class="desc docblock-short">Get the trailers for the given message.</div></li><li><div class="item-name"><a class="fn" href="fn.trace_set.html" title="fn git2::trace_set">trace_set</a></div></li></ul><h2 id="types" class="section-header"><a href="#types">Type Aliases</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.Credentials.html" title="type git2::Credentials">Credentials</a></div><div class="desc docblock-short">Callback used to acquire credentials for when a remote is fetched.</div></li><li><div class="item-name"><a class="type" href="type.IndexMatchedPath.html" title="type git2::IndexMatchedPath">IndexMatchedPath</a></div><div class="desc docblock-short">A callback function to filter index matches.</div></li><li><div class="item-name"><a class="type" href="type.IndexerProgress.html" title="type git2::IndexerProgress">IndexerProgress</a></div><div class="desc docblock-short">Callback to be invoked while indexing is in progress.</div></li><li><div class="item-name"><a class="type" href="type.StashApplyProgressCb.html" title="type git2::StashApplyProgressCb">StashApplyProgressCb</a></div><div class="desc docblock-short">Stash application progress notification function.</div></li><li><div class="item-name"><a class="type" href="type.StashCb.html" title="type git2::StashCb">StashCb</a></div><div class="desc docblock-short">This is a callback function you can provide to iterate over all the
|
||
stashed states that will be invoked per entry.</div></li><li><div class="item-name"><a class="type" href="type.TransportMessage.html" title="type git2::TransportMessage">TransportMessage</a></div><div class="desc docblock-short">Callback for receiving messages delivered by the transport.</div></li><li><div class="item-name"><a class="type" href="type.UpdateTips.html" title="type git2::UpdateTips">UpdateTips</a></div><div class="desc docblock-short">Callback for whenever a reference is updated locally.</div></li></ul></section></div></main></body></html> |