edlang/git2/struct.Repository.html
2024-07-26 09:42:18 +00:00

977 lines
223 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="An owned git repository, representing all state associated with the underlying filesystem."><title>Repository in git2 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-dd39b87e5fcfba68.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.80.0 (051478957 2024-07-21)" data-channel="1.80.0" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-df360f571f6edeae.css"></noscript><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 struct"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../git2/index.html">git2</a><span class="version">0.18.3</span></h2></div><h2 class="location"><a href="#">Repository</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.add_ignore_rule">add_ignore_rule</a></li><li><a href="#method.annotated_commit_from_fetchhead">annotated_commit_from_fetchhead</a></li><li><a href="#method.apply">apply</a></li><li><a href="#method.apply_to_tree">apply_to_tree</a></li><li><a href="#method.blame_file">blame_file</a></li><li><a href="#method.blob">blob</a></li><li><a href="#method.blob_path">blob_path</a></li><li><a href="#method.blob_writer">blob_writer</a></li><li><a href="#method.branch">branch</a></li><li><a href="#method.branch_from_annotated_commit">branch_from_annotated_commit</a></li><li><a href="#method.branch_remote_name">branch_remote_name</a></li><li><a href="#method.branch_upstream_name">branch_upstream_name</a></li><li><a href="#method.branch_upstream_remote">branch_upstream_remote</a></li><li><a href="#method.branches">branches</a></li><li><a href="#method.checkout_head">checkout_head</a></li><li><a href="#method.checkout_index">checkout_index</a></li><li><a href="#method.checkout_tree">checkout_tree</a></li><li><a href="#method.cherrypick">cherrypick</a></li><li><a href="#method.cherrypick_commit">cherrypick_commit</a></li><li><a href="#method.cleanup_state">cleanup_state</a></li><li><a href="#method.clear_ignore_rules">clear_ignore_rules</a></li><li><a href="#method.clone">clone</a></li><li><a href="#method.clone_recurse">clone_recurse</a></li><li><a href="#method.commit">commit</a></li><li><a href="#method.commit_create_buffer">commit_create_buffer</a></li><li><a href="#method.commit_signed">commit_signed</a></li><li><a href="#method.config">config</a></li><li><a href="#method.describe">describe</a></li><li><a href="#method.diff_blobs">diff_blobs</a></li><li><a href="#method.diff_index_to_index">diff_index_to_index</a></li><li><a href="#method.diff_index_to_workdir">diff_index_to_workdir</a></li><li><a href="#method.diff_tree_to_index">diff_tree_to_index</a></li><li><a href="#method.diff_tree_to_tree">diff_tree_to_tree</a></li><li><a href="#method.diff_tree_to_workdir">diff_tree_to_workdir</a></li><li><a href="#method.diff_tree_to_workdir_with_index">diff_tree_to_workdir_with_index</a></li><li><a href="#method.discover">discover</a></li><li><a href="#method.discover_path">discover_path</a></li><li><a href="#method.extract_signature">extract_signature</a></li><li><a href="#method.fetchhead_foreach">fetchhead_foreach</a></li><li><a href="#method.find_annotated_commit">find_annotated_commit</a></li><li><a href="#method.find_blob">find_blob</a></li><li><a href="#method.find_branch">find_branch</a></li><li><a href="#method.find_commit">find_commit</a></li><li><a href="#method.find_commit_by_prefix">find_commit_by_prefix</a></li><li><a href="#method.find_note">find_note</a></li><li><a href="#method.find_object">find_object</a></li><li><a href="#method.find_object_by_prefix">find_object_by_prefix</a></li><li><a href="#method.find_reference">find_reference</a></li><li><a href="#method.find_remote">find_remote</a></li><li><a href="#method.find_submodule">find_submodule</a></li><li><a href="#method.find_tag">find_tag</a></li><li><a href="#method.find_tag_by_prefix">find_tag_by_prefix</a></li><li><a href="#method.find_tree">find_tree</a></li><li><a href="#method.find_worktree">find_worktree</a></li><li><a href="#method.from_odb">from_odb</a></li><li><a href="#method.get_attr">get_attr</a></li><li><a href="#method.get_attr_bytes">get_attr_bytes</a></li><li><a href="#method.graph_ahead_behind">graph_ahead_behind</a></li><li><a href="#method.graph_descendant_of">graph_descendant_of</a></li><li><a href="#method.head">head</a></li><li><a href="#method.head_detached">head_detached</a></li><li><a href="#method.index">index</a></li><li><a href="#method.init">init</a></li><li><a href="#method.init_bare">init_bare</a></li><li><a href="#method.init_opts">init_opts</a></li><li><a href="#method.is_bare">is_bare</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.is_path_ignored">is_path_ignored</a></li><li><a href="#method.is_shallow">is_shallow</a></li><li><a href="#method.is_worktree">is_worktree</a></li><li><a href="#method.mailmap">mailmap</a></li><li><a href="#method.merge">merge</a></li><li><a href="#method.merge_analysis">merge_analysis</a></li><li><a href="#method.merge_analysis_for_ref">merge_analysis_for_ref</a></li><li><a href="#method.merge_base">merge_base</a></li><li><a href="#method.merge_base_many">merge_base_many</a></li><li><a href="#method.merge_bases">merge_bases</a></li><li><a href="#method.merge_bases_many">merge_bases_many</a></li><li><a href="#method.merge_commits">merge_commits</a></li><li><a href="#method.merge_trees">merge_trees</a></li><li><a href="#method.mergehead_foreach">mergehead_foreach</a></li><li><a href="#method.message">message</a></li><li><a href="#method.namespace">namespace</a></li><li><a href="#method.namespace_bytes">namespace_bytes</a></li><li><a href="#method.note">note</a></li><li><a href="#method.note_default_ref">note_default_ref</a></li><li><a href="#method.note_delete">note_delete</a></li><li><a href="#method.notes">notes</a></li><li><a href="#method.odb">odb</a></li><li><a href="#method.open">open</a></li><li><a href="#method.open_bare">open_bare</a></li><li><a href="#method.open_ext">open_ext</a></li><li><a href="#method.open_from_env">open_from_env</a></li><li><a href="#method.open_from_worktree">open_from_worktree</a></li><li><a href="#method.open_rebase">open_rebase</a></li><li><a href="#method.packbuilder">packbuilder</a></li><li><a href="#method.path">path</a></li><li><a href="#method.rebase">rebase</a></li><li><a href="#method.reference">reference</a></li><li><a href="#method.reference_ensure_log">reference_ensure_log</a></li><li><a href="#method.reference_has_log">reference_has_log</a></li><li><a href="#method.reference_matching">reference_matching</a></li><li><a href="#method.reference_symbolic">reference_symbolic</a></li><li><a href="#method.reference_symbolic_matching">reference_symbolic_matching</a></li><li><a href="#method.reference_to_annotated_commit">reference_to_annotated_commit</a></li><li><a href="#method.references">references</a></li><li><a href="#method.references_glob">references_glob</a></li><li><a href="#method.reflog">reflog</a></li><li><a href="#method.reflog_delete">reflog_delete</a></li><li><a href="#method.reflog_rename">reflog_rename</a></li><li><a href="#method.refname_to_id">refname_to_id</a></li><li><a href="#method.remote">remote</a></li><li><a href="#method.remote_add_fetch">remote_add_fetch</a></li><li><a href="#method.remote_add_push">remote_add_push</a></li><li><a href="#method.remote_anonymous">remote_anonymous</a></li><li><a href="#method.remote_delete">remote_delete</a></li><li><a href="#method.remote_rename">remote_rename</a></li><li><a href="#method.remote_set_pushurl">remote_set_pushurl</a></li><li><a href="#method.remote_set_url">remote_set_url</a></li><li><a href="#method.remote_with_fetch">remote_with_fetch</a></li><li><a href="#method.remotes">remotes</a></li><li><a href="#method.remove_message">remove_message</a></li><li><a href="#method.remove_namespace">remove_namespace</a></li><li><a href="#method.reset">reset</a></li><li><a href="#method.reset_default">reset_default</a></li><li><a href="#method.resolve_reference_from_short_name">resolve_reference_from_short_name</a></li><li><a href="#method.revert">revert</a></li><li><a href="#method.revert_commit">revert_commit</a></li><li><a href="#method.revparse">revparse</a></li><li><a href="#method.revparse_ext">revparse_ext</a></li><li><a href="#method.revparse_single">revparse_single</a></li><li><a href="#method.revwalk">revwalk</a></li><li><a href="#method.set_head">set_head</a></li><li><a href="#method.set_head_bytes">set_head_bytes</a></li><li><a href="#method.set_head_detached">set_head_detached</a></li><li><a href="#method.set_head_detached_from_annotated">set_head_detached_from_annotated</a></li><li><a href="#method.set_index">set_index</a></li><li><a href="#method.set_namespace">set_namespace</a></li><li><a href="#method.set_namespace_bytes">set_namespace_bytes</a></li><li><a href="#method.set_odb">set_odb</a></li><li><a href="#method.set_workdir">set_workdir</a></li><li><a href="#method.signature">signature</a></li><li><a href="#method.stash_apply">stash_apply</a></li><li><a href="#method.stash_drop">stash_drop</a></li><li><a href="#method.stash_foreach">stash_foreach</a></li><li><a href="#method.stash_pop">stash_pop</a></li><li><a href="#method.stash_save">stash_save</a></li><li><a href="#method.stash_save2">stash_save2</a></li><li><a href="#method.stash_save_ext">stash_save_ext</a></li><li><a href="#method.state">state</a></li><li><a href="#method.status_file">status_file</a></li><li><a href="#method.status_should_ignore">status_should_ignore</a></li><li><a href="#method.statuses">statuses</a></li><li><a href="#method.submodule">submodule</a></li><li><a href="#method.submodule_set_branch">submodule_set_branch</a></li><li><a href="#method.submodule_set_ignore">submodule_set_ignore</a></li><li><a href="#method.submodule_set_update">submodule_set_update</a></li><li><a href="#method.submodule_set_url">submodule_set_url</a></li><li><a href="#method.submodule_status">submodule_status</a></li><li><a href="#method.submodules">submodules</a></li><li><a href="#method.tag">tag</a></li><li><a href="#method.tag_annotation_create">tag_annotation_create</a></li><li><a href="#method.tag_delete">tag_delete</a></li><li><a href="#method.tag_foreach">tag_foreach</a></li><li><a href="#method.tag_lightweight">tag_lightweight</a></li><li><a href="#method.tag_names">tag_names</a></li><li><a href="#method.transaction">transaction</a></li><li><a href="#method.treebuilder">treebuilder</a></li><li><a href="#method.workdir">workdir</a></li><li><a href="#method.worktree">worktree</a></li><li><a href="#method.worktrees">worktrees</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Drop-for-Repository">Drop</a></li><li><a href="#impl-Send-for-Repository">Send</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Sync-for-Repository">!Sync</a></li><li><a href="#impl-Freeze-for-Repository">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Repository">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-Repository">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Repository">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-T">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In crate git2</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">git2</a>::<wbr><a class="struct" href="#">Repository</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../src/git2/repo.rs.html#107-109">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Repository { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An owned git repository, representing all state associated with the
underlying filesystem.</p>
<p>This structure corresponds to a <code>git_repository</code> in libgit2. Many other
types in git2-rs are derivative from this structure and are attached to its
lifetime.</p>
<p>When a repository goes out of scope it is freed in memory but not deleted
from the filesystem.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Repository" class="impl"><a class="src rightside" href="../src/git2/repo.rs.html#126-3265">source</a><a href="#impl-Repository" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.open" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#130-139">source</a><h4 class="code-header">pub fn <a href="#method.open" class="fn">open</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(path: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Attempt to open an already-existing repository at <code>path</code>.</p>
<p>The path can point to either a normal or bare repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_bare" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#144-153">source</a><h4 class="code-header">pub fn <a href="#method.open_bare" class="fn">open_bare</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(path: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Attempt to open an already-existing bare repository at <code>path</code>.</p>
<p>The path can point to only a bare repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_from_env" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#160-173">source</a><h4 class="code-header">pub fn <a href="#method.open_from_env" class="fn">open_from_env</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Find and open an existing repository, respecting git environment
variables. This acts like <code>open_ext</code> with the
<a href="struct.RepositoryOpenFlags.html#associatedconstant.FROM_ENV" title="associated constant git2::RepositoryOpenFlags::FROM_ENV">FROM_ENV</a> flag, but additionally respects <code>$GIT_DIR</code>.
With <code>$GIT_DIR</code> unset, this will search for a repository starting in
the current directory.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_ext" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#203-228">source</a><h4 class="code-header">pub fn <a href="#method.open_ext" class="fn">open_ext</a>&lt;P, O, I&gt;(
path: P,
flags: <a class="struct" href="struct.RepositoryOpenFlags.html" title="struct git2::RepositoryOpenFlags">RepositoryOpenFlags</a>,
ceiling_dirs: I,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;,
O: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>&gt;,
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = O&gt;,</div></h4></section></summary><div class="docblock"><p>Find and open an existing repository, with additional options.</p>
<p>If flags contains <a href="struct.RepositoryOpenFlags.html#associatedconstant.NO_SEARCH" title="associated constant git2::RepositoryOpenFlags::NO_SEARCH">NO_SEARCH</a>, the path must point
directly to a repository; otherwise, this may point to a subdirectory
of a repository, and <code>open_ext</code> will search up through parent
directories.</p>
<p>If flags contains <a href="struct.RepositoryOpenFlags.html#associatedconstant.CROSS_FS" title="associated constant git2::RepositoryOpenFlags::CROSS_FS">CROSS_FS</a>, the search through parent
directories will not cross a filesystem boundary (detected when the
stat st_dev field changes).</p>
<p>If flags contains <a href="struct.RepositoryOpenFlags.html#associatedconstant.BARE" title="associated constant git2::RepositoryOpenFlags::BARE">BARE</a>, force opening the repository as
bare even if it isnt, ignoring any working directory, and defer
loading the repository configuration for performance.</p>
<p>If flags contains <a href="struct.RepositoryOpenFlags.html#associatedconstant.NO_DOTGIT" title="associated constant git2::RepositoryOpenFlags::NO_DOTGIT">NO_DOTGIT</a>, dont try appending
<code>/.git</code> to <code>path</code>.</p>
<p>If flags contains <a href="struct.RepositoryOpenFlags.html#associatedconstant.FROM_ENV" title="associated constant git2::RepositoryOpenFlags::FROM_ENV">FROM_ENV</a>, <code>open_ext</code> will ignore
other flags and <code>ceiling_dirs</code>, and respect the same environment
variables git does. Note, however, that <code>path</code> overrides <code>$GIT_DIR</code>; to
respect <code>$GIT_DIR</code> as well, use <code>open_from_env</code>.</p>
<p>ceiling_dirs specifies a list of paths that the search through parent
directories will stop before entering. Use the functions in std::env
to construct or manipulate such a path list. (You can use <code>&amp;[] as &amp;[&amp;std::ffi::OsStr]</code> as an argument if there are no ceiling
directories.)</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_from_worktree" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#231-240">source</a><h4 class="code-header">pub fn <a href="#method.open_from_worktree" class="fn">open_from_worktree</a>(worktree: &amp;<a class="struct" href="struct.Worktree.html" title="struct git2::Worktree">Worktree</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Attempt to open an already-existing repository from a worktree.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.discover" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#246-261">source</a><h4 class="code-header">pub fn <a href="#method.discover" class="fn">discover</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(path: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Attempt to open an already-existing repository at or above <code>path</code></p>
<p>This starts at <code>path</code> and looks up the filesystem hierarchy
until it finds a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.discover_path" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#267-288">source</a><h4 class="code-header">pub fn <a href="#method.discover_path" class="fn">discover_path</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;, I, O&gt;(
path: P,
ceiling_dirs: I,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;<div class="where">where
O: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>&gt;,
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = O&gt;,</div></h4></section></summary><div class="docblock"><p>Attempt to find the path to a git repo for a given path</p>
<p>This starts at <code>path</code> and looks up the filesystem hierarchy
until it finds a repository, stopping if it finds a member of ceiling_dirs</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.init" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#295-297">source</a><h4 class="code-header">pub fn <a href="#method.init" class="fn">init</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(path: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new repository in the specified folder.</p>
<p>This by default will create any necessary directories to create the
repository, and it will read any user-specified templates when creating
the repository. This behavior can be configured through <code>init_opts</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.init_bare" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#302-304">source</a><h4 class="code-header">pub fn <a href="#method.init_bare" class="fn">init_bare</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(path: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new <code>--bare</code> repository in the specified folder.</p>
<p>The folder must exist prior to invoking this function.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.init_opts" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#309-322">source</a><h4 class="code-header">pub fn <a href="#method.init_opts" class="fn">init_opts</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(
path: P,
opts: &amp;<a class="struct" href="struct.RepositoryInitOptions.html" title="struct git2::RepositoryInitOptions">RepositoryInitOptions</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new repository in the specified folder with the given options.</p>
<p>See <code>RepositoryInitOptions</code> struct for more information.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clone" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#328-331">source</a><h4 class="code-header">pub fn <a href="#method.clone" class="fn">clone</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, into: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Clone a remote repository.</p>
<p>See the <code>RepoBuilder</code> struct for more information. This function will
delegate to a fresh <code>RepoBuilder</code></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clone_recurse" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#337-341">source</a><h4 class="code-header">pub fn <a href="#method.clone_recurse" class="fn">clone_recurse</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(
url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
into: P,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Clone a remote repository, initialize and update its submodules
recursively.</p>
<p>This is similar to <code>git clone --recursive</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_odb" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#344-351">source</a><h4 class="code-header">pub fn <a href="#method.from_odb" class="fn">from_odb</a>(odb: <a class="struct" href="struct.Odb.html" title="struct git2::Odb">Odb</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Attempt to wrap an object database as a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.revparse" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#377-391">source</a><h4 class="code-header">pub fn <a href="#method.revparse" class="fn">revparse</a>(&amp;self, spec: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Revspec.html" title="struct git2::Revspec">Revspec</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Execute a rev-parse operation against the <code>spec</code> listed.</p>
<p>The resulting revision specification is returned, or an error is
returned if one occurs.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.revparse_single" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#394-402">source</a><h4 class="code-header">pub fn <a href="#method.revparse_single" class="fn">revparse_single</a>(&amp;self, spec: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Find a single object, as specified by a revision string.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.revparse_ext" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#413-427">source</a><h4 class="code-header">pub fn <a href="#method.revparse_ext" class="fn">revparse_ext</a>(
&amp;self,
spec: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;, <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;&gt;), <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Find a single object and intermediate reference by a revision string.</p>
<p>See <code>man gitrevisions</code>, or
<a href="http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions">http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions</a> for
information on the syntax accepted.</p>
<p>In some cases (<code>@{&lt;-n&gt;}</code> or <code>&lt;branchname&gt;@{upstream}</code>), the expression
may point to an intermediate reference. When such expressions are being
passed in, this intermediate reference is returned.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_bare" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#430-432">source</a><h4 class="code-header">pub fn <a href="#method.is_bare" class="fn">is_bare</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Tests whether this repository is a bare repository or not.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_shallow" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#435-437">source</a><h4 class="code-header">pub fn <a href="#method.is_shallow" class="fn">is_shallow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Tests whether this repository is a shallow clone.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_worktree" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#440-442">source</a><h4 class="code-header">pub fn <a href="#method.is_worktree" class="fn">is_worktree</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Tests whether this repository is a worktree.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#445-448">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Tests whether this repository is empty.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.path" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#452-457">source</a><h4 class="code-header">pub fn <a href="#method.path" class="fn">path</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a></h4></section></summary><div class="docblock"><p>Returns the path to the <code>.git</code> folder for normal repositories or the
repository itself for bare repositories.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.state" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#460-485">source</a><h4 class="code-header">pub fn <a href="#method.state" class="fn">state</a>(&amp;self) -&gt; <a class="enum" href="enum.RepositoryState.html" title="enum git2::RepositoryState">RepositoryState</a></h4></section></summary><div class="docblock"><p>Returns the current state of this repository</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.workdir" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#490-499">source</a><h4 class="code-header">pub fn <a href="#method.workdir" class="fn">workdir</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</h4></section></summary><div class="docblock"><p>Get the path of the working directory for this repository.</p>
<p>If this repository is bare, then <code>None</code> is returned.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_workdir" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#506-517">source</a><h4 class="code-header">pub fn <a href="#method.set_workdir" class="fn">set_workdir</a>(
&amp;self,
path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
update_gitlink: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the path to the working directory for this repository.</p>
<p>If <code>update_link</code> is true, create/update the gitlink file in the workdir
and set config “core.worktree” (if workdir is not the parent of the .git
directory).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.namespace" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#523-525">source</a><h4 class="code-header">pub fn <a href="#method.namespace" class="fn">namespace</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;</h4></section></summary><div class="docblock"><p>Get the currently active namespace for this repository.</p>
<p>If there is no namespace, or the namespace is not a valid utf8 string,
<code>None</code> is returned.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.namespace_bytes" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#530-532">source</a><h4 class="code-header">pub fn <a href="#method.namespace_bytes" class="fn">namespace_bytes</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Get the currently active namespace for this repository as a byte array.</p>
<p>If there is no namespace, <code>None</code> is returned.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_namespace" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#535-537">source</a><h4 class="code-header">pub fn <a href="#method.set_namespace" class="fn">set_namespace</a>(&amp;self, namespace: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the active namespace for this repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_namespace_bytes" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#540-546">source</a><h4 class="code-header">pub fn <a href="#method.set_namespace_bytes" class="fn">set_namespace_bytes</a>(&amp;self, namespace: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the active namespace for this repository as a byte array.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remove_namespace" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#549-554">source</a><h4 class="code-header">pub fn <a href="#method.remove_namespace" class="fn">remove_namespace</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Remove the active namespace for this repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.message" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#558-564">source</a><h4 class="code-header">pub fn <a href="#method.message" class="fn">message</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Retrieves the Git merge message.
Remember to remove the message when finished.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remove_message" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#567-572">source</a><h4 class="code-header">pub fn <a href="#method.remove_message" class="fn">remove_message</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Remove the Git merge message.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remotes" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#575-584">source</a><h4 class="code-header">pub fn <a href="#method.remotes" class="fn">remotes</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="string_array/struct.StringArray.html" title="struct git2::string_array::StringArray">StringArray</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>List all remotes for a given repository</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_remote" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#587-594">source</a><h4 class="code-header">pub fn <a href="#method.find_remote" class="fn">find_remote</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Remote.html" title="struct git2::Remote">Remote</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the information for a particular remote</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#598-606">source</a><h4 class="code-header">pub fn <a href="#method.remote" class="fn">remote</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Remote.html" title="struct git2::Remote">Remote</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Add a remote with the default fetch refspec to the repositorys
configuration.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_with_fetch" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#610-626">source</a><h4 class="code-header">pub fn <a href="#method.remote_with_fetch" class="fn">remote_with_fetch</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
fetch: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Remote.html" title="struct git2::Remote">Remote</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Add a remote with the provided fetch refspec to the repositorys
configuration.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_anonymous" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#633-640">source</a><h4 class="code-header">pub fn <a href="#method.remote_anonymous" class="fn">remote_anonymous</a>(&amp;self, url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Remote.html" title="struct git2::Remote">Remote</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create an anonymous remote</p>
<p>Create a remote with the given URL and refspec in memory. You can use
this when you have a URL instead of a remotes name. Note that anonymous
remotes cannot be converted to persisted remotes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_rename" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#655-671">source</a><h4 class="code-header">pub fn <a href="#method.remote_rename" class="fn">remote_rename</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
new_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="string_array/struct.StringArray.html" title="struct git2::string_array::StringArray">StringArray</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Give a remote a new name</p>
<p>All remote-tracking branches and configuration settings for the remote
are updated.</p>
<p>A temporary in-memory remote cannot be given a name with this method.</p>
<p>No loaded instances of the remote with the old name will change their
name or their list of refspecs.</p>
<p>The returned array of strings is a list of the non-default refspecs
which cannot be renamed and are returned for further processing by the
caller.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_delete" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#677-683">source</a><h4 class="code-header">pub fn <a href="#method.remote_delete" class="fn">remote_delete</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Delete an existing persisted remote.</p>
<p>All remote-tracking branches and configuration settings for the remote
will be removed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_add_fetch" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#689-696">source</a><h4 class="code-header">pub fn <a href="#method.remote_add_fetch" class="fn">remote_add_fetch</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, spec: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Add a fetch refspec to the remotes configuration</p>
<p>Add the given refspec to the fetch list in the configuration. No loaded
remote instances will be affected.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_add_push" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#702-709">source</a><h4 class="code-header">pub fn <a href="#method.remote_add_push" class="fn">remote_add_push</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, spec: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Add a push refspec to the remotes configuration.</p>
<p>Add the given refspec to the push list in the configuration. No
loaded remote instances will be affected.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_set_url" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#716-723">source</a><h4 class="code-header">pub fn <a href="#method.remote_set_url" class="fn">remote_set_url</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the remotes URL in the configuration</p>
<p>Remote objects already in memory will not be affected. This assumes
the common case of a single-url remote and will otherwise return an
error.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remote_set_pushurl" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#732-739">source</a><h4 class="code-header">pub fn <a href="#method.remote_set_pushurl" class="fn">remote_set_pushurl</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
pushurl: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the remotes URL for pushing in the configuration.</p>
<p>Remote objects already in memory will not be affected. This assumes
the common case of a single-url remote and will otherwise return an
error.</p>
<p><code>None</code> indicates that it should be cleared.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reset" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#758-777">source</a><h4 class="code-header">pub fn <a href="#method.reset" class="fn">reset</a>(
&amp;self,
target: &amp;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;,
kind: <a class="enum" href="enum.ResetType.html" title="enum git2::ResetType">ResetType</a>,
checkout: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="build/struct.CheckoutBuilder.html" title="struct git2::build::CheckoutBuilder">CheckoutBuilder</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the current head to the specified object and optionally resets
the index and working tree to match.</p>
<p>A soft reset means the head will be moved to the commit.</p>
<p>A mixed reset will trigger a soft reset, plus the index will be
replaced with the content of the commit tree.</p>
<p>A hard reset will trigger a mixed reset and the working directory will
be replaced with the content of the index. (Untracked and ignored files
will be left alone, however.)</p>
<p>The <code>target</code> is a commit-ish to which the head should be moved to. The
object can either be a commit or a tag, but tags must be dereferenceable
to a commit.</p>
<p>The <code>checkout</code> options will only be used for a hard reset.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reset_default" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#786-797">source</a><h4 class="code-header">pub fn <a href="#method.reset_default" class="fn">reset_default</a>&lt;T, I&gt;(
&amp;self,
target: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;&gt;,
paths: I,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;<div class="where">where
T: <a class="trait" href="trait.IntoCString.html" title="trait git2::IntoCString">IntoCString</a>,
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,</div></h4></section></summary><div class="docblock"><p>Updates some entries in the index from the target commit tree.</p>
<p>The scope of the updated entries is determined by the paths being
in the iterator provided.</p>
<p>Passing a <code>None</code> target will result in removing entries in the index
matching the provided pathspecs.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.head" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#800-806">source</a><h4 class="code-header">pub fn <a href="#method.head" class="fn">head</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Retrieve and resolve the reference pointed at by HEAD.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_head" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#820-822">source</a><h4 class="code-header">pub fn <a href="#method.set_head" class="fn">set_head</a>(&amp;self, refname: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Make the repository HEAD point to the specified reference.</p>
<p>If the provided reference points to a tree or a blob, the HEAD is
unaltered and an error is returned.</p>
<p>If the provided reference points to a branch, the HEAD will point to
that branch, staying attached, or become attached if it isnt yet. If
the branch doesnt exist yet, no error will be returned. The HEAD will
then be attached to an unborn branch.</p>
<p>Otherwise, the HEAD will be detached and will directly point to the
commit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_head_bytes" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#836-842">source</a><h4 class="code-header">pub fn <a href="#method.set_head_bytes" class="fn">set_head_bytes</a>(&amp;self, refname: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Make the repository HEAD point to the specified reference as a byte array.</p>
<p>If the provided reference points to a tree or a blob, the HEAD is
unaltered and an error is returned.</p>
<p>If the provided reference points to a branch, the HEAD will point to
that branch, staying attached, or become attached if it isnt yet. If
the branch doesnt exist yet, no error will be returned. The HEAD will
then be attached to an unborn branch.</p>
<p>Otherwise, the HEAD will be detached and will directly point to the
commit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.head_detached" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#845-854">source</a><h4 class="code-header">pub fn <a href="#method.head_detached" class="fn">head_detached</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Determines whether the repository HEAD is detached.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_head_detached" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#866-874">source</a><h4 class="code-header">pub fn <a href="#method.set_head_detached" class="fn">set_head_detached</a>(&amp;self, commitish: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Make the repository HEAD directly point to the commit.</p>
<p>If the provided commitish cannot be found in the repository, the HEAD
is unaltered and an error is returned.</p>
<p>If the provided commitish cannot be peeled into a commit, the HEAD is
unaltered and an error is returned.</p>
<p>Otherwise, the HEAD will eventually be detached and will directly point
to the peeled commit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_head_detached_from_annotated" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#884-895">source</a><h4 class="code-header">pub fn <a href="#method.set_head_detached_from_annotated" class="fn">set_head_detached_from_annotated</a>(
&amp;self,
commitish: <a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Make the repository HEAD directly point to the commit.</p>
<p>If the provided commitish cannot be found in the repository, the HEAD
is unaltered and an error is returned.
If the provided commitish cannot be peeled into a commit, the HEAD is
unaltered and an error is returned.
Otherwise, the HEAD will eventually be detached and will directly point
to the peeled commit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.references" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#898-904">source</a><h4 class="code-header">pub fn <a href="#method.references" class="fn">references</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.References.html" title="struct git2::References">References</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create an iterator for the repos references</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.references_glob" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#908-918">source</a><h4 class="code-header">pub fn <a href="#method.references_glob" class="fn">references_glob</a>(&amp;self, glob: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.References.html" title="struct git2::References">References</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create an iterator for the repos references that match the specified
glob</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.submodules" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#921-957">source</a><h4 class="code-header">pub fn <a href="#method.submodules" class="fn">submodules</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Submodule.html" title="struct git2::Submodule">Submodule</a>&lt;'_&gt;&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Load all submodules for this repository and return them.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.statuses" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#965-975">source</a><h4 class="code-header">pub fn <a href="#method.statuses" class="fn">statuses</a>(
&amp;self,
options: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.StatusOptions.html" title="struct git2::StatusOptions">StatusOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Statuses.html" title="struct git2::Statuses">Statuses</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Gather file status information and populate the returned structure.</p>
<p>Note that if a pathspec is given in the options to filter the
status, then the results from rename detection (if you enable it) may
not be accurate. To do rename detection properly, this must be called
with no pathspec so that all files can be considered.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.status_should_ignore" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#985-992">source</a><h4 class="code-header">pub fn <a href="#method.status_should_ignore" class="fn">status_should_ignore</a>(&amp;self, path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Test if the ignore rules apply to a given file.</p>
<p>This function checks the ignore rules to see if they would apply to the
given file. This indicates if the file would be ignored regardless of
whether the file is already in the index or committed to the repository.</p>
<p>One way to think of this is if you were to do “git add .” on the
directory containing the file, would it be added or not?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.status_file" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1010-1017">source</a><h4 class="code-header">pub fn <a href="#method.status_file" class="fn">status_file</a>(&amp;self, path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Status.html" title="struct git2::Status">Status</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get file status for a single file.</p>
<p>This tries to get status for the filename that you give. If no files
match that name (in either the HEAD, index, or working directory), this
returns NotFound.</p>
<p>If the name matches multiple files (for example, if the path names a
directory or if running on a case- insensitive filesystem and yet the
HEAD has two entries that both match the path), then this returns
Ambiguous because it cannot give correct results.</p>
<p>This does not do any sort of rename detection. Renames require a set of
targets and because of the path filtering, there is not enough
information to check renames correctly. To check file status with rename
detection, there is no choice but to do a full <code>statuses</code> and scan
through looking for the path that you are interested in.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.branches" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1020-1026">source</a><h4 class="code-header">pub fn <a href="#method.branches" class="fn">branches</a>(
&amp;self,
filter: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.BranchType.html" title="enum git2::BranchType">BranchType</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Branches.html" title="struct git2::Branches">Branches</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create an iterator which loops over the requested branches.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.index" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1037-1043">source</a><h4 class="code-header">pub fn <a href="#method.index" class="fn">index</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the Index file for this repository.</p>
<p>If a custom index has not been set, the default index for the repository
will be returned (the one located in .git/index).</p>
<p><strong>Caution</strong>: If the <a href="struct.Repository.html" title="struct git2::Repository"><code>Repository</code></a> of this index is dropped, then this
<a href="struct.Index.html" title="struct git2::Index"><code>Index</code></a> will become detached, and most methods on it will fail. See
<a href="struct.Index.html#method.open" title="associated function git2::Index::open"><code>Index::open</code></a>. Be sure the repository has a binding such as a local
variable to keep it alive at least as long as the index.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_index" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1046-1051">source</a><h4 class="code-header">pub fn <a href="#method.set_index" class="fn">set_index</a>(&amp;self, index: &amp;mut <a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the Index file for this repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.config" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1058-1064">source</a><h4 class="code-header">pub fn <a href="#method.config" class="fn">config</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Config.html" title="struct git2::Config">Config</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the configuration file for this repository.</p>
<p>If a configuration file has not been set, the default config set for the
repository will be returned, including global and system configurations
(if they are available).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_attr" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1075-1084">source</a><h4 class="code-header">pub fn <a href="#method.get_attr" class="fn">get_attr</a>(
&amp;self,
path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
flags: <a class="struct" href="struct.AttrCheckFlags.html" title="struct git2::AttrCheckFlags">AttrCheckFlags</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the value of a git attribute for a path as a string.</p>
<p>This function will return a special string if the attribute is set to a special value.
Interpreting the special string is discouraged. You should always use
<a href="enum.AttrValue.html#method.from_string" title="associated function git2::AttrValue::from_string"><code>AttrValue::from_string</code></a> to interpret the return value
and avoid the special string.</p>
<p>As such, the return type of this function will probably be changed in the next major version
to prevent interpreting the returned string without checking whether its special.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_attr_bytes" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1095-1114">source</a><h4 class="code-header">pub fn <a href="#method.get_attr_bytes" class="fn">get_attr_bytes</a>(
&amp;self,
path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
flags: <a class="struct" href="struct.AttrCheckFlags.html" title="struct git2::AttrCheckFlags">AttrCheckFlags</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a>]&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the value of a git attribute for a path as a byte slice.</p>
<p>This function will return a special byte slice if the attribute is set to a special value.
Interpreting the special byte slice is discouraged. You should always use
<a href="enum.AttrValue.html#method.from_bytes" title="associated function git2::AttrValue::from_bytes"><code>AttrValue::from_bytes</code></a> to interpret the return value and
avoid the special string.</p>
<p>As such, the return type of this function will probably be changed in the next major version
to prevent interpreting the returned byte slice without checking whether its special.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.blob" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1120-1135">source</a><h4 class="code-header">pub fn <a href="#method.blob" class="fn">blob</a>(&amp;self, data: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Write an in-memory buffer to the ODB as a blob.</p>
<p>The Oid returned can in turn be passed to <code>find_blob</code> to get a handle to
the blob.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.blob_path" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1142-1152">source</a><h4 class="code-header">pub fn <a href="#method.blob_path" class="fn">blob_path</a>(&amp;self, path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Read a file from the filesystem and write its content to the Object
Database as a loose blob</p>
<p>The Oid returned can in turn be passed to <code>find_blob</code> to get a handle to
the blob.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.blob_writer" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1165-1179">source</a><h4 class="code-header">pub fn <a href="#method.blob_writer" class="fn">blob_writer</a>(
&amp;self,
hintpath: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BlobWriter.html" title="struct git2::BlobWriter">BlobWriter</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a stream to write blob</p>
<p>This function may need to buffer the data on disk and will in general
not be the right choice if you know the size of the data to write.</p>
<p>Use <code>BlobWriter::commit()</code> to commit the write to the object db
and get the object id.</p>
<p>If the <code>hintpath</code> parameter is filled, it will be used to determine
what git filters should be applied to the object before it is written
to the object database.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_blob" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1182-1188">source</a><h4 class="code-header">pub fn <a href="#method.find_blob" class="fn">find_blob</a>(&amp;self, oid: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Blob.html" title="struct git2::Blob">Blob</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference to one of the objects in a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.odb" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1191-1197">source</a><h4 class="code-header">pub fn <a href="#method.odb" class="fn">odb</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Odb.html" title="struct git2::Odb">Odb</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the object database for this repository</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_odb" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1200-1205">source</a><h4 class="code-header">pub fn <a href="#method.set_odb" class="fn">set_odb</a>(&amp;self, odb: &amp;<a class="struct" href="struct.Odb.html" title="struct git2::Odb">Odb</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Override the object database for this repository</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.branch" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1212-1230">source</a><h4 class="code-header">pub fn <a href="#method.branch" class="fn">branch</a>(
&amp;self,
branch_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
target: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Branch.html" title="struct git2::Branch">Branch</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new branch pointing at a target commit</p>
<p>A new direct reference will be created pointing to this target commit.
If <code>force</code> is true and a reference already exists with the given name,
itll be replaced.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.branch_from_annotated_commit" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1240-1258">source</a><h4 class="code-header">pub fn <a href="#method.branch_from_annotated_commit" class="fn">branch_from_annotated_commit</a>(
&amp;self,
branch_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
target: &amp;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Branch.html" title="struct git2::Branch">Branch</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new branch pointing at a target commit</p>
<p>This behaves like <code>Repository::branch()</code> but takes
an annotated commit, which lets you specify which
extended SHA syntax string was specified by a user,
allowing for more exact reflog messages.</p>
<p>See the documentation for <code>Repository::branch()</code></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_branch" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1261-1273">source</a><h4 class="code-header">pub fn <a href="#method.find_branch" class="fn">find_branch</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
branch_type: <a class="enum" href="enum.BranchType.html" title="enum git2::BranchType">BranchType</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Branch.html" title="struct git2::Branch">Branch</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a branch by its name in a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.commit" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1283-1316">source</a><h4 class="code-header">pub fn <a href="#method.commit" class="fn">commit</a>(
&amp;self,
update_ref: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
author: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
committer: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
tree: &amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;,
parents: &amp;[&amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create new commit in the repository</p>
<p>If the <code>update_ref</code> is not <code>None</code>, name of the reference that will be
updated to point to this commit. If the reference is not direct, it will
be resolved to a direct reference. Use “HEAD” to update the HEAD of the
current branch and make it point to this commit. If the reference
doesnt exist yet, it will be created. If it does exist, the first
parent must be the tip of this branch.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.commit_create_buffer" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1323-1351">source</a><h4 class="code-header">pub fn <a href="#method.commit_create_buffer" class="fn">commit_create_buffer</a>(
&amp;self,
author: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
committer: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
tree: &amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;,
parents: &amp;[&amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Buf.html" title="struct git2::Buf">Buf</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a commit object and return that as a Buf.</p>
<p>That can be converted to a string like this <code>str::from_utf8(&amp;buf).unwrap().to_string()</code>.
And that string can be passed to the <code>commit_signed</code> function,
the arguments behave the same as in the <code>commit</code> function.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.commit_signed" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1363-1385">source</a><h4 class="code-header">pub fn <a href="#method.commit_signed" class="fn">commit_signed</a>(
&amp;self,
commit_content: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
signature: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
signature_field: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a commit object from the given buffer and signature</p>
<p>Given the unsigned commit objects contents, its signature and the
header field in which to store the signature, attach the signature to
the commit and write it into the given repository.</p>
<p>Use <code>None</code> in <code>signature_field</code> to use the default of <code>gpgsig</code>, which is
almost certainly what you want.</p>
<p>Returns the resulting (signed) commit id.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.extract_signature" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1391-1409">source</a><h4 class="code-header">pub fn <a href="#method.extract_signature" class="fn">extract_signature</a>(
&amp;self,
commit_id: &amp;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
signature_field: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="struct.Buf.html" title="struct git2::Buf">Buf</a>, <a class="struct" href="struct.Buf.html" title="struct git2::Buf">Buf</a>), <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Extract the signature from a commit</p>
<p>Returns a tuple containing the signature in the first value and the
signed data in the second.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_commit" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1412-1418">source</a><h4 class="code-header">pub fn <a href="#method.find_commit" class="fn">find_commit</a>(&amp;self, oid: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference to one of the commits in a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_commit_by_prefix" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1421-1432">source</a><h4 class="code-header">pub fn <a href="#method.find_commit_by_prefix" class="fn">find_commit_by_prefix</a>(
&amp;self,
prefix_hash: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference to one of the commits in a repository by short hash.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_annotated_commit" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1435-1445">source</a><h4 class="code-header">pub fn <a href="#method.find_annotated_commit" class="fn">find_annotated_commit</a>(
&amp;self,
id: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates an <code>AnnotatedCommit</code> from the given commit id.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_object" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1448-1459">source</a><h4 class="code-header">pub fn <a href="#method.find_object" class="fn">find_object</a>(
&amp;self,
oid: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
kind: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.ObjectType.html" title="enum git2::ObjectType">ObjectType</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference to one of the objects in a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_object_by_prefix" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1462-1478">source</a><h4 class="code-header">pub fn <a href="#method.find_object_by_prefix" class="fn">find_object_by_prefix</a>(
&amp;self,
prefix_hash: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
kind: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.ObjectType.html" title="enum git2::ObjectType">ObjectType</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference to one of the objects by id prefix in a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reference" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1485-1506">source</a><h4 class="code-header">pub fn <a href="#method.reference" class="fn">reference</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
id: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
log_message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new direct reference.</p>
<p>This function will return an error if a reference already exists with
the given name unless force is true, in which case it will be
overwritten.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reference_matching" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1538-1561">source</a><h4 class="code-header">pub fn <a href="#method.reference_matching" class="fn">reference_matching</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
id: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
current_id: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
log_message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Conditionally create new direct reference.</p>
<p>A direct reference (also called an object id reference) refers directly
to a specific object id (a.k.a. OID or SHA) in the repository. The id
permanently refers to the object (although the reference itself can be
moved). For example, in libgit2 the direct ref “refs/tags/v0.17.0”
refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.</p>
<p>The direct reference will be created in the repository and written to
the disk.</p>
<p>Valid reference names must follow one of two patterns:</p>
<ol>
<li>Top-level names must contain only capital letters and underscores,
and must begin and end with a letter. (e.g. “HEAD”, “ORIG_HEAD”).</li>
<li>Names prefixed with “refs/” can be almost anything. You must avoid
the characters <code>~</code>, <code>^</code>, <code>:</code>, <code>\\</code>, <code>?</code>, <code>[</code>, and <code>*</code>, and the
sequences “..” and “@{” which have special meaning to revparse.</li>
</ol>
<p>This function will return an error if a reference already exists with
the given name unless <code>force</code> is true, in which case it will be
overwritten.</p>
<p>The message for the reflog will be ignored if the reference does not
belong in the standard set (HEAD, branches and remote-tracking
branches) and it does not have a reflog.</p>
<p>It will return GIT_EMODIFIED if the references value at the time of
updating does not match the one passed through <code>current_id</code> (i.e. if the
ref has changed since the user read it).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reference_symbolic" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1581-1603">source</a><h4 class="code-header">pub fn <a href="#method.reference_symbolic" class="fn">reference_symbolic</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
target: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
log_message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new symbolic reference.</p>
<p>A symbolic reference is a reference name that refers to another
reference name. If the other name moves, the symbolic name will move,
too. As a simple example, the “HEAD” reference might refer to
“refs/heads/master” while on the “master” branch of a repository.</p>
<p>Valid reference names must follow one of two patterns:</p>
<ol>
<li>Top-level names must contain only capital letters and underscores,
and must begin and end with a letter. (e.g. “HEAD”, “ORIG_HEAD”).</li>
<li>Names prefixed with “refs/” can be almost anything. You must avoid
the characters ~, ^, :, \, ?, [, and *, and the
sequences “..” and “@{” which have special meaning to revparse.</li>
</ol>
<p>This function will return an error if a reference already exists with
the given name unless force is true, in which case it will be
overwritten.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reference_symbolic_matching" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1614-1639">source</a><h4 class="code-header">pub fn <a href="#method.reference_symbolic_matching" class="fn">reference_symbolic_matching</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
target: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
current_value: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
log_message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new symbolic reference.</p>
<p>This function will return an error if a reference already exists with
the given name unless force is true, in which case it will be
overwritten.</p>
<p>It will return GIT_EMODIFIED if the references value at the time of
updating does not match the one passed through current_value (i.e. if
the ref has changed since the user read it).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_reference" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1642-1649">source</a><h4 class="code-header">pub fn <a href="#method.find_reference" class="fn">find_reference</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference to one of the objects in a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.resolve_reference_from_short_name" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1655-1662">source</a><h4 class="code-header">pub fn <a href="#method.resolve_reference_from_short_name" class="fn">resolve_reference_from_short_name</a>(
&amp;self,
refname: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference to one of the objects in a repository.
<code>Repository::find_reference</code> with teeth; give the method your reference in
human-readable format e.g. main instead of refs/heads/main, and it
will do-what-you-mean, returning the <code>Reference</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.refname_to_id" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1669-1678">source</a><h4 class="code-header">pub fn <a href="#method.refname_to_id" class="fn">refname_to_id</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference by name and resolve immediately to OID.</p>
<p>This function provides a quick way to resolve a reference name straight
through to the object id that it refers to. This avoids having to
allocate or free any <code>Reference</code> objects for simple situations.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reference_to_annotated_commit" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1681-1694">source</a><h4 class="code-header">pub fn <a href="#method.reference_to_annotated_commit" class="fn">reference_to_annotated_commit</a>(
&amp;self,
reference: &amp;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a git_annotated_commit from the given reference.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.annotated_commit_from_fetchhead" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1697-1717">source</a><h4 class="code-header">pub fn <a href="#method.annotated_commit_from_fetchhead" class="fn">annotated_commit_from_fetchhead</a>(
&amp;self,
branch_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
remote_url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
id: &amp;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a git_annotated_commit from FETCH_HEAD.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.signature" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1725-1731">source</a><h4 class="code-header">pub fn <a href="#method.signature" class="fn">signature</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'static&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new action signature with default user and now timestamp.</p>
<p>This looks up the user.name and user.email from the configuration and
uses the current time as the timestamp, and creates a new signature
based on that information. It will return <code>NotFound</code> if either the
user.name or user.email are not set.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.submodule" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1745-1764">source</a><h4 class="code-header">pub fn <a href="#method.submodule" class="fn">submodule</a>(
&amp;self,
url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
use_gitlink: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Submodule.html" title="struct git2::Submodule">Submodule</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set up a new git submodule for checkout.</p>
<p>This does “git submodule add” up to the fetch and checkout of the
submodule contents. It preps a new submodule, creates an entry in
<code>.gitmodules</code> and creates an empty initialized repository either at the
given path in the working directory or in <code>.git/modules</code> with a gitlink
from the working directory to the new repo.</p>
<p>To fully emulate “git submodule add” call this function, then <code>open()</code>
the submodule repo and perform the clone step as needed. Lastly, call
<code>add_finalize()</code> to wrap up adding the new submodule and <code>.gitmodules</code>
to the index to be ready to commit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_submodule" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1770-1777">source</a><h4 class="code-header">pub fn <a href="#method.find_submodule" class="fn">find_submodule</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Submodule.html" title="struct git2::Submodule">Submodule</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup submodule information by name or path.</p>
<p>Given either the submodule name or path (they are usually the same),
this returns a structure describing the submodule.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.submodule_status" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1783-1794">source</a><h4 class="code-header">pub fn <a href="#method.submodule_status" class="fn">submodule_status</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
ignore: <a class="enum" href="enum.SubmoduleIgnore.html" title="enum git2::SubmoduleIgnore">SubmoduleIgnore</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.SubmoduleStatus.html" title="struct git2::SubmoduleStatus">SubmoduleStatus</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the status for a submodule.</p>
<p>This looks at a submodule and tries to determine the status. It
will return a combination of the <code>SubmoduleStatus</code> values.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.submodule_set_ignore" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1799-1809">source</a><h4 class="code-header">pub fn <a href="#method.submodule_set_ignore" class="fn">submodule_set_ignore</a>(
&amp;mut self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
ignore: <a class="enum" href="enum.SubmoduleIgnore.html" title="enum git2::SubmoduleIgnore">SubmoduleIgnore</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the ignore rule for the submodule in the configuration</p>
<p>This does not affect any currently-loaded instances.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.submodule_set_update" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1814-1824">source</a><h4 class="code-header">pub fn <a href="#method.submodule_set_update" class="fn">submodule_set_update</a>(
&amp;mut self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
update: <a class="enum" href="enum.SubmoduleUpdate.html" title="enum git2::SubmoduleUpdate">SubmoduleUpdate</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the update rule for the submodule in the configuration</p>
<p>This setting wont affect any existing instances.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.submodule_set_url" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1830-1837">source</a><h4 class="code-header">pub fn <a href="#method.submodule_set_url" class="fn">submodule_set_url</a>(&amp;mut self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, url: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the URL for the submodule in the configuration</p>
<p>After calling this, you may wish to call <a href="struct.Submodule.html#method.sync" title="method git2::Submodule::sync"><code>Submodule::sync</code></a> to write
the changes to the checked out submodule repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.submodule_set_branch" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1843-1850">source</a><h4 class="code-header">pub fn <a href="#method.submodule_set_branch" class="fn">submodule_set_branch</a>(
&amp;mut self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
branch_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Set the branch for the submodule in the configuration</p>
<p>After calling this, you may wish to call <a href="struct.Submodule.html#method.sync" title="method git2::Submodule::sync"><code>Submodule::sync</code></a> to write
the changes to the checked out submodule repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_tree" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1853-1859">source</a><h4 class="code-header">pub fn <a href="#method.find_tree" class="fn">find_tree</a>(&amp;self, oid: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a reference to one of the objects in a repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.treebuilder" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1866-1876">source</a><h4 class="code-header">pub fn <a href="#method.treebuilder" class="fn">treebuilder</a>(
&amp;self,
tree: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.TreeBuilder.html" title="struct git2::TreeBuilder">TreeBuilder</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new TreeBuilder, optionally initialized with the
entries of the given Tree.</p>
<p>The tree builder can be used to create or modify trees in memory and
write them as tree objects to the database.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1889-1914">source</a><h4 class="code-header">pub fn <a href="#method.tag" class="fn">tag</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
target: &amp;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;,
tagger: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new tag in the repository from an object</p>
<p>A new reference will also be created pointing to this tag object. If
<code>force</code> is true and a reference already exists with the given name,
itll be replaced.</p>
<p>The message will not be cleaned up.</p>
<p>The tag name will be checked for validity. You must avoid the characters
~, ^, :, \ , ?, [, and *, and the sequences “..” and “ @
{“ which have special meaning to revparse.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag_annotation_create" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1923-1946">source</a><h4 class="code-header">pub fn <a href="#method.tag_annotation_create" class="fn">tag_annotation_create</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
target: &amp;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;,
tagger: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new tag in the repository from an object without creating a reference.</p>
<p>The message will not be cleaned up.</p>
<p>The tag name will be checked for validity. You must avoid the characters
~, ^, :, \ , ?, [, and *, and the sequences “..” and “ @
{“ which have special meaning to revparse.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag_lightweight" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1953-1973">source</a><h4 class="code-header">pub fn <a href="#method.tag_lightweight" class="fn">tag_lightweight</a>(
&amp;self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
target: &amp;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new lightweight tag pointing at a target object</p>
<p>A new direct reference will be created pointing to this target object.
If force is true and a reference already exists with the given name,
itll be replaced.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_tag" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1976-1982">source</a><h4 class="code-header">pub fn <a href="#method.find_tag" class="fn">find_tag</a>(&amp;self, id: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Tag.html" title="struct git2::Tag">Tag</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a tag object from the repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_tag_by_prefix" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#1985-1996">source</a><h4 class="code-header">pub fn <a href="#method.find_tag_by_prefix" class="fn">find_tag_by_prefix</a>(&amp;self, prefix_hash: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Tag.html" title="struct git2::Tag">Tag</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lookup a tag object by prefix hash from the repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag_delete" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2002-2008">source</a><h4 class="code-header">pub fn <a href="#method.tag_delete" class="fn">tag_delete</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Delete an existing tag reference.</p>
<p>The tag name will be checked for validity, see <code>tag</code> for some rules
about valid names.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag_names" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2013-2030">source</a><h4 class="code-header">pub fn <a href="#method.tag_names" class="fn">tag_names</a>(&amp;self, pattern: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="string_array/struct.StringArray.html" title="struct git2::string_array::StringArray">StringArray</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get a list with all the tags in the repository.</p>
<p>An optional fnmatch pattern can also be specified.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag_foreach" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2034-2050">source</a><h4 class="code-header">pub fn <a href="#method.tag_foreach" class="fn">tag_foreach</a>&lt;T&gt;(&amp;self, cb: T) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>iterate over all tags calling <code>cb</code> on each.
the callback is provided the tag id and name</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.checkout_head" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2054-2068">source</a><h4 class="code-header">pub fn <a href="#method.checkout_head" class="fn">checkout_head</a>(
&amp;self,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="build/struct.CheckoutBuilder.html" title="struct git2::build::CheckoutBuilder">CheckoutBuilder</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Updates files in the index and the working tree to match the content of
the commit pointed at by HEAD.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.checkout_index" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2073-2095">source</a><h4 class="code-header">pub fn <a href="#method.checkout_index" class="fn">checkout_index</a>(
&amp;self,
index: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="build/struct.CheckoutBuilder.html" title="struct git2::build::CheckoutBuilder">CheckoutBuilder</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Updates files in the working tree to match the content of the index.</p>
<p>If the index is <code>None</code>, the repositorys index will be used.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.checkout_tree" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2099-2117">source</a><h4 class="code-header">pub fn <a href="#method.checkout_tree" class="fn">checkout_tree</a>(
&amp;self,
treeish: &amp;<a class="struct" href="struct.Object.html" title="struct git2::Object">Object</a>&lt;'_&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="build/struct.CheckoutBuilder.html" title="struct git2::build::CheckoutBuilder">CheckoutBuilder</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Updates files in the index and working tree to match the content of the
tree pointed at by the treeish.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2127-2157">source</a><h4 class="code-header">pub fn <a href="#method.merge" class="fn">merge</a>(
&amp;self,
annotated_commits: &amp;[&amp;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;],
merge_opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.MergeOptions.html" title="struct git2::MergeOptions">MergeOptions</a>&gt;,
checkout_opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="build/struct.CheckoutBuilder.html" title="struct git2::build::CheckoutBuilder">CheckoutBuilder</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Merges the given commit(s) into HEAD, writing the results into the
working directory. Any changes are staged for commit and any conflicts
are written to the index. Callers should inspect the repositorys index
after this completes, resolve any conflicts and prepare a commit.</p>
<p>For compatibility with git, the repository is put into a merging state.
Once the commit is done (or if the user wishes to abort), you should
clear this state by calling cleanup_state().</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge_commits" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2163-2180">source</a><h4 class="code-header">pub fn <a href="#method.merge_commits" class="fn">merge_commits</a>(
&amp;self,
our_commit: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
their_commit: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.MergeOptions.html" title="struct git2::MergeOptions">MergeOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Merge two commits, producing an index that reflects the result of
the merge. The index may be written as-is to the working directory or
checked out. If the index is to be converted to a tree, the caller
should resolve any conflicts that arose as part of the merge.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge_trees" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2186-2205">source</a><h4 class="code-header">pub fn <a href="#method.merge_trees" class="fn">merge_trees</a>(
&amp;self,
ancestor_tree: &amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;,
our_tree: &amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;,
their_tree: &amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.MergeOptions.html" title="struct git2::MergeOptions">MergeOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Merge two trees, producing an index that reflects the result of
the merge. The index may be written as-is to the working directory or
checked out. If the index is to be converted to a tree, the caller
should resolve any conflicts that arose as part of the merge.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cleanup_state" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2209-2214">source</a><h4 class="code-header">pub fn <a href="#method.cleanup_state" class="fn">cleanup_state</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Remove all the metadata associated with an ongoing command like merge,
revert, cherry-pick, etc. For example: MERGE_HEAD, MERGE_MSG, etc.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge_analysis" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2218-2241">source</a><h4 class="code-header">pub fn <a href="#method.merge_analysis" class="fn">merge_analysis</a>(
&amp;self,
their_heads: &amp;[&amp;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="struct.MergeAnalysis.html" title="struct git2::MergeAnalysis">MergeAnalysis</a>, <a class="struct" href="struct.MergePreference.html" title="struct git2::MergePreference">MergePreference</a>), <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Analyzes the given branch(es) and determines the opportunities for
merging them into the HEAD of the repository.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge_analysis_for_ref" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2245-2270">source</a><h4 class="code-header">pub fn <a href="#method.merge_analysis_for_ref" class="fn">merge_analysis_for_ref</a>(
&amp;self,
our_ref: &amp;<a class="struct" href="struct.Reference.html" title="struct git2::Reference">Reference</a>&lt;'_&gt;,
their_heads: &amp;[&amp;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="struct.MergeAnalysis.html" title="struct git2::MergeAnalysis">MergeAnalysis</a>, <a class="struct" href="struct.MergePreference.html" title="struct git2::MergePreference">MergePreference</a>), <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Analyzes the given branch(es) and determines the opportunities for
merging them into a reference.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rebase" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2275-2295">source</a><h4 class="code-header">pub fn <a href="#method.rebase" class="fn">rebase</a>(
&amp;self,
branch: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;&gt;,
upstream: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;&gt;,
onto: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.AnnotatedCommit.html" title="struct git2::AnnotatedCommit">AnnotatedCommit</a>&lt;'_&gt;&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.RebaseOptions.html" title="struct git2::RebaseOptions">RebaseOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Rebase.html" title="struct git2::Rebase">Rebase</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Initializes a rebase operation to rebase the changes in <code>branch</code>
relative to <code>upstream</code> onto another branch. To begin the rebase process,
call <code>next()</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_rebase" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2299-2309">source</a><h4 class="code-header">pub fn <a href="#method.open_rebase" class="fn">open_rebase</a>(
&amp;self,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.RebaseOptions.html" title="struct git2::RebaseOptions">RebaseOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Rebase.html" title="struct git2::Rebase">Rebase</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Opens an existing rebase that was previously started by either an
invocation of <code>rebase()</code> or by another client.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.note" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2316-2343">source</a><h4 class="code-header">pub fn <a href="#method.note" class="fn">note</a>(
&amp;self,
author: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
committer: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
notes_ref: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
oid: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
note: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
force: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Add a note for an object</p>
<p>The <code>notes_ref</code> argument is the canonical name of the reference to use,
defaulting to “refs/notes/commits”. If <code>force</code> is specified then
previous notes are overwritten.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.note_default_ref" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2346-2352">source</a><h4 class="code-header">pub fn <a href="#method.note_default_ref" class="fn">note_default_ref</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the default notes reference for this repository</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.notes" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2362-2369">source</a><h4 class="code-header">pub fn <a href="#method.notes" class="fn">notes</a>(&amp;self, notes_ref: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Notes.html" title="struct git2::Notes">Notes</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new iterator for notes in this repository.</p>
<p>The <code>notes_ref</code> argument is the canonical name of the reference to use,
defaulting to “refs/notes/commits”.</p>
<p>The iterator returned yields pairs of (Oid, Oid) where the first element
is the id of the note and the second id is the id the note is
annotating.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_note" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2377-2384">source</a><h4 class="code-header">pub fn <a href="#method.find_note" class="fn">find_note</a>(
&amp;self,
notes_ref: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
id: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Note.html" title="struct git2::Note">Note</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Read the note for an object.</p>
<p>The <code>notes_ref</code> argument is the canonical name of the reference to use,
defaulting to “refs/notes/commits”.</p>
<p>The id specified is the Oid of the git object to read the note from.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.note_delete" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2392-2410">source</a><h4 class="code-header">pub fn <a href="#method.note_delete" class="fn">note_delete</a>(
&amp;self,
id: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
notes_ref: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
author: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
committer: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Remove the note for an object.</p>
<p>The <code>notes_ref</code> argument is the canonical name of the reference to use,
defaulting to “refs/notes/commits”.</p>
<p>The id specified is the Oid of the git object to remove the note from.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.revwalk" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2413-2419">source</a><h4 class="code-header">pub fn <a href="#method.revwalk" class="fn">revwalk</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Revwalk.html" title="struct git2::Revwalk">Revwalk</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a revwalk that can be used to traverse the commit graph.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.blame_file" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2422-2439">source</a><h4 class="code-header">pub fn <a href="#method.blame_file" class="fn">blame_file</a>(
&amp;self,
path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.BlameOptions.html" title="struct git2::BlameOptions">BlameOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Blame.html" title="struct git2::Blame">Blame</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Get the blame for a single file.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge_base" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2442-2455">source</a><h4 class="code-header">pub fn <a href="#method.merge_base" class="fn">merge_base</a>(&amp;self, one: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, two: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Find a merge base between two commits</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge_base_many" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2458-2472">source</a><h4 class="code-header">pub fn <a href="#method.merge_base_many" class="fn">merge_base_many</a>(&amp;self, oids: &amp;[<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Find a merge base given a list of commits</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge_bases" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2475-2489">source</a><h4 class="code-header">pub fn <a href="#method.merge_bases" class="fn">merge_bases</a>(&amp;self, one: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, two: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="oid_array/struct.OidArray.html" title="struct git2::oid_array::OidArray">OidArray</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Find all merge bases between two commits</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.merge_bases_many" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2492-2506">source</a><h4 class="code-header">pub fn <a href="#method.merge_bases_many" class="fn">merge_bases_many</a>(&amp;self, oids: &amp;[<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="oid_array/struct.OidArray.html" title="struct git2::oid_array::OidArray">OidArray</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Find all merge bases given a list of commits</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.graph_ahead_behind" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2514-2527">source</a><h4 class="code-header">pub fn <a href="#method.graph_ahead_behind" class="fn">graph_ahead_behind</a>(
&amp;self,
local: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
upstream: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>), <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Count the number of unique commits between two commit objects</p>
<p>There is no need for branches containing the commits to have any
upstream relationship, but it helps to think of one as a branch and the
other as its upstream, the ahead and behind values will be what git
would report for the branches.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.graph_descendant_of" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2533-2542">source</a><h4 class="code-header">pub fn <a href="#method.graph_descendant_of" class="fn">graph_descendant_of</a>(
&amp;self,
commit: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
ancestor: <a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Determine if a commit is the descendant of another commit</p>
<p>Note that a commit is not considered a descendant of itself, in contrast
to <code>git merge-base --is-ancestor</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reflog" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2548-2555">source</a><h4 class="code-header">pub fn <a href="#method.reflog" class="fn">reflog</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Reflog.html" title="struct git2::Reflog">Reflog</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Read the reflog for the given reference</p>
<p>If there is no reflog file for the given reference yet, an empty reflog
object will be returned.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reflog_delete" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2558-2564">source</a><h4 class="code-header">pub fn <a href="#method.reflog_delete" class="fn">reflog_delete</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Delete the reflog for the given reference</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reflog_rename" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2569-2576">source</a><h4 class="code-header">pub fn <a href="#method.reflog_rename" class="fn">reflog_rename</a>(&amp;self, old_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, new_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Rename a reflog</p>
<p>The reflog to be renamed is expected to already exist.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reference_has_log" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2579-2583">source</a><h4 class="code-header">pub fn <a href="#method.reference_has_log" class="fn">reference_has_log</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Check if the given reference has a reflog.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reference_ensure_log" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2586-2592">source</a><h4 class="code-header">pub fn <a href="#method.reference_ensure_log" class="fn">reference_ensure_log</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Ensure that the given reference has a reflog.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.describe" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2599-2605">source</a><h4 class="code-header">pub fn <a href="#method.describe" class="fn">describe</a>(&amp;self, opts: &amp;<a class="struct" href="struct.DescribeOptions.html" title="struct git2::DescribeOptions">DescribeOptions</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Describe.html" title="struct git2::Describe">Describe</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Describes a commit</p>
<p>Performs a describe operation on the current commit and the worktree.
After performing a describe on HEAD, a status is run and description is
considered to be dirty if there are.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.diff_blobs" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2621-2677">source</a><h4 class="code-header">pub fn <a href="#method.diff_blobs" class="fn">diff_blobs</a>(
&amp;self,
old_blob: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Blob.html" title="struct git2::Blob">Blob</a>&lt;'_&gt;&gt;,
old_as_path: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
new_blob: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Blob.html" title="struct git2::Blob">Blob</a>&lt;'_&gt;&gt;,
new_as_path: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.DiffOptions.html" title="struct git2::DiffOptions">DiffOptions</a>&gt;,
file_cb: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut (dyn <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="struct.DiffDelta.html" title="struct git2::DiffDelta">DiffDelta</a>&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.f32.html">f32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a> + '_)&gt;,
binary_cb: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut (dyn <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="struct.DiffDelta.html" title="struct git2::DiffDelta">DiffDelta</a>&lt;'_&gt;, <a class="struct" href="struct.DiffBinary.html" title="struct git2::DiffBinary">DiffBinary</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a> + '_)&gt;,
hunk_cb: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut (dyn <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="struct.DiffDelta.html" title="struct git2::DiffDelta">DiffDelta</a>&lt;'_&gt;, <a class="struct" href="struct.DiffHunk.html" title="struct git2::DiffHunk">DiffHunk</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a> + '_)&gt;,
line_cb: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut (dyn <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="struct.DiffDelta.html" title="struct git2::DiffDelta">DiffDelta</a>&lt;'_&gt;, <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.DiffHunk.html" title="struct git2::DiffHunk">DiffHunk</a>&lt;'_&gt;&gt;, <a class="struct" href="struct.DiffLine.html" title="struct git2::DiffLine">DiffLine</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a> + '_)&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Directly run a diff on two blobs.</p>
<p>Compared to a file, a blob lacks some contextual information. As such, the
<code>DiffFile</code> given to the callback will have some fake data; i.e. mode will be
0 and path will be <code>None</code>.</p>
<p><code>None</code> is allowed for either <code>old_blob</code> or <code>new_blob</code> and will be treated
as an empty blob, with the oid set to zero in the <code>DiffFile</code>. Passing <code>None</code>
for both blobs is a noop; no callbacks will be made at all.</p>
<p>We do run a binary content check on the blob content and if either blob looks
like binary data, the <code>DiffFile</code> binary attribute will be set to 1 and no call to
the <code>hunk_cb</code> nor <code>line_cb</code> will be made (unless you set the <code>force_text</code>
option).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.diff_tree_to_tree" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2687-2704">source</a><h4 class="code-header">pub fn <a href="#method.diff_tree_to_tree" class="fn">diff_tree_to_tree</a>(
&amp;self,
old_tree: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;&gt;,
new_tree: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.DiffOptions.html" title="struct git2::DiffOptions">DiffOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a diff with the difference between two tree objects.</p>
<p>This is equivalent to <code>git diff &lt;old-tree&gt; &lt;new-tree&gt;</code></p>
<p>The first tree will be used for the “old_file” side of the delta and the
second tree will be used for the “new_file” side of the delta. You can
pass <code>None</code> to indicate an empty tree, although it is an error to pass
<code>None</code> for both the <code>old_tree</code> and <code>new_tree</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.diff_tree_to_index" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2719-2736">source</a><h4 class="code-header">pub fn <a href="#method.diff_tree_to_index" class="fn">diff_tree_to_index</a>(
&amp;self,
old_tree: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;&gt;,
index: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.DiffOptions.html" title="struct git2::DiffOptions">DiffOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a diff between a tree and repository index.</p>
<p>This is equivalent to <code>git diff --cached &lt;treeish&gt;</code> or if you pass
the HEAD tree, then like <code>git diff --cached</code>.</p>
<p>The tree you pass will be used for the “old_file” side of the delta, and
the index will be used for the “new_file” side of the delta.</p>
<p>If you pass <code>None</code> for the index, then the existing index of the <code>repo</code>
will be used. In this case, the index will be refreshed from disk
(if it has changed) before the diff is generated.</p>
<p>If the tree is <code>None</code>, then it is considered an empty tree.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.diff_index_to_index" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2742-2759">source</a><h4 class="code-header">pub fn <a href="#method.diff_index_to_index" class="fn">diff_index_to_index</a>(
&amp;self,
old_index: &amp;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>,
new_index: &amp;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.DiffOptions.html" title="struct git2::DiffOptions">DiffOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a diff between two index objects.</p>
<p>The first index will be used for the “old_file” side of the delta, and
the second index will be used for the “new_file” side of the delta.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.diff_index_to_workdir" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2774-2789">source</a><h4 class="code-header">pub fn <a href="#method.diff_index_to_workdir" class="fn">diff_index_to_workdir</a>(
&amp;self,
index: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.DiffOptions.html" title="struct git2::DiffOptions">DiffOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a diff between the repository index and the workdir directory.</p>
<p>This matches the <code>git diff</code> command. See the note below on
<code>tree_to_workdir</code> for a discussion of the difference between
<code>git diff</code> and <code>git diff HEAD</code> and how to emulate a <code>git diff &lt;treeish&gt;</code>
using libgit2.</p>
<p>The index will be used for the “old_file” side of the delta, and the
working directory will be used for the “new_file” side of the delta.</p>
<p>If you pass <code>None</code> for the index, then the existing index of the <code>repo</code>
will be used. In this case, the index will be refreshed from disk
(if it has changed) before the diff is generated.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.diff_tree_to_workdir" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2809-2824">source</a><h4 class="code-header">pub fn <a href="#method.diff_tree_to_workdir" class="fn">diff_tree_to_workdir</a>(
&amp;self,
old_tree: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.DiffOptions.html" title="struct git2::DiffOptions">DiffOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a diff between a tree and the working directory.</p>
<p>The tree you provide will be used for the “old_file” side of the delta,
and the working directory will be used for the “new_file” side.</p>
<p>This is not the same as <code>git diff &lt;treeish&gt;</code> or <code>git diff-index &lt;treeish&gt;</code>. Those commands use information from the index, whereas this
function strictly returns the differences between the tree and the files
in the working directory, regardless of the state of the index. Use
<code>tree_to_workdir_with_index</code> to emulate those commands.</p>
<p>To see difference between this and <code>tree_to_workdir_with_index</code>,
consider the example of a staged file deletion where the file has then
been put back into the working dir and further modified. The
tree-to-workdir diff for that file is modified, but <code>git diff</code> would
show status deleted since there is a staged delete.</p>
<p>If <code>None</code> is passed for <code>tree</code>, then an empty tree is used.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.diff_tree_to_workdir_with_index" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2832-2847">source</a><h4 class="code-header">pub fn <a href="#method.diff_tree_to_workdir_with_index" class="fn">diff_tree_to_workdir_with_index</a>(
&amp;self,
old_tree: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;&gt;,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.DiffOptions.html" title="struct git2::DiffOptions">DiffOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a diff between a tree and the working directory using index data
to account for staged deletes, tracked files, etc.</p>
<p>This emulates <code>git diff &lt;tree&gt;</code> by diffing the tree to the index and
the index to the working directory and blending the results into a
single diff that includes staged deleted, etc.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.packbuilder" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2850-2856">source</a><h4 class="code-header">pub fn <a href="#method.packbuilder" class="fn">packbuilder</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.PackBuilder.html" title="struct git2::PackBuilder">PackBuilder</a>&lt;'_&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a PackBuilder</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stash_save" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2859-2866">source</a><h4 class="code-header">pub fn <a href="#method.stash_save" class="fn">stash_save</a>(
&amp;mut self,
stasher: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
message: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
flags: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.StashFlags.html" title="struct git2::StashFlags">StashFlags</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Save the local modifications to a new stash.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stash_save2" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2870-2891">source</a><h4 class="code-header">pub fn <a href="#method.stash_save2" class="fn">stash_save2</a>(
&amp;mut self,
stasher: &amp;<a class="struct" href="struct.Signature.html" title="struct git2::Signature">Signature</a>&lt;'_&gt;,
message: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>&gt;,
flags: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.StashFlags.html" title="struct git2::StashFlags">StashFlags</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Save the local modifications to a new stash.
unlike <code>stash_save</code> it allows to pass a null <code>message</code></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stash_save_ext" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2894-2910">source</a><h4 class="code-header">pub fn <a href="#method.stash_save_ext" class="fn">stash_save_ext</a>(
&amp;mut self,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.StashSaveOptions.html" title="struct git2::StashSaveOptions">StashSaveOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Like <code>stash_save</code> but with more options like selective statshing via path patterns.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stash_apply" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2913-2923">source</a><h4 class="code-header">pub fn <a href="#method.stash_apply" class="fn">stash_apply</a>(
&amp;mut self,
index: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.StashApplyOptions.html" title="struct git2::StashApplyOptions">StashApplyOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Apply a single stashed state from the stash list.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stash_foreach" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2928-2944">source</a><h4 class="code-header">pub fn <a href="#method.stash_foreach" class="fn">stash_foreach</a>&lt;C&gt;(&amp;mut self, callback: C) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;<div class="where">where
C: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, &amp;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Loop over all the stashed states and issue a callback for each one.</p>
<p>Return <code>true</code> to continue iterating or <code>false</code> to stop.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stash_drop" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2947-2952">source</a><h4 class="code-header">pub fn <a href="#method.stash_drop" class="fn">stash_drop</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Remove a single stashed state from the stash list.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stash_pop" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2955-2965">source</a><h4 class="code-header">pub fn <a href="#method.stash_pop" class="fn">stash_pop</a>(
&amp;mut self,
index: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.StashApplyOptions.html" title="struct git2::StashApplyOptions">StashApplyOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Apply a single stashed state from the stash list and remove it from the list if successful.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_ignore_rule" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2970-2976">source</a><h4 class="code-header">pub fn <a href="#method.add_ignore_rule" class="fn">add_ignore_rule</a>(&amp;self, rules: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Add ignore rules for a repository.</p>
<p>The format of the rules is the same one of the .gitignore file.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear_ignore_rules" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2979-2984">source</a><h4 class="code-header">pub fn <a href="#method.clear_ignore_rules" class="fn">clear_ignore_rules</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Clear ignore rules that were explicitly added.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_path_ignored" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#2987-2998">source</a><h4 class="code-header">pub fn <a href="#method.is_path_ignored" class="fn">is_path_ignored</a>&lt;P: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(&amp;self, path: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Test if the ignore rules apply to a given path.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cherrypick" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3001-3016">source</a><h4 class="code-header">pub fn <a href="#method.cherrypick" class="fn">cherrypick</a>(
&amp;self,
commit: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
options: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.CherrypickOptions.html" title="struct git2::CherrypickOptions">CherrypickOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Perform a cherrypick</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cherrypick_commit" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3020-3039">source</a><h4 class="code-header">pub fn <a href="#method.cherrypick_commit" class="fn">cherrypick_commit</a>(
&amp;self,
cherrypick_commit: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
our_commit: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
mainline: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u32.html">u32</a>,
options: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.MergeOptions.html" title="struct git2::MergeOptions">MergeOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create an index of uncommitted changes, representing the result of
cherry-picking.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.branch_remote_name" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3042-3049">source</a><h4 class="code-header">pub fn <a href="#method.branch_remote_name" class="fn">branch_remote_name</a>(&amp;self, refname: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Buf.html" title="struct git2::Buf">Buf</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Find the remote name of a remote-tracking branch</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.branch_upstream_name" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3053-3060">source</a><h4 class="code-header">pub fn <a href="#method.branch_upstream_name" class="fn">branch_upstream_name</a>(&amp;self, refname: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Buf.html" title="struct git2::Buf">Buf</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Retrieves the name of the reference supporting the remote tracking branch,
given the name of a local branch reference.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.branch_upstream_remote" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3063-3074">source</a><h4 class="code-header">pub fn <a href="#method.branch_upstream_remote" class="fn">branch_upstream_remote</a>(&amp;self, refname: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Buf.html" title="struct git2::Buf">Buf</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Retrieve the name of the upstream remote of a local branch.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.apply" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3077-3093">source</a><h4 class="code-header">pub fn <a href="#method.apply" class="fn">apply</a>(
&amp;self,
diff: &amp;<a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a>&lt;'_&gt;,
location: <a class="enum" href="enum.ApplyLocation.html" title="enum git2::ApplyLocation">ApplyLocation</a>,
options: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.ApplyOptions.html" title="struct git2::ApplyOptions">ApplyOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Apply a Diff to the given repo, making changes directly in the working directory, the index, or both.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.apply_to_tree" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3096-3113">source</a><h4 class="code-header">pub fn <a href="#method.apply_to_tree" class="fn">apply_to_tree</a>(
&amp;self,
tree: &amp;<a class="struct" href="struct.Tree.html" title="struct git2::Tree">Tree</a>&lt;'_&gt;,
diff: &amp;<a class="struct" href="struct.Diff.html" title="struct git2::Diff">Diff</a>&lt;'_&gt;,
options: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.ApplyOptions.html" title="struct git2::ApplyOptions">ApplyOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Apply a Diff to the provided tree, and return the resulting Index.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.revert" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3116-3130">source</a><h4 class="code-header">pub fn <a href="#method.revert" class="fn">revert</a>(
&amp;self,
commit: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
options: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="struct.RevertOptions.html" title="struct git2::RevertOptions">RevertOptions</a>&lt;'_&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Reverts the given commit, producing changes in the index and working directory.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.revert_commit" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3134-3153">source</a><h4 class="code-header">pub fn <a href="#method.revert_commit" class="fn">revert_commit</a>(
&amp;self,
revert_commit: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
our_commit: &amp;<a class="struct" href="struct.Commit.html" title="struct git2::Commit">Commit</a>&lt;'_&gt;,
mainline: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u32.html">u32</a>,
options: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.MergeOptions.html" title="struct git2::MergeOptions">MergeOptions</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Index.html" title="struct git2::Index">Index</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Reverts the given commit against the given “our” commit,
producing an index that reflects the result of the revert.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.worktrees" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3156-3165">source</a><h4 class="code-header">pub fn <a href="#method.worktrees" class="fn">worktrees</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="string_array/struct.StringArray.html" title="struct git2::string_array::StringArray">StringArray</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Lists all the worktrees for the repository</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.find_worktree" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3170-3177">source</a><h4 class="code-header">pub fn <a href="#method.find_worktree" class="fn">find_worktree</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Worktree.html" title="struct git2::Worktree">Worktree</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Opens a worktree by name for the given repository</p>
<p>This can open any worktree that the worktrees method returns.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.worktree" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3180-3200">source</a><h4 class="code-header">pub fn <a href="#method.worktree" class="fn">worktree</a>&lt;'a&gt;(
&amp;'a self,
name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
path: &amp;<a class="struct" href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
opts: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.WorktreeAddOptions.html" title="struct git2::WorktreeAddOptions">WorktreeAddOptions</a>&lt;'a&gt;&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Worktree.html" title="struct git2::Worktree">Worktree</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new worktree for the repository</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.transaction" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3203-3209">source</a><h4 class="code-header">pub fn <a href="#method.transaction" class="fn">transaction</a>&lt;'a&gt;(&amp;'a self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Transaction.html" title="struct git2::Transaction">Transaction</a>&lt;'a&gt;, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new transaction</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mailmap" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3212-3218">source</a><h4 class="code-header">pub fn <a href="#method.mailmap" class="fn">mailmap</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Mailmap.html" title="struct git2::Mailmap">Mailmap</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Gets this repositorys mailmap.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mergehead_foreach" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3222-3238">source</a><h4 class="code-header">pub fn <a href="#method.mergehead_foreach" class="fn">mergehead_foreach</a>&lt;C&gt;(&amp;mut self, callback: C) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;<div class="where">where
C: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>If a merge is in progress, invoke callback for each commit ID in the
MERGE_HEAD file.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.fetchhead_foreach" class="method"><a class="src rightside" href="../src/git2/repo.rs.html#3248-3264">source</a><h4 class="code-header">pub fn <a href="#method.fetchhead_foreach" class="fn">fetchhead_foreach</a>&lt;C&gt;(&amp;self, callback: C) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct git2::Error">Error</a>&gt;<div class="where">where
C: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a>], &amp;<a class="struct" href="struct.Oid.html" title="struct git2::Oid">Oid</a>, <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Invoke callback for each entry in the given FETCH_HEAD file.</p>
<p><code>callback</code> will be called with with following arguments:</p>
<ul>
<li><code>&amp;str</code>: the reference name</li>
<li><code>&amp;[u8]</code>: the remote URL</li>
<li><code>&amp;Oid</code>: the reference target OID</li>
<li><code>bool</code>: was the reference the result of a merge</li>
</ul>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-Repository" class="impl"><a class="src rightside" href="../src/git2/repo.rs.html#3277-3281">source</a><a href="#impl-Drop-for-Repository" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a class="src rightside" href="../src/git2/repo.rs.html#3278-3280">source</a><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Executes the destructor for this type. <a href="https://doc.rust-lang.org/1.80.0/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></div></details></div></details><section id="impl-Send-for-Repository" class="impl"><a class="src rightside" href="../src/git2/repo.rs.html#113">source</a><a href="#impl-Send-for-Repository" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Repository" class="impl"><a href="#impl-Freeze-for-Repository" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></h3></section><section id="impl-RefUnwindSafe-for-Repository" class="impl"><a href="#impl-RefUnwindSafe-for-Repository" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></h3></section><section id="impl-Sync-for-Repository" class="impl"><a href="#impl-Sync-for-Repository" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></h3></section><section id="impl-Unpin-for-Repository" class="impl"><a href="#impl-Unpin-for-Repository" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></h3></section><section id="impl-UnwindSafe-for-Repository" class="impl"><a href="#impl-UnwindSafe-for-Repository" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Repository.html" title="struct git2::Repository">Repository</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.80.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#768">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#758">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#797">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>