<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>Module <ahref="../index.html">git2</a>::<wbr><aclass="mod"href="#">opts</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/opts.rs.html#1-373">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Bindings to libgit2’s git_libgit2_opts function.</p>
</div></details><h2id="functions"class="section-header">Functions<ahref="#functions"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="fn"href="fn.enable_caching.html"title="fn git2::opts::enable_caching">enable_caching</a></div><divclass="desc docblock-short">Controls whether or not libgit2 will cache loaded objects. Enabled by
default, but disabling this can improve performance and memory usage if
loading a large number of objects that will not be referenced again.
Disabling this will cause repository objects to clear their caches when next
accessed.</div></li><li><divclass="item-name"><aclass="fn"href="fn.get_extensions.html"title="fn git2::opts::get_extensions">get_extensions</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Returns the list of git extensions that are supported. This is the list of
built-in extensions supported by libgit2 and custom extensions that have
been added with <ahref="fn.set_extensions.html"title="fn git2::opts::set_extensions"><code>set_extensions</code></a>. Extensions that have been negated will
not be returned.</div></li><li><divclass="item-name"><aclass="fn"href="fn.get_mwindow_file_limit.html"title="fn git2::opts::get_mwindow_file_limit">get_mwindow_file_limit</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Get the maximum number of files that will be mapped at any time by the
library.</div></li><li><divclass="item-name"><aclass="fn"href="fn.get_mwindow_mapped_limit.html"title="fn git2::opts::get_mwindow_mapped_limit">get_mwindow_mapped_limit</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Get the maximum memory that will be mapped in total by the library</div></li><li><divclass="item-name"><aclass="fn"href="fn.get_mwindow_size.html"title="fn git2::opts::get_mwindow_size">get_mwindow_size</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Get the maximum mmap window size</div></li><li><divclass="item-name"><aclass="fn"href="fn.get_search_path.html"title="fn git2::opts::get_search_path">get_search_path</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Get the search path for a given level of config data.</div></li><li><divclass="item-name"><aclass="fn"href="fn.reset_search_path.html"title="fn git2::opts::reset_search_path">reset_search_path</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Reset the search path for a given level of config data to the default
(generally based on environment variables).</div></li><li><divclass="item-name"><aclass="fn"href="fn.set_extensions.html"title="fn git2::opts::set_extensions">set_extensions</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Set that the given git extensions are supported by the caller. Extensions
supported by libgit2 may be negated by prefixing them with a <code>!</code>.
For example: setting extensions to <code>[ "!noop", "newext" ]</code> indicates that
the caller does not want to support repositories with the <code>noop</code> extension
but does want to support repositories with the <code>newext</code> extension.</div></li><li><divclass="item-name"><aclass="fn"href="fn.set_mwindow_file_limit.html"title="fn git2::opts::set_mwindow_file_limit">set_mwindow_file_limit</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Set the maximum number of files that can be mapped at any time
by the library. The default (0) is unlimited.</div></li><li><divclass="item-name"><aclass="fn"href="fn.set_mwindow_mapped_limit.html"title="fn git2::opts::set_mwindow_mapped_limit">set_mwindow_mapped_limit</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Set the maximum amount of memory that can be mapped at any time
by the library.</div></li><li><divclass="item-name"><aclass="fn"href="fn.set_mwindow_size.html"title="fn git2::opts::set_mwindow_size">set_mwindow_size</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Set the maximum mmap window size</div></li><li><divclass="item-name"><aclass="fn"href="fn.set_search_path.html"title="fn git2::opts::set_search_path">set_search_path</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Set the search path for a level of config data. The search path applied to
shared attributes and ignore files, too.</div></li><li><divclass="item-name"><aclass="fn"href="fn.set_ssl_cert_dir.html"title="fn git2::opts::set_ssl_cert_dir">set_ssl_cert_dir</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Set the SSL certificate-authority location to <code>path</code>. <code>path</code> is the location
of a directory holding several certificates, one per file.</div></li><li><divclass="item-name"><aclass="fn"href="fn.set_ssl_cert_file.html"title="fn git2::opts::set_ssl_cert_file">set_ssl_cert_file</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Set the SSL certificate-authority location to <code>file</code>. <code>file</code> is the location
of a file containing several certificates concatenated together.</div></li><li><divclass="item-name"><aclass="fn"href="fn.set_verify_owner_validation.html"title="fn git2::opts::set_verify_owner_validation">set_verify_owner_validation</a><suptitle="unsafe function">⚠</sup></div><divclass="desc docblock-short">Set whether or not to verify ownership before performing a repository.
Enabled by default, but disabling this can lead to code execution vulnerabilities.</div></li><li><divclass="item-name"><aclass="fn"href="fn.strict_hash_verification.html"title="fn git2::opts::strict_hash_verification">strict_hash_verification</a></div><divclass="desc docblock-short">Controls whether or not libgit2 will verify that objects loaded have the
expected hash. Enabled by default, but disabling this can significantly
improve performance, at the cost of relying on repository integrity
without checking it.</div></li><li><divclass="item-name"><aclass="fn"href="fn.strict_object_creation.html"title="fn git2::opts::strict_object_creation">strict_object_creation</a></div><divclass="desc docblock-short">Controls whether or not libgit2 will verify when writing an object that all
objects it references are valid. Enabled by default, but disabling this can
significantly improve performance, at the cost of potentially allowing the
creation of objects that reference invalid objects (due to programming
error or repository corruption).</div></li></ul></section></div></main></body></html>