1. 06 Dec, 2015 1 commit
  2. 02 Dec, 2015 1 commit
  3. 01 Dec, 2015 1 commit
    • tree: mark cloned tree entries as un-pooled · 9487585d
      When duplicating a `struct git_tree_entry` with
      `git_tree_entry_dup` the resulting structure is not allocated
      inside a memory pool. As we do a 1:1 copy of the original struct,
      though, we also copy the `pooled` field, which is set to `true`
      for pooled entries. This results in a huge memory leak as we
      never free tree entries that were duplicated from a pooled
      tree entry.
      
      Fix this by marking the newly duplicated entry as un-pooled.
      Patrick Steinhardt committed
  4. 30 Nov, 2015 1 commit
  5. 28 Nov, 2015 4 commits
  6. 17 Mar, 2015 1 commit
  7. 15 Feb, 2015 1 commit
  8. 13 Feb, 2015 3 commits
  9. 27 Dec, 2014 1 commit
  10. 17 Dec, 2014 1 commit
  11. 16 Dec, 2014 1 commit
  12. 10 Oct, 2014 2 commits
    • index: fill the tree cache on write-tree · 7465e873
      An obvious place to fill the tree cache is on write-tree, as we're
      guaranteed to be able to fill in the whole tree cache.
      
      The way this commit does this is not the most efficient, as we read the
      root tree from the odb instead of filling in the cache as we go along,
      but it fills the cache such that successive operations (and persisting
      the index to disk) will be able to take advantage of the cache, and it
      reuses the code we already have for filling the cache.
      
      Filling in the cache as we create the trees would require some
      reallocation of the children vector, which is currently not possible
      with out pool implementation. A different data structure would likely
      allow us to perform this operation at a later date.
      Carlos Martín Nieto committed
    • index: write out the tree cache extension · c2f8b215
      Keeping the cache around after read-tree is only one part of the
      optimisation opportunities. In order to share the cache between program
      instances, we need to write the TREE extension to the index.
      
      Do so, taking the opportunity to rename 'entries' to 'entry_count' to
      match the name given in the format description. The included test is
      rather trivial, but works as a sanity check.
      Carlos Martín Nieto committed
  13. 25 Jun, 2014 1 commit
  14. 10 Jun, 2014 3 commits
  15. 09 Jun, 2014 1 commit
  16. 04 Feb, 2014 1 commit
    • Convert pqueue to just be a git_vector · 882c7742
      This updates the git_pqueue to simply be a set of specialized
      init/insert/pop functions on a git_vector.
      
      To preserve the pqueue feature of having a fixed size heap, I
      converted the "sorted" field in git_vectors to a more general
      "flags" field so that pqueue could mix in it's own flag.  This
      had a bunch of ramifications because a number of places were
      directly looking at the vector "sorted" field - I added a couple
      new git_vector helpers (is_sorted, set_sorted) so the specific
      representation of this information could be abstracted.
      Russell Belfer committed
  17. 25 Jan, 2014 2 commits
  18. 14 Jan, 2014 1 commit
  19. 11 Dec, 2013 3 commits
    • Remove converting user error to GIT_EUSER · 25e0b157
      This changes the behavior of callbacks so that the callback error
      code is not converted into GIT_EUSER and instead we propagate the
      return value through to the caller.  Instead of using the
      giterr_capture and giterr_restore functions, we now rely on all
      functions to pass back the return value from a callback.
      
      To avoid having a return value with no error message, the user
      can call the public giterr_set_str or some such function to set
      an error message.  There is a new helper 'giterr_set_callback'
      that functions can invoke after making a callback which ensures
      that some error message was set in case the callback did not set
      one.
      
      In places where the sign of the callback return value is
      meaningful (e.g. positive to skip, negative to abort), only the
      negative values are returned back to the caller, obviously, since
      the other values allow for continuing the loop.
      
      The hardest parts of this were in the checkout code where positive
      return values were overloaded as meaningful values for checkout.
      I fixed this by adding an output parameter to many of the internal
      checkout functions and removing the overload.  This added some
      code, but it is probably a better implementation.
      
      There is some funkiness in the network code where user provided
      callbacks could be returning a positive or a negative value and
      we want to rely on that to cancel the loop.  There are still a
      couple places where an user error might get turned into GIT_EUSER
      there, I think, though none exercised by the tests.
      Russell Belfer committed
    • Further EUSER and error propagation fixes · dab89f9b
      This continues auditing all the places where GIT_EUSER is being
      returned and making sure to clear any existing error using the
      new giterr_user_cancel helper.  As a result, places that relied
      on intercepting GIT_EUSER but having the old error preserved also
      needed to be cleaned up to correctly stash and then retrieve the
      actual error.
      
      Additionally, as I encountered places where error codes were not
      being propagated correctly, I tried to fix them up.  A number of
      those fixes are included in the this commit as well.
      Russell Belfer committed
  20. 08 Oct, 2013 1 commit
  21. 13 Sep, 2013 2 commits
  22. 05 Sep, 2013 2 commits
  23. 10 Jun, 2013 1 commit
    • Reorganize diff and add basic diff driver · 114f5a6c
      This is a significant reorganization of the diff code to break it
      into a set of more clearly distinct files and to document the new
      organization.  Hopefully this will make the diff code easier to
      understand and to extend.
      
      This adds a new `git_diff_driver` object that looks of diff driver
      information from the attributes and the config so that things like
      function content in diff headers can be provided.  The full driver
      spec is not implemented in the commit - this is focused on the
      reorganization of the code and putting the driver hooks in place.
      
      This also removes a few #includes from src/repository.h that were
      overbroad, but as a result required extra #includes in a variety
      of places since including src/repository.h no longer results in
      pulling in the whole world.
      Russell Belfer committed
  24. 16 May, 2013 1 commit
    • Add cat-file example and increase const use in API · 58206c9a
      This adds an example implementation that emulates git cat-file.
      It is a convenient and relatively simple example of getting data
      out of a repository.
      
      Implementing this also revealed that there are a number of APIs
      that are still not using const pointers to objects that really
      ought to be.  The main cause of this is that `git_vector_bsearch`
      may need to call `git_vector_sort` before doing the search, so a
      const pointer to the vector is not allowed.  However, for tree
      objects, with a little care, we can ensure that the vector of
      tree entries is always sorted and allow lookups to take a const
      pointer.  Also, the missing const in commit objects just looks
      like an oversight.
      Russell Belfer committed
  25. 01 May, 2013 1 commit
  26. 30 Apr, 2013 2 commits