From 885744a77e8a727dd725f6a5fa8d80c199668fb7 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 5 Mar 2024 09:23:03 +0000 Subject: [PATCH] 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. --- include/git2/worktree.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/git2/worktree.h b/include/git2/worktree.h index 3f1acbdb0..c41bc8e7b 100644 --- a/include/git2/worktree.h +++ b/include/git2/worktree.h @@ -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