1. 16 Aug, 2018 1 commit
  2. 29 Jun, 2018 3 commits
  3. 10 Jun, 2018 1 commit
  4. 07 May, 2018 1 commit
  5. 25 Apr, 2018 1 commit
  6. 20 Apr, 2018 1 commit
  7. 03 Mar, 2018 1 commit
  8. 02 Mar, 2018 1 commit
  9. 09 Feb, 2018 1 commit
    • worktree: add ability to create worktree with pre-existing branch · a22f19e6
      Currently, we always create a new branch after the new worktree's name
      when creating a worktree. In some workflows, though, the caller may want
      to check out an already existing reference instead of creating a new
      one, which is impossible to do right now.
      
      Add a new option `ref` to the options structure for adding worktrees. In
      case it is set, a branch and not already checked out by another
      worktree, we will re-use this reference instead of creating a new one.
      Patrick Steinhardt committed
  10. 03 Jul, 2017 1 commit
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
  11. 08 Jun, 2017 1 commit
  12. 05 May, 2017 2 commits
    • worktree: switch over worktree pruning to an opts structure · 883eeb5f
      The current signature of `git_worktree_prune` accepts a flags field to
      alter its behavior. This is not as flexible as we'd like it to be when
      we want to enable passing additional options in the future. As the
      function has not been part of any release yet, we are still free to
      alter its current signature. This commit does so by using our usual
      pattern of an options structure, which is easily extendable without
      breaking the API.
      Patrick Steinhardt committed
    • worktree: support creating locked worktrees · 8264a30f
      When creating a new worktree, we do have a potential race with us
      creating the worktree and another process trying to delete the same
      worktree as it is being created. As such, the upstream git project has
      introduced a flag `git worktree add --locked`, which will cause the
      newly created worktree to be locked immediately after its creation. This
      mitigates the race condition.
      
      We want to be able to mirror the same behavior. As such, a new flag
      `locked` is added to the options structure of `git_worktree_add` which
      allows the user to enable this behavior.
      Patrick Steinhardt committed
  13. 02 May, 2017 1 commit
    • worktree: introduce git_worktree_add options · a7aa73a5
      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.
      Patrick Steinhardt committed
  14. 24 Mar, 2017 1 commit
  15. 17 Mar, 2017 7 commits
  16. 13 Feb, 2017 8 commits