diff options
| author | Matt Keeler <mjkeeler7@gmail.com> | 2018-04-24 17:09:34 -0700 |
|---|---|---|
| committer | Matt Keeler <mjkeeler7@gmail.com> | 2018-04-25 08:28:45 -0700 |
| commit | 3da1ad20a3f19fcb4e0eea3f4a08509e5811aca7 (patch) | |
| tree | f461b0f68b42e6e62dc0a0fa58a0323ae093e0db /include | |
| parent | 45a3b9cd6e5407a031f102b1ea987f150b06d059 (diff) | |
| download | libgit2-3da1ad20a3f19fcb4e0eea3f4a08509e5811aca7.tar.gz | |
worktree: add functions to get name and path
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/worktree.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/git2/worktree.h b/include/git2/worktree.h index a2a5d4473..8ba5dcef0 100644 --- a/include/git2/worktree.h +++ b/include/git2/worktree.h @@ -149,6 +149,24 @@ GIT_EXTERN(int) git_worktree_unlock(git_worktree *wt); GIT_EXTERN(int) git_worktree_is_locked(git_buf *reason, const git_worktree *wt); /** + * Retrieve the name of the worktree + * + * @param wt Worktree to get the name for + * @return The worktree's name. The pointer returned is valid for the + * lifetime of the git_worktree + */ +GIT_EXTERN(const char *) git_worktree_name(const git_worktree *wt); + +/** + * Retrieve the filesystem path for the worktree + * + * @param wt Worktree to get the path for + * @return The worktree's filesystem path. The pointer returned + * is valid for the lifetime of the git_worktree. + */ +GIT_EXTERN(const char *) git_worktree_path(const git_worktree *wt); + +/** * Flags which can be passed to git_worktree_prune to alter its * behavior. */ |
