1. 02 Feb, 2017 1 commit
  2. 23 Jan, 2017 1 commit
  3. 20 Jan, 2017 1 commit
    • Allow for caching of submodules. · 4d99c4cf
      Added `git_repository_submodule_cache_all` to initialze a cache of
      submodules on the repository so that operations looking up N
      submodules are O(N) and not O(N^2).  Added a
      `git_repository_submodule_cache_clear` function to remove the cache.
      
      Also optimized the function that loads all submodules as it was itself
      O(N^2) w.r.t the number of submodules, having to loop through the
      `.gitmodules` file once per submodule.  I changed it to process the
      `.gitmodules` file once, into a map.
      
      Signed-off-by: David Turner <dturner@twosigma.com>
      Brock Peabody committed
  4. 14 Jan, 2017 1 commit
  5. 09 Jan, 2017 2 commits
  6. 06 Jan, 2017 1 commit
  7. 04 Jan, 2017 1 commit
  8. 02 Jan, 2017 1 commit
  9. 01 Jan, 2017 1 commit
  10. 30 Dec, 2016 1 commit
    • Fix handling of GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH flag. · 5f959dca
      git_checkout_tree() sets up its working directory iterator to respect the
      pathlist if GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH is present, which is great.
      What's not so great is that this iterator is then used side-by-side with
      an iterator created by git_checkout_iterator(), which did not set up its
      pathlist appropriately (although the iterator mirrors all other iterator
      options).
      
      This could cause git_checkout_tree() to delete working tree files which
      were not specified in the pathlist when GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH
      was used, as the unsynchronized iterators causes git_checkout_tree() to think
      that files have been deleted between the two trees.  Oops.
      
      And added a test which fails without this fix (specifically, the final check
      for "testrepo/README" to still be present fails).
      John Fultz committed
  11. 29 Dec, 2016 1 commit
  12. 18 Dec, 2016 1 commit
  13. 17 Dec, 2016 1 commit
  14. 12 Dec, 2016 2 commits
  15. 02 Dec, 2016 1 commit
  16. 18 Nov, 2016 5 commits
  17. 14 Nov, 2016 11 commits
  18. 04 Nov, 2016 1 commit
    • branch: fix forced branch creation on HEAD of a bare repo · f9793884
      The code correctly detects that forced creation of a branch on a
      nonbare repo should not be able to overwrite a branch which is
      the HEAD reference.  But there's no reason to prevent this on
      a bare repo, and in fact, git allows this.  I.e.,
      
         git branch -f master new_sha
      
      works on a bare repo with HEAD set to master.  This change fixes
      that problem, and updates tests so that, for this case, both the
      bare and nonbare cases are checked for correct behavior.
      John Fultz committed
  19. 02 Nov, 2016 1 commit
    • tests: core: test deinitialization and concurrent initialization · 1c33ecc4
      Exercise the logic surrounding deinitialization of the libgit2
      library as well as repeated concurrent de- and reinitialization.
      This tries to catch races and makes sure that it is possible to
      reinitialize libgit2 multiple times.
      
      After deinitializing libgit2, we have to make sure to setup
      options required for testing. Currently, this only includes
      setting up the configuration search path again. Before, this has
      been set up once in `tests/main.c`.
      Patrick Steinhardt committed
  20. 28 Oct, 2016 1 commit
    • pqueue: resolve possible NULL pointer dereference · 95fa3880
      The `git_pqueue` struct allows being fixed in its total number of
      entries. In this case, we simply throw away items that are
      inserted into the priority queue by examining wether the new item
      to be inserted has a higher priority than the previous smallest
      one.
      
      This feature somewhat contradicts our pqueue implementation in
      that it is allowed to not have a comparison function. In fact, we
      also fail to check if the comparison function is actually set in
      the case where we add a new item into a fully filled fixed-size
      pqueue.
      
      As we cannot determine which item is the smallest item in absence
      of a comparison function, we fix the `NULL` pointer dereference
      by simply dropping all new items which are about to be inserted
      into a full fixed-size pqueue.
      Patrick Steinhardt committed
  21. 27 Oct, 2016 2 commits
  22. 09 Oct, 2016 1 commit
  23. 07 Oct, 2016 1 commit