add nonexistent options_init functions

All `options` structures should have a corresponding `options_init`
function.
This commit is contained in:
Edward Thomson
2026-06-13 21:38:41 +01:00
parent 7de2529f59
commit 95e5da80ca
19 changed files with 438 additions and 11 deletions

View File

@@ -180,6 +180,20 @@ typedef struct {
/** Static constructor for `git_attr_options` */
#define GIT_ATTR_OPTIONS_INIT {GIT_ATTR_OPTIONS_VERSION}
/**
* Initialize git_attr_options structure
*
* Initialize a `git_attr_options` with default values. Equivalent to
* creating an instance with GIT_ATTR_OPTIONS_INIT.
*
* @param opts The `git_attr_options` struct to initialize.
* @param version The struct version; pass `GIT_ATTR_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_attr_options_init(
git_attr_options *opts,
unsigned int version);
/**
* Look up the value of one git attribute for path.
*

View File

@@ -412,6 +412,21 @@ typedef struct {
/** Static constructor for `git_commit_create_options` */
#define GIT_COMMIT_CREATE_OPTIONS_INIT { GIT_COMMIT_CREATE_OPTIONS_VERSION }
/**
* Initialize git_commit_create_options structure
*
* Initialize a `git_commit_create_options` with default values.
* Equivalent to creating an instance with GIT_COMMIT_CREATE_OPTIONS_INIT.
*
* @param opts The `git_commit_create_options` struct to initialize.
* @param version The struct version; pass
* `GIT_COMMIT_CREATE_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_commit_create_options_init(
git_commit_create_options *opts,
unsigned int version);
/**
* Commits the staged changes in the repository; this is a near analog to
* `git commit -m message`.
@@ -474,6 +489,22 @@ typedef struct {
/** Static constructor for `git_commit_create_ext_options` */
#define GIT_COMMIT_CREATE_EXT_OPTIONS_INIT { GIT_COMMIT_CREATE_EXT_OPTIONS_VERSION }
/**
* Initialize git_commit_create_ext_options structure
*
* Initialize a `git_commit_create_ext_options` with default values.
* Equivalent to creating an instance with
* GIT_COMMIT_CREATE_EXT_OPTIONS_INIT.
*
* @param opts The `git_commit_create_ext_options` struct to initialize.
* @param version The struct version; pass
* `GIT_COMMIT_CREATE_EXT_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_commit_create_ext_options_init(
git_commit_create_ext_options *opts,
unsigned int version);
/**
* Create a new commit object and write it to the object database.
*

View File

@@ -91,6 +91,20 @@ typedef struct {
GIT_DIFF_FIND_OPTIONS_INIT \
}
/**
* Initialize a `git_email_create_options` with default values.
* Equivalent to creating an instance with
* GIT_EMAIL_CREATE_OPTIONS_INIT.
*
* @param opts The `git_email_create_options` struct to initialize.
* @param version The struct version; pass
* `GIT_EMAIL_CREATE_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_email_create_options_init(
git_email_create_options *opts,
unsigned int version);
/**
* Create a diff for a commit in mbox format for sending via email.
* The commit must not be a merge commit.

View File

@@ -95,6 +95,20 @@ typedef struct {
/** Static constructor for `git_filter_options` */
#define GIT_FILTER_OPTIONS_INIT {GIT_FILTER_OPTIONS_VERSION}
/**
* Initialize git_filter_options structure
*
* Initialize a `git_filter_options` with default values. Equivalent to
* creating an instance with GIT_FILTER_OPTIONS_VERSION.
*
* @param opts The `git_filter_options` struct to initialize.
* @param version The struct version; pass `GIT_FILTER_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_filter_options_init(
git_filter_options *opts,
unsigned int version);
/**
* A filter that can transform file data
*

View File

@@ -68,6 +68,20 @@ typedef struct {
*/
#define GIT_ODB_OPTIONS_INIT { GIT_ODB_OPTIONS_VERSION }
/**
* Initialize git_odb_options_options structure
*
* Initialize a `git_odb_options` with default values. Equivalent to
* creating an instance with GIT_ODB_OPTIONS_INIT.
*
* @param opts The `git_odb_options` struct to initialize.
* @param version The struct version; pass `GIT_ODB_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_odb_options_init(
git_odb_options *opts,
unsigned int version);
/**
* Create a new object database with no backends.
*

View File

@@ -47,6 +47,22 @@ typedef struct {
#define GIT_ODB_BACKEND_PACK_OPTIONS_INIT \
{ GIT_ODB_BACKEND_PACK_OPTIONS_VERSION }
/**
* Initialize git_odb_backend_pack_options structure
*
* Initialize a `git_odb_backend_pack_options` with default values.
* Equivalent to creating an instance with
* GIT_ODB_BACKEND_PACK_OPTIONS_INIT.
*
* @param opts The `git_odb_backend_pack_options` struct to initialize.
* @param version The struct version; pass
* `GIT_ODB_BACKEND_PACK_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_odb_backend_pack_options_init(
git_odb_backend_pack_options *opts,
unsigned int version);
typedef enum {
GIT_ODB_BACKEND_LOOSE_FSYNC = (1 << 0)
} git_odb_backend_loose_flag_t;
@@ -96,6 +112,22 @@ typedef struct {
#define GIT_ODB_BACKEND_LOOSE_OPTIONS_INIT \
{ GIT_ODB_BACKEND_LOOSE_OPTIONS_VERSION, 0, -1 }
/**
* Initialize git_odb_backend_loose_options structure
*
* Initialize a `git_odb_backend_loose_options` with default values.
* Equivalent to creating an instance with
* GIT_ODB_BACKEND_LOOSE_OPTIONS_INIT.
*
* @param opts The `git_odb_backend_loose_options` struct to initialize.
* @param version The struct version; pass
* `GIT_ODB_BACKEND_LOOSE_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_odb_backend_loose_options_init(
git_odb_backend_loose_options *opts,
unsigned int version);
/*
* Constructors for in-box ODB backends.
*/

View File

@@ -172,6 +172,23 @@ typedef struct {
/** Static constructor for `git_config_backend_memory_options` */
#define GIT_CONFIG_BACKEND_MEMORY_OPTIONS_INIT { GIT_CONFIG_BACKEND_MEMORY_OPTIONS_VERSION }
/**
* Initialize git_config_backend_memory_options structure
*
* Initialize a `git_config_backend_memory_options` with default values.
* Equivalent to creating an instance with
* GIT_CONFIG_BACKEND_MEMORY_OPTIONS_INIT.
*
* @param opts The `git_config_backend_memory_options` struct to
* initialize.
* @param version The struct version; pass
* `GIT_CONFIG_BACKEND_MEMORY_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN(int) git_config_backend_memory_options_init(
git_config_backend_memory_options *opts,
unsigned int version);
/**
* Create an in-memory configuration backend from a string in standard

View File

@@ -43,6 +43,15 @@ static int collect_attr_files(
static void release_attr_files(git_vector *files);
int git_attr_options_init(git_attr_options *opts, unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_attr_options, GIT_ATTR_OPTIONS_INIT);
return 0;
}
int git_attr_get_ext(
const char **value,
git_repository *repo,

View File

@@ -42,6 +42,30 @@ void git_commit__free(void *_commit)
git__free(commit);
}
int git_commit_create_ext_options_init(
git_commit_create_ext_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_commit_create_ext_options,
GIT_COMMIT_CREATE_EXT_OPTIONS_INIT);
return 0;
}
int git_commit_create_options_init(
git_commit_create_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_commit_create_options,
GIT_COMMIT_CREATE_OPTIONS_INIT);
return 0;
}
/**
* Append to 'out' properly marking continuations when there's a newline in 'content'
*/

View File

@@ -365,6 +365,18 @@ int git_commit_graph_validate(git_commit_graph *cgraph) {
return 0;
}
int git_commit_graph_open_options_init(
git_commit_graph_open_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_commit_graph_open_options,
GIT_COMMIT_GRAPH_OPEN_OPTIONS_INIT);
return 0;
}
int git_commit_graph_open(
git_commit_graph **cgraph_out,
const char *objects_dir

View File

@@ -285,6 +285,18 @@ static void config_memory_free(git_config_backend *_backend)
git__free(backend);
}
int git_config_backend_memory_options_init(
git_config_backend_memory_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_config_backend_memory_options,
GIT_CONFIG_BACKEND_MEMORY_OPTIONS_INIT);
return 0;
}
static config_memory_backend *config_backend_new(
git_config_backend_memory_options *opts)
{

View File

@@ -25,6 +25,18 @@
*/
#define EMAIL_TIMESTAMP "Mon Sep 17 00:00:00 2001"
int git_email_create_options_init(
git_email_create_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_email_create_options,
GIT_EMAIL_CREATE_OPTIONS_INIT);
return 0;
}
GIT_INLINE(int) include_prefix(
size_t patch_count,
git_email_create_options *opts)

