Commit Graph

4 Commits

Author SHA1 Message Date
Patrick Steinhardt
a7aa73a535 worktree: introduce git_worktree_add options
The `git_worktree_add` function currently accepts only a path and name
for the new work tree. As we may want to expand these parameters in
future versions without adding additional parameters to the function for
every option, this commit introduces our typical pattern of an options
struct. Right now, this structure is still empty, which will change with
the next commit.
2017-05-02 12:39:29 +02:00
Patrick Steinhardt
b0c9bc920f submodule: resolve URLs relative to main worktree
It is possible to specify submodule URLs relative to the repository
location. E.g. having a submodule with URL "../submodule" will look for
the submodule at "repo/../submodule".

With the introduction of worktrees, though, we cannot simply resolve the
URL relative to the repository location itself. If the repository for
which a URL is to be resolved is a working tree, we have to resolve the
URL relative to the parent's repository path. Otherwise, the URL would
change depending on where the working tree is located.

Fix this by special-casing when we have a working tree while getting the
URL base.
2017-03-17 09:27:56 +01:00
Patrick Steinhardt
548e5bdf1e tests: worktree: unify init/cleanup in submodule tests 2017-03-15 12:28:05 +01:00
Patrick Steinhardt
aa593a65df tests: worktree: move submodule tests into own suite 2017-03-15 12:01:02 +01:00