module Agate::Options

Overview

Global libgit2 options.

Uses extend self so methods can be called as Options.xxx. This is preferred over def self.xxx to keep the method definitions concise given the large number of option accessors.

Note: git_libgit2_opts returns Int32, not ErrorCode, so these methods use .zero? instead of the standard .ok? pattern.

Extended Modules

Defined in:

agate/common.cr

Instance Method Summary

Instance Method Detail

def cache_max_size=(size : Int64) #

Sets the maximum total cache size.


[View source]
def cached_memory : Tuple(Int64, Int64) #

Returns the amount of memory currently cached as {current, allowed}.


[View source]
def caching=(enabled : Bool) #

Enables or disables object caching.


[View source]
def disable_pack_keep_file_checks=(disabled : Bool) #

Disables pack keep-file checks.


[View source]
def fsync_gitdir=(enabled : Bool) #

Enables or disables fsync of the git directory.


[View source]
def homedir : String #

Returns the configured home directory path.


[View source]
def homedir=(path : String) #

Sets the home directory path.


[View source]
def http_expect_continue=(enabled : Bool) #

Enables or disables HTTP Expect-Continue.


[View source]
def mwindow_file_limit : Int32 #

Returns the memory-mapped window file limit.


[View source]
def mwindow_file_limit=(limit) #

Sets the memory-mapped window file limit.


[View source]
def mwindow_mapped_limit : UInt64 #

Returns the memory-mapped window mapped limit.


[View source]
def mwindow_mapped_limit=(limit) #

Sets the memory-mapped window mapped limit.


[View source]
def mwindow_size : Int32 #

Returns the memory-mapped window size.


[View source]
def mwindow_size=(size) #

Sets the memory-mapped window size.


[View source]
def odb_loose_priority=(priority : Int32) #

Sets the priority for loose ODB backends.


[View source]
def odb_packed_priority=(priority : Int32) #

Sets the priority for packed ODB backends.


[View source]
def ofs_delta=(enabled : Bool) #

Enables or disables OFS delta packing.


[View source]
def owner_validation : Bool #

Returns whether repository owner validation is enabled.


[View source]
def owner_validation=(enabled : Bool) #

Sets whether repository owner validation is enabled.


[View source]
def pack_max_objects : Int64 #

Returns the maximum number of objects in a pack.


[View source]
def pack_max_objects=(max : Int64) #

Sets the maximum number of objects in a pack.


[View source]
def search_path(level : Int32) : String #

Returns the search path for a given config level (1=system, 2=xdg, 3=global).


[View source]
def server_connect_timeout : Int32 #

Returns the server connection timeout in milliseconds.


[View source]
def server_connect_timeout=(ms : Int32) #

Sets the server connection timeout in milliseconds.


[View source]
def server_timeout : Int32 #

Returns the server operation timeout in milliseconds.


[View source]
def server_timeout=(ms : Int32) #

Sets the server operation timeout in milliseconds.


[View source]
def set_cache_object_limit(type : Int32, size : Int64) #

Sets the maximum size of objects to cache for a given type.


[View source]
def set_search_path(level : Int32, path : String) #

Sets the search path for a given config level.


[View source]
def set_ssl_cert_locations(file : String | Nil, dir : String | Nil) #

Sets the SSL certificate file and/or directory paths.

Requires libgit2 compiled with OpenSSL or mbedTLS. On backends that don't support certificate locations (e.g., macOS SecureTransport), raises Agate::Error with "TLS backend doesn't support certificate locations". Pass nil for either argument to skip.

See: libgit2 src/libgit2/settings.c, GIT_OPT_SET_SSL_CERT_LOCATIONS.


[View source]
def ssl_ciphers=(ciphers : String) #

Sets the allowed SSL cipher list for HTTPS connections.

Requires libgit2 compiled with OpenSSL or mbedTLS. On backends that don't support custom ciphers (e.g., macOS SecureTransport), raises Agate::Error with "TLS backend doesn't support custom ciphers".

See: libgit2 src/libgit2/settings.c, GIT_OPT_SET_SSL_CIPHERS.


[View source]
def strict_hash_verification=(enabled : Bool) #

Enables or disables strict hash verification.


[View source]
def strict_object_creation=(enabled : Bool) #

Enables or disables strict object creation validation.


[View source]
def strict_symbolic_ref_creation=(enabled : Bool) #

Enables or disables strict symbolic reference creation.


[View source]
def template_path : String #

Returns the template path for new repositories.


[View source]
def template_path=(path : String) #

Sets the template path for new repositories.


[View source]
def unsaved_index_safety=(enabled : Bool) #

Enables or disables unsaved index safety checks.


[View source]
def user_agent : String #

Returns the user-agent string for HTTP requests.


[View source]
def user_agent=(agent : String) #

Sets the user-agent string for HTTP requests.


[View source]