View File

@@ -386,6 +386,15 @@ void git_index__set_ignore_case(git_index *index, bool ignore_case)
git_vector_sort(&index->reuc);
}
int git_index_options_init(git_index_options *opts, unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_index_options, GIT_INDEX_OPTIONS_INIT);
return 0;
}
int git_index_open_ext(
git_index **index_out,
const char *index_path,

View File

@@ -507,6 +507,18 @@ static int packfile__cmp(const void *a_, const void *b_)
return strcmp(a->pack_name, b->pack_name);
}
int git_midx_writer_options_init(
git_midx_writer_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_midx_writer_options,
GIT_MIDX_WRITER_OPTIONS_INIT);
return 0;
}
int git_midx_writer_new(
git_midx_writer **out,
const char *pack_dir

View File

@@ -284,6 +284,15 @@ static int backend_sort_cmp(const void *a, const void *b)
return (backend_b->priority - backend_a->priority);
}
int git_odb_options_init(git_odb_options *opts, unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_odb_options, GIT_ODB_OPTIONS_INIT);
return 0;
}
static void normalize_options(
git_odb_options *opts,
const git_odb_options *given_opts)

View File

@@ -1151,6 +1151,19 @@ static void loose_backend__free(git_odb_backend *_backend)
git__free(_backend);
}
int git_odb_backend_loose_options_init(
git_odb_backend_loose_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_odb_backend_loose_options,
GIT_ODB_BACKEND_LOOSE_OPTIONS_INIT);
return 0;
}
static void normalize_options(
git_odb_backend_loose_options *opts,
const git_odb_backend_loose_options *given_opts)

