1. 24 Mar, 2017 3 commits
  2. 23 Mar, 2017 6 commits
  3. 22 Mar, 2017 6 commits
  4. 21 Mar, 2017 7 commits
  5. 20 Mar, 2017 11 commits
  6. 17 Mar, 2017 7 commits
    • submodule: resolve URLs relative to main worktree · b0c9bc92
      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.
      Patrick Steinhardt committed
    • refdb: create references in commondir · 097f0105
      References for a repository are usually created inside of its gitdir.
      When using worktrees, though, these references are not to be created
      inside the worktree gitdir, but instead inside the gitdir of its parent
      repository, which is the commondir. Like this, branches will still be
      available after the worktree itself has been deleted.
      
      The filesystem refdb currently still creates new references inside of
      the gitdir. Fix this and have it create references in commondir.
      Patrick Steinhardt committed
    • worktree: write resolved paths into link files · 8f154be3
      The three link files "worktree/.git", ".git/worktrees/<name>/commondir"
      and ".git/worktrees/<name>/gitdir" should always contain absolute and
      resolved paths. Adjust the logic creating new worktrees to first use
      `git_path_prettify_dir` before writing out these files, so that paths
      are resolved first.
      Patrick Steinhardt committed
    • worktree: use fully qualified reference name for created HEAD · 9dcc79bc
      When creating a new worktree, we have to set up the initial data
      structures. Next to others, this also includes the HEAD pseudo-ref.
      We currently set it to the worktree respectively branch name, which is
      actually not fully qualified.
      
      Use the fully qualified branch name instead.
      Patrick Steinhardt committed
    • worktree: parent path should point to the working dir · 20a368e2
      The working tree's parent path should not point to the parent's gitdir,
      but to the parent's working directory. Pointing to the gitdir would not
      make any sense, as the parent's working directory is actually equal to
      both repository's common directory.
      
      Fix the issue.
      Patrick Steinhardt committed
    • worktree: implement `git_worktree_open_from_repository` · 3017ba94
      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.
      Patrick Steinhardt committed