16. Libgit¶
These are the most important set of functions that allow setting and reading global values for all of the libgit and thus luagit2 too.
Contents
- init
- shutdown
- libgit2_features
- get_mwindow_size
- set_mwindow_size
- get_mwindow_mapped_limit
- set_mwindow_mapped_limit
- get_search_path
- set_search_path
- get_cached_memory
- set_cache_object_limit
- set_cache_max_size
- enable_caching
- get_template_path
- set_template_path
- set_user_agent
- get_windows_sharemode
- set_windows_sharemode
- enable_strict_object_creation
- enable_strict_symbolic_ref_creation
- enable_ofs_delta
- set_ssl_ciphers
- enable_fsync_gitdir
- enable_strict_hash_verification
16.1. init¶
Sets up the global state and threading values for the libgit2.
- There are no params required, none are returned.
Note
This is the First function to be called before doing anything or calling other functions of luagit2. This may be called any number of times.
16.2. shutdown¶
Clean up the global state and threading context after calling it as many times as init() was called.
- There are no params required, none are returned.
16.3. libgit2_features¶
parameters | Returns |
---|---|
None | integer_value |
- returns a Integer value for Query compile time options for libgit2.
16.4. get_mwindow_size¶
parameters | Returns |
---|---|
None | integer_value |
- returns an Integer valued maximum mmap window size.
16.5. set_mwindow_size¶
parameters | Returns |
---|---|
integer_value | None |
- Sets the maximum mmap window size for libgit2.
16.6. get_mwindow_mapped_limit¶
parameters | Returns |
---|---|
None | integer_value |
- returns an Integer value of the maximum memory that will be mapped in total by the library.
16.7. set_mwindow_mapped_limit¶
parameters | Returns |
---|---|
integer_value | None |
- Sets the the maximum memory that will be mapped in total by the library.
16.8. get_search_path¶
parameters | Returns |
---|---|
(string) search_path_lvl | (string) path |
search_path_lvl
: The search path level. can be any of system, global, xdg, programdata .
- returns String value of search path for a selected level for a config data.
16.9. set_search_path¶
parameters | Returns |
---|---|
(string) search_path_lvl | None |
(string) path |
search_path_lvl
: The search path level. can be any of system, global, xdg, programdata .path
: The string value of path to set.
- Sets String value of search path for a selected level for a config data.
16.10. get_cached_memory¶
parameters | Returns |
---|---|
None | (integer_value) current |
(integer_value) allowed |
- returns cache byte values.
- current size.
- max allowed size.
16.11. set_cache_object_limit¶
parameters | Returns |
---|---|
luagit2_otype | None |
(integer) limit |
luagit2_otype
: the object type whose cache size is to be set.limit
: The numerical value of cache size to be allowed for that object type.
- Returns none or gives an error.
16.12. set_cache_max_size¶
parameters | Returns |
---|---|
integer_value | None |
- Set the max value of cache size for any of the object.
16.13. enable_caching¶
parameters | Returns |
---|---|
integer_value | None |
- integer_value :
- 1 -> enable caching.
- 0 -> disable caching.
16.14. get_template_path¶
parameters | Returns |
---|---|
None | luagit2_buf |
- there are no params required.
luagit2_buf
for used template path is returned.
16.16. set_user_agent¶
parameters | Returns |
---|---|
(String) user_agent | None |
- Sets the user agent using it’s name.
16.19. enable_strict_object_creation¶
parameters | Returns |
---|---|
integer_value | None |
- integer_value :
- 1 -> enable Strict_object_creatioN.
- 0 -> disable Strict_object_creatioN.
- Returns none.
16.20. enable_strict_symbolic_ref_creation¶
parameters | Returns |
---|---|
integer_value | None |
- integer_value :
- 1 -> enable strict_symbolic_ref_creation.
- 0 -> disable strict_symbolic_ref_creation.
- Returns none.
16.21. enable_ofs_delta¶
parameters | Returns |
---|---|
integer_value | None |
- integer_value :
- 1 -> enable ofs_delta.
- 0 -> disable ofs_delta.
- Returns none.
16.22. set_ssl_ciphers¶
parameters | Returns |
---|---|
(string) ciphers | None |
Ciphers
: The string value of ciphers to set.
- returns None.
16.23. enable_fsync_gitdir¶
parameters | Returns |
---|---|
integer_value | None |
- integer_value :
- 1 -> Enable synchronized writing of files in the gitdir using fsync.
- 0 -> disable synchronized writing of files in the gitdir using fsync.
- Returns none.
16.24. enable_strict_hash_verification¶
parameters | Returns |
---|---|
integer_value | None |
- integer_value :
- 1 -> enable strict_hash_verification.
- 0 -> disable strict_hash_verification.
- Returns none.