worktree: keep version number at 1

We aren't upgrading options struct version numbers when we make ABI
changes. This is a future (v2.0+) plan for libgit2. In the meantime,
keep the version numbers at 1.
This commit is contained in:
Edward Thomson
2024-03-05 09:23:03 +00:00
parent ea5028ab68
commit 885744a77e

View File

@@ -86,11 +86,12 @@ typedef struct git_worktree_add_options {
int lock; /**< lock newly created worktree */
int checkout_existing; /**< allow checkout of existing branch matching worktree name */
git_reference *ref; /**< reference to use for the new worktree HEAD */
} git_worktree_add_options;
#define GIT_WORKTREE_ADD_OPTIONS_VERSION 2
#define GIT_WORKTREE_ADD_OPTIONS_INIT {GIT_WORKTREE_ADD_OPTIONS_VERSION,0,0,NULL}
#define GIT_WORKTREE_ADD_OPTIONS_VERSION 1
#define GIT_WORKTREE_ADD_OPTIONS_INIT { GIT_WORKTREE_ADD_OPTIONS_VERSION }
/**
* Initialize git_worktree_add_options structure