]> git.ipfire.org Git - thirdparty/git.git/commit
libgit-sys: also export some config_set functions
authorJosh Steadmon <steadmon@google.com>
Wed, 29 Jan 2025 21:50:43 +0000 (13:50 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Jan 2025 23:06:50 +0000 (15:06 -0800)
commitd76eb0dcccb19d2f85924a4be177ae76126bf5d3
tree73f9e55cfdc11800dfe3138ea0e656119eba0482
parente7f8bf125c078004232e254e71b97226c4fed81b
libgit-sys: also export some config_set functions

In preparation for implementing a higher-level Rust API for accessing
Git configs, export some of the upstream configset API via libgitpub and
libgit-sys. Since this will be exercised as part of the higher-level API
in the next commit, no tests have been added for libgit-sys.

While we're at it, add git_configset_alloc() and git_configset_free()
functions in libgitpub so that callers can manage config_set structs on
the heap. This also allows non-C external consumers to treat config_sets
as opaque structs.

Co-authored-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/libgit-sys/public_symbol_export.c
contrib/libgit-sys/public_symbol_export.h
contrib/libgit-sys/src/lib.rs