]> git.proxmox.com Git - libgit2.git/commit - tests/worktree/open.c
worktree: implement `git_worktree_open_from_repository`
authorPatrick Steinhardt <ps@pks.im>
Wed, 15 Mar 2017 13:24:25 +0000 (14:24 +0100)
committerPatrick Steinhardt <ps@pks.im>
Fri, 17 Mar 2017 08:26:13 +0000 (09:26 +0100)
commit3017ba94a33a5dae07521afd96a94e21afb07b8c
treed80c60c55024b1d92ff1858e6d0ea2e5b78b12f2
parentdfc98706479c252c023ba093b690c6202a5021e5
worktree: implement `git_worktree_open_from_repository`

While we already provide functionality to look up a worktree from a
repository, we cannot do so the other way round. That is given a
repository, we want to look up its worktree if it actually exists.
Getting the worktree of a repository is useful when we want to get
certain meta information like the parent's location, getting the locked
status, etc.
include/git2/worktree.h
src/worktree.c
tests/worktree/open.c