summaryrefslogtreecommitdiff
path: root/include/git2/worktree.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-04-17 23:38:46 +0100
committerGitHub <noreply@github.com>2018-04-17 23:38:46 +0100
commit8529ac9b98e9d05c2616b855a497ee88c4f5c955 (patch)
tree746400c37073424a3e9e3cbb627df047d2348b68 /include/git2/worktree.h
parent1fd267608803f401a72380d26fbaf57ac3f4fe38 (diff)
parenta22f19e6c4c0bf5205cd47dd66bfacd5c7d18136 (diff)
downloadlibgit2-8529ac9b98e9d05c2616b855a497ee88c4f5c955.tar.gz
Merge pull request #4524 from pks-t/pks/worktree-refs
worktree: add ability to create worktree with pre-existing branch
Diffstat (limited to 'include/git2/worktree.h')
-rw-r--r--include/git2/worktree.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/git2/worktree.h b/include/git2/worktree.h
index a2a5d4473..e975c9239 100644
--- a/include/git2/worktree.h
+++ b/include/git2/worktree.h
@@ -78,10 +78,11 @@ 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 */
} git_worktree_add_options;
#define GIT_WORKTREE_ADD_OPTIONS_VERSION 1
-#define GIT_WORKTREE_ADD_OPTIONS_INIT {GIT_WORKTREE_ADD_OPTIONS_VERSION,0}
+#define GIT_WORKTREE_ADD_OPTIONS_INIT {GIT_WORKTREE_ADD_OPTIONS_VERSION,0,NULL}
/**
* Initializes a `git_worktree_add_options` with default vaules.