Module git2::opts

source · []
Expand description

Bindings to libgit2’s git_libgit2_opts function.

Functions

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.

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 set_extensions. Extensions that have been negated will not be returned.

Get the search path for a given level of config data.

Reset the search path for a given level of config data to the default (generally based on environment variables).

Set that the given git extensions are supported by the caller. Extensions supported by libgit2 may be negated by prefixing them with a !. For example: setting extensions to [ "!noop", "newext" ] indicates that the caller does not want to support repositories with the noop extension but does want to support repositories with the newext extension.

Set the search path for a level of config data. The search path applied to shared attributes and ignore files, too.

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.

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).