<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="Options that can be provided to `repo.statuses()` to control how the status information is gathered."><title>StatusOptions in git2 - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-5bc39a1768837dd0.css"><metaname="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="git2"data-themes=""data-resource-suffix=""data-rustdoc-version="1.77.2 (25ef9e3d8 2024-04-09)"data-channel="1.77.2"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-04d5337699b92874.css"></noscript><linkrel="alternate icon"type="image/png"href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../git2/index.html">git2</a><spanclass="version">0.18.3</span></h2></div><h2class="location"><ahref="#">StatusOptions</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.disable_pathspec_match">disable_pathspec_match</a></li><li><ahref="#method.exclude_submodules">exclude_submodules</a></li><li><ahref="#method.include_ignored">include_ignored</a></li><li><ahref="#method.include_unmodified">include_unmodified</a></li><li><ahref="#method.include_unreadable">include_unreadable</a></li><li><ahref="#method.include_unreadable_as_untracked">include_unreadable_as_untracked</a></li><li><ahref="#method.include_untracked">include_untracked</a></li><li><ahref="#method.new">new</a></li><li><ahref="#method.no_refresh">no_refresh</a></li><li><ahref="#method.pathspec">pathspec</a></li><li><ahref="#method.raw">raw</a></li><li><ahref="#method.recurse_ignored_dirs">recurse_ignored_dirs</a></li><li><ahref="#method.recurse_untracked_dirs">recurse_untracked_dirs</a></li><li><ahref="#method.rename_threshold">rename_threshold</a></li><li><ahref="#method.renames_from_rewrites">renames_from_rewrites</a></li><li><ahref="#method.renames_head_to_index">renames_head_to_index</a></li><li><ahref="#method.renames_index_to_workdir">renames_index_to_workdir</a></li><li><ahref="#method.show">show</a></li><li><ahref="#method.sort_case_insensitively">sort_case_insensitively</a></li><li><ahref="#method.sort_case_sensitively">sort_case_sensitively</a></li><li><ahref="#method.update_index">update_index</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block trait-implementation"><li><ahref="#im
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../git2/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Struct <ahref="index.html">git2</a>::<wbr><aclass="struct"href="#">StatusOptions</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../src/git2/status.rs.html#14-18">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct StatusOptions { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Options that can be provided to <code>repo.statuses()</code> to control how the status
information is gathered.</p>
</div></details><h2id="implementations"class="section-header">Implementations<ahref="#implementations"class="anchor">§</a></h2><divid="implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-StatusOptions"class="impl"><aclass="src rightside"href="../src/git2/status.rs.html#68-237">source</a><ahref="#impl-StatusOptions"class="anchor">§</a><h3class="code-header">impl <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.new"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#70-81">source</a><h4class="code-header">pub fn <ahref="#method.new"class="fn">new</a>() -><aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Creates a new blank set of status options.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.show"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#87-94">source</a><h4class="code-header">pub fn <ahref="#method.show"class="fn">show</a>(&mut self, show: <aclass="enum"href="enum.StatusShow.html"title="enum git2::StatusShow">StatusShow</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Select the files on which to report status.</p>
<p>The default, if unspecified, is to show the index and the working
directory.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.pathspec"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#101-106">source</a><h4class="code-header">pub fn <ahref="#method.pathspec"class="fn">pathspec</a><T: <aclass="trait"href="trait.IntoCString.html"title="trait git2::IntoCString">IntoCString</a>>(&mut self, pathspec: T) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Add a path pattern to match (using fnmatch-style matching).</p>
<p>If the <code>disable_pathspec_match</code> option is given, then this is a literal
path to match. If this is not called, then there will be no patterns to
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.recurse_untracked_dirs"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#150-152">source</a><h4class="code-header">pub fn <ahref="#method.recurse_untracked_dirs"class="fn">recurse_untracked_dirs</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Flag that all files in untracked directories should be included.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.disable_pathspec_match"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#156-158">source</a><h4class="code-header">pub fn <ahref="#method.disable_pathspec_match"class="fn">disable_pathspec_match</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Indicates that the given paths should be treated as literals paths, note
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.recurse_ignored_dirs"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#162-164">source</a><h4class="code-header">pub fn <ahref="#method.recurse_ignored_dirs"class="fn">recurse_ignored_dirs</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Indicates that the contents of ignored directories should be included in
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.renames_head_to_index"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#167-169">source</a><h4class="code-header">pub fn <ahref="#method.renames_head_to_index"class="fn">renames_head_to_index</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Indicates that rename detection should be processed between the head.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.renames_index_to_workdir"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#173-175">source</a><h4class="code-header">pub fn <ahref="#method.renames_index_to_workdir"class="fn">renames_index_to_workdir</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Indicates that rename detection should be run between the index and the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.sort_case_sensitively"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#179-181">source</a><h4class="code-header">pub fn <ahref="#method.sort_case_sensitively"class="fn">sort_case_sensitively</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Override the native case sensitivity for the file system and force the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.sort_case_insensitively"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#185-187">source</a><h4class="code-header">pub fn <ahref="#method.sort_case_insensitively"class="fn">sort_case_insensitively</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Override the native case sensitivity for the file system and force the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.renames_from_rewrites"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#190-192">source</a><h4class="code-header">pub fn <ahref="#method.renames_from_rewrites"class="fn">renames_from_rewrites</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Indicates that rename detection should include rewritten files.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.no_refresh"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#195-197">source</a><h4class="code-header">pub fn <ahref="#method.no_refresh"class="fn">no_refresh</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Bypasses the default status behavior of doing a “soft” index reload.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.update_index"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#204-206">source</a><h4class="code-header">pub fn <ahref="#method.update_index"class="fn">update_index</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Refresh the stat cache in the index for files are unchanged but have
) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section><detailsclass="toggle method-toggle"open><summary><sectionid="method.rename_threshold"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#223-226">source</a><h4class="code-header">pub fn <ahref="#method.rename_threshold"class="fn">rename_threshold</a>(&mut self, threshold: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.u16.html">u16</a>) ->&mut <aclass="struct"href="struct.StatusOptions.html"title="struct git2::StatusOptions">StatusOptions</a></h4></section></summary><divclass="docblock"><p>Set threshold above which similar files will be considered renames.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.raw"class="method"><aclass="src rightside"href="../src/git2/status.rs.html#232-236">source</a><h4class="code-header">pub unsafe fn <ahref="#method.raw"class="fn">raw</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/std/primitive.pointer.html">*const </a><aclass="struct"href="../libgit2_sys/struct.git_status_options.html"title="struct libgit2_sys::git_status_options">git_status_options</a></h4></section></summary><divclass="docblock"><p>Get a pointer to the inner list of status options.</p>
<code><ahref="https://doc.rust-lang.org/1.77.2/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.2/src/core/convert/mod.rs.html#804-806">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.2/src/core/convert/mod.rs.html#811">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.2/src/core/convert/mod.rs.html#789-791">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.2/src/core/convert/mod.rs.html#796">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>