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.crInstance Method Summary
-
#cache_max_size=(size : Int64)
Sets the maximum total cache size.
-
#cached_memory : Tuple(Int64, Int64)
Returns the amount of memory currently cached as {current, allowed}.
-
#caching=(enabled : Bool)
Enables or disables object caching.
-
#disable_pack_keep_file_checks=(disabled : Bool)
Disables pack keep-file checks.
-
#fsync_gitdir=(enabled : Bool)
Enables or disables fsync of the git directory.
-
#homedir : String
Returns the configured home directory path.
-
#homedir=(path : String)
Sets the home directory path.
-
#http_expect_continue=(enabled : Bool)
Enables or disables HTTP Expect-Continue.
-
#mwindow_file_limit : Int32
Returns the memory-mapped window file limit.
-
#mwindow_file_limit=(limit)
Sets the memory-mapped window file limit.
-
#mwindow_mapped_limit : UInt64
Returns the memory-mapped window mapped limit.
-
#mwindow_mapped_limit=(limit)
Sets the memory-mapped window mapped limit.
-
#mwindow_size : Int32
Returns the memory-mapped window size.
-
#mwindow_size=(size)
Sets the memory-mapped window size.
-
#odb_loose_priority=(priority : Int32)
Sets the priority for loose ODB backends.
-
#odb_packed_priority=(priority : Int32)
Sets the priority for packed ODB backends.
-
#ofs_delta=(enabled : Bool)
Enables or disables OFS delta packing.
-
#owner_validation : Bool
Returns whether repository owner validation is enabled.
-
#owner_validation=(enabled : Bool)
Sets whether repository owner validation is enabled.
-
#pack_max_objects : Int64
Returns the maximum number of objects in a pack.
-
#pack_max_objects=(max : Int64)
Sets the maximum number of objects in a pack.
-
#search_path(level : Int32) : String
Returns the search path for a given config level (1=system, 2=xdg, 3=global).
-
#server_connect_timeout : Int32
Returns the server connection timeout in milliseconds.
-
#server_connect_timeout=(ms : Int32)
Sets the server connection timeout in milliseconds.
-
#server_timeout : Int32
Returns the server operation timeout in milliseconds.
-
#server_timeout=(ms : Int32)
Sets the server operation timeout in milliseconds.
-
#set_cache_object_limit(type : Int32, size : Int64)
Sets the maximum size of objects to cache for a given type.
-
#set_search_path(level : Int32, path : String)
Sets the search path for a given config level.
-
#set_ssl_cert_locations(file : String | Nil, dir : String | Nil)
Sets the SSL certificate file and/or directory paths.
-
#ssl_ciphers=(ciphers : String)
Sets the allowed SSL cipher list for HTTPS connections.
-
#strict_hash_verification=(enabled : Bool)
Enables or disables strict hash verification.
-
#strict_object_creation=(enabled : Bool)
Enables or disables strict object creation validation.
-
#strict_symbolic_ref_creation=(enabled : Bool)
Enables or disables strict symbolic reference creation.
-
#template_path : String
Returns the template path for new repositories.
-
#template_path=(path : String)
Sets the template path for new repositories.
-
#unsaved_index_safety=(enabled : Bool)
Enables or disables unsaved index safety checks.
-
#user_agent : String
Returns the user-agent string for HTTP requests.
-
#user_agent=(agent : String)
Sets the user-agent string for HTTP requests.
Instance Method Detail
Returns the amount of memory currently cached as {current, allowed}.
Returns the search path for a given config level (1=system, 2=xdg, 3=global).
Sets the maximum size of objects to cache for a given type.
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.
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.
Enables or disables strict object creation validation.
Enables or disables strict symbolic reference creation.