summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpunkymaniac <punkymaniac@protonmail.ch>2021-09-09 18:02:22 +0200
committerEdward Thomson <ethomson@edwardthomson.com>2021-12-23 14:21:49 -0600
commitffead012283cec68cafb3441e4be55030c94de74 (patch)
treefc146bd860d93b349c6c2e7f80ac3138c2aef42d /include
parenta50bbba18946cc7c457dc2ee376cf12b42a9b900 (diff)
downloadlibgit2-ffead012283cec68cafb3441e4be55030c94de74.tar.gz
Allow user checkout options on git_worktree_add
Extend the `git_worktree_add_options` to include `git_checkout_options`. github issue #5949
Diffstat (limited to 'include')
-rw-r--r--include/git2/worktree.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/git2/worktree.h b/include/git2/worktree.h
index 85cf1a608..ee6b04b0c 100644
--- a/include/git2/worktree.h
+++ b/include/git2/worktree.h
@@ -86,10 +86,15 @@ typedef struct git_worktree_add_options {
int lock; /**< lock newly created worktree */
git_reference *ref; /**< reference to use for the new worktree HEAD */
+
+ /**
+ * Options for the checkout.
+ */
+ git_checkout_options checkout_opts;
} git_worktree_add_options;
#define GIT_WORKTREE_ADD_OPTIONS_VERSION 1
-#define GIT_WORKTREE_ADD_OPTIONS_INIT {GIT_WORKTREE_ADD_OPTIONS_VERSION,0,NULL}
+#define GIT_WORKTREE_ADD_OPTIONS_INIT {GIT_WORKTREE_ADD_OPTIONS_VERSION,0,NULL,GIT_CHECKOUT_OPTIONS_INIT}
/**
* Initialize git_worktree_add_options structure