1. 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
  2. 21 Jun, 2017 1 commit
    • merge: fix potential free of uninitialized memory · 4dc87e72
      The function `merge_diff_mark_similarity_exact` may error our early and,
      when it does so, free the `ours_deletes_by_oid` and
      `theirs_deletes_by_oid` variables. While the first one can never be
      uninitialized due to the first call actually assigning to it, the second
      variable can be freed without being initialized.
      
      Fix the issue by initializing both variables to `NULL`.
      Patrick Steinhardt committed
  3. 17 May, 2017 1 commit
  4. 23 Mar, 2017 1 commit
  5. 13 Feb, 2017 1 commit
    • repository: rename `path_repository` and `path_gitlink` · 84f56cb0
      The `path_repository` variable is actually confusing to think
      about, as it is not always clear what the repository actually is.
      It may either be the path to the folder containing worktree and
      .git directory, the path to .git itself, a worktree or something
      entirely different. Actually, the intent of the variable is to
      hold the path to the gitdir, which is either the .git directory
      or the bare repository.
      
      Rename the variable to `gitdir` to avoid confusion. While at it,
      also rename `path_gitlink` to `gitlink` to improve consistency.
      Patrick Steinhardt committed
  6. 09 Feb, 2017 1 commit
  7. 01 Jan, 2017 1 commit
  8. 29 Dec, 2016 1 commit
  9. 14 Nov, 2016 1 commit
  10. 18 Oct, 2016 1 commit
  11. 26 May, 2016 2 commits
  12. 17 Mar, 2016 9 commits
  13. 11 Feb, 2016 1 commit
  14. 08 Feb, 2016 1 commit
  15. 16 Dec, 2015 1 commit
    • merge: Use `git_index__fill` to populate the index · 879ebab3
      Instead of calling `git_index_add` in a loop, use the new
      `git_index_fill` internal API to fill the index with the initial staged
      entries.
      
      The new `fill` helper assumes that all the entries will be unique and
      valid, so it can append them at the end of the entries vector and only
      sort it once at the end. It performs no validation checks.
      
      This prevents the quadratic behavior caused by having to sort the
      entries list once after every insertion.
      Vicent Marti committed
  16. 25 Nov, 2015 8 commits
  17. 02 Nov, 2015 3 commits
  18. 28 Oct, 2015 3 commits
  19. 27 Oct, 2015 2 commits