summaryrefslogtreecommitdiffstats
path: root/include/git2/worktree.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:03:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:03:04 +0000
commit3b8d76c14c6a5f32d1f23f7e952dc4d859d75e9f (patch)
tree773f780ce433e99a5e25775d640778aa8b50d829 /include/git2/worktree.h
parentAdding debian version 1.7.2+ds-1. (diff)
downloadlibgit2-3b8d76c14c6a5f32d1f23f7e952dc4d859d75e9f.tar.xz
libgit2-3b8d76c14c6a5f32d1f23f7e952dc4d859d75e9f.zip
Merging upstream version 1.8.1+ds.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/git2/worktree.h')
-rw-r--r--include/git2/worktree.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/git2/worktree.h b/include/git2/worktree.h
index 9193eaf..a6e5d17 100644
--- a/include/git2/worktree.h
+++ b/include/git2/worktree.h
@@ -11,6 +11,7 @@
#include "buffer.h"
#include "types.h"
#include "strarray.h"
+#include "checkout.h"
/**
* @file git2/worktrees.h
@@ -85,8 +86,9 @@ GIT_EXTERN(int) git_worktree_validate(const git_worktree *wt);
typedef struct git_worktree_add_options {
unsigned int version;
- int lock; /**< lock newly created worktree */
- git_reference *ref; /**< reference to use for the new worktree HEAD */
+ 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 */
/**
* Options for the checkout.
@@ -95,7 +97,8 @@ typedef struct git_worktree_add_options {
} git_worktree_add_options;
#define GIT_WORKTREE_ADD_OPTIONS_VERSION 1
-#define GIT_WORKTREE_ADD_OPTIONS_INIT {GIT_WORKTREE_ADD_OPTIONS_VERSION,0,NULL,GIT_CHECKOUT_OPTIONS_INIT}
+#define GIT_WORKTREE_ADD_OPTIONS_INIT { GIT_WORKTREE_ADD_OPTIONS_VERSION, \
+ 0, 0, NULL, GIT_CHECKOUT_OPTIONS_INIT }
/**
* Initialize git_worktree_add_options structure