View File

@@ -877,6 +877,19 @@ static void pack_backend__free(git_odb_backend *_backend)
git__free(backend);
}
int git_odb_backend_pack_options_init(
git_odb_backend_pack_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_odb_backend_pack_options,
GIT_ODB_BACKEND_PACK_OPTIONS_INIT);
return 0;
}
static int pack_backend__alloc(
struct pack_backend **out,
size_t initial_size,

View File

@@ -330,6 +330,18 @@ on_error:
return NULL;
}
int git_repository_new_options_init(
git_repository_new_options *opts,
unsigned int version)
{
GIT_ASSERT_ARG(opts);
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
opts, version, git_repository_new_options,
GIT_REPOSITORY_NEW_OPTIONS_INIT);
return 0;
}
int git_repository_new_ext(
git_repository **out,
git_repository_new_options *opts)

View File

@@ -5,6 +5,8 @@
#include <git2/sys/odb_backend.h>
#include <git2/sys/refdb_backend.h>
#include <git2/sys/transport.h>
#include <git2/sys/midx.h>
#include <git2/sys/repository.h>
#define STRINGIFY(s) #s
@@ -78,6 +80,11 @@ void test_core_structinit__compare(void)
git_apply_options, GIT_APPLY_OPTIONS_VERSION, \
GIT_APPLY_OPTIONS_INIT, git_apply_options_init);
/* attr */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_attr_options, GIT_ATTR_OPTIONS_VERSION, \
GIT_ATTR_OPTIONS_INIT, git_attr_options_init);
/* blame */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_blame_options, GIT_BLAME_OPTIONS_VERSION, \
@@ -93,11 +100,37 @@ void test_core_structinit__compare(void)
git_checkout_options, GIT_CHECKOUT_OPTIONS_VERSION, \
GIT_CHECKOUT_OPTIONS_INIT, git_checkout_options_init);
/* cherrypick */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_cherrypick_options, GIT_CHERRYPICK_OPTIONS_VERSION, \
GIT_CHERRYPICK_OPTIONS_INIT, git_cherrypick_options_init);
/* clone */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_clone_options, GIT_CLONE_OPTIONS_VERSION, \
GIT_CLONE_OPTIONS_INIT, git_clone_options_init);
/* commit_create */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_commit_create_options, \
GIT_COMMIT_CREATE_OPTIONS_VERSION, \
GIT_COMMIT_CREATE_OPTIONS_INIT, \
git_commit_create_options_init);
/* commit_create_ext */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_commit_create_ext_options, \
GIT_COMMIT_CREATE_EXT_OPTIONS_VERSION, \
GIT_COMMIT_CREATE_EXT_OPTIONS_INIT, \
git_commit_create_ext_options_init);
/* commit_graph_open */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_commit_graph_open_options, \
GIT_COMMIT_GRAPH_OPEN_OPTIONS_VERSION, \
GIT_COMMIT_GRAPH_OPEN_OPTIONS_INIT, \
git_commit_graph_open_options_init);
/* commit_graph_writer */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_commit_graph_writer_options, \
@@ -105,6 +138,18 @@ void test_core_structinit__compare(void)
GIT_COMMIT_GRAPH_WRITER_OPTIONS_INIT, \
git_commit_graph_writer_options_init);
/* describe */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_describe_options, GIT_DESCRIBE_OPTIONS_VERSION, \
GIT_DESCRIBE_OPTIONS_INIT, git_describe_options_init);
/* describe_format */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_describe_format_options, \
GIT_DESCRIBE_FORMAT_OPTIONS_VERSION, \
GIT_DESCRIBE_FORMAT_OPTIONS_INIT, \
git_describe_format_options_init);
/* diff */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_diff_options, GIT_DIFF_OPTIONS_VERSION, \
@@ -115,11 +160,28 @@ void test_core_structinit__compare(void)
git_diff_find_options, GIT_DIFF_FIND_OPTIONS_VERSION, \
GIT_DIFF_FIND_OPTIONS_INIT, git_diff_find_options_init);
/* email_create */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_email_create_options, \
GIT_EMAIL_CREATE_OPTIONS_VERSION, \
GIT_EMAIL_CREATE_OPTIONS_INIT, \
git_email_create_options_init);
/* filter */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_filter, GIT_FILTER_VERSION, \
GIT_FILTER_INIT, git_filter_init);
/* index */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_index_options, GIT_INDEX_OPTIONS_VERSION, \
GIT_INDEX_OPTIONS_INIT, git_index_options_init);
/* indexer */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_indexer_options, GIT_INDEXER_OPTIONS_VERSION, \
GIT_INDEXER_OPTIONS_INIT, git_indexer_options_init);
/* merge_file_input */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_merge_file_input, GIT_MERGE_FILE_INPUT_VERSION, \
@@ -135,11 +197,64 @@ void test_core_structinit__compare(void)
git_merge_options, GIT_MERGE_OPTIONS_VERSION, \
GIT_MERGE_OPTIONS_INIT, git_merge_options_init);
/* object_id */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_object_id_options, GIT_OBJECT_ID_OPTIONS_VERSION, \
GIT_OBJECT_ID_OPTIONS_INIT, git_object_id_options_init);
/* odb */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_odb_options, GIT_ODB_OPTIONS_VERSION, \
GIT_ODB_OPTIONS_INIT, git_odb_options_init);
/* odb_backend_pack */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_odb_backend_pack_options, \
GIT_ODB_BACKEND_PACK_OPTIONS_VERSION, \
GIT_ODB_BACKEND_PACK_OPTIONS_INIT, \
git_odb_backend_pack_options_init);
/* odb_backend_loose */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_odb_backend_loose_options, \
GIT_ODB_BACKEND_LOOSE_OPTIONS_VERSION, \
GIT_ODB_BACKEND_LOOSE_OPTIONS_INIT, \
git_odb_backend_loose_options_init);
/* proxy */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_proxy_options, GIT_PROXY_OPTIONS_VERSION, \
GIT_PROXY_OPTIONS_INIT, git_proxy_options_init);
/* rebase */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_rebase_options, GIT_REBASE_OPTIONS_VERSION, \
GIT_REBASE_OPTIONS_INIT, git_rebase_options_init);
/* remote_create */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_remote_create_options, \
GIT_REMOTE_CREATE_OPTIONS_VERSION, \
GIT_REMOTE_CREATE_OPTIONS_INIT, \
git_remote_create_options_init);
/* fetch */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_fetch_options, GIT_FETCH_OPTIONS_VERSION, \
GIT_FETCH_OPTIONS_INIT, git_fetch_options_init);
/* push */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_push_options, GIT_PUSH_OPTIONS_VERSION, \
GIT_PUSH_OPTIONS_INIT, git_push_options_init);
/* remote_connect */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_remote_connect_options, \
GIT_REMOTE_CONNECT_OPTIONS_VERSION, \
GIT_REMOTE_CONNECT_OPTIONS_INIT, \
git_remote_connect_options_init);
/* remote */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_remote_callbacks, GIT_REMOTE_CALLBACKS_VERSION, \
@@ -147,8 +262,10 @@ void test_core_structinit__compare(void)
/* repository_init */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_repository_init_options, GIT_REPOSITORY_INIT_OPTIONS_VERSION, \
GIT_REPOSITORY_INIT_OPTIONS_INIT, git_repository_init_options_init);
git_repository_init_options, \
GIT_REPOSITORY_INIT_OPTIONS_VERSION, \
GIT_REPOSITORY_INIT_OPTIONS_INIT, \
git_repository_init_options_init);
/* revert */
CHECK_MACRO_FUNC_INIT_EQUAL( \
@@ -180,6 +297,13 @@ void test_core_structinit__compare(void)
git_config_backend, GIT_CONFIG_BACKEND_VERSION, \
GIT_CONFIG_BACKEND_INIT, git_config_init_backend);
/* config_backend_memory */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_config_backend_memory_options, \
GIT_CONFIG_BACKEND_MEMORY_OPTIONS_VERSION, \
GIT_CONFIG_BACKEND_MEMORY_OPTIONS_INIT, \
git_config_backend_memory_options_init);
/* odb_backend */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_odb_backend, GIT_ODB_BACKEND_VERSION, \
@@ -187,20 +311,50 @@ void test_core_structinit__compare(void)
/* refdb_backend */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_refdb_backend, GIT_REFDB_BACKEND_VERSION, \
GIT_REFDB_BACKEND_INIT, git_refdb_init_backend);
git_refdb_backend, \
GIT_REFDB_BACKEND_VERSION, \
GIT_REFDB_BACKEND_INIT, \
git_refdb_init_backend);
/* submodule update */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_submodule_update_options, GIT_SUBMODULE_UPDATE_OPTIONS_VERSION, \
GIT_SUBMODULE_UPDATE_OPTIONS_INIT, git_submodule_update_options_init);
git_submodule_update_options, \
GIT_SUBMODULE_UPDATE_OPTIONS_VERSION, \
GIT_SUBMODULE_UPDATE_OPTIONS_INIT, \
git_submodule_update_options_init);
/* submodule update */
/* worktree add */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_proxy_options, GIT_PROXY_OPTIONS_VERSION, \
GIT_PROXY_OPTIONS_INIT, git_proxy_options_init);
git_worktree_add_options, \
GIT_WORKTREE_ADD_OPTIONS_VERSION, \
GIT_WORKTREE_ADD_OPTIONS_INIT, \
git_worktree_add_options_init);
/* worktree prune */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_diff_patchid_options, GIT_DIFF_PATCHID_OPTIONS_VERSION, \
GIT_DIFF_PATCHID_OPTIONS_INIT, git_diff_patchid_options_init);
git_worktree_prune_options, \
GIT_WORKTREE_PRUNE_OPTIONS_VERSION, \
GIT_WORKTREE_PRUNE_OPTIONS_INIT, \
git_worktree_prune_options_init);
/* midx_writer */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_midx_writer_options, \
GIT_MIDX_WRITER_OPTIONS_VERSION, \
GIT_MIDX_WRITER_OPTIONS_INIT, \
git_midx_writer_options_init);
/* repository new */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_repository_new_options, \
GIT_REPOSITORY_NEW_OPTIONS_VERSION, \
GIT_REPOSITORY_NEW_OPTIONS_INIT, \
git_repository_new_options_init);
/* worktree prune */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_worktree_prune_options, \
GIT_WORKTREE_PRUNE_OPTIONS_VERSION, \
GIT_WORKTREE_PRUNE_OPTIONS_INIT, \
git_worktree_prune_options_init);
}