1. 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
  2. 06 Oct, 2016 1 commit
  3. 12 Mar, 2014 1 commit
  4. 05 Feb, 2014 1 commit
    • Avoid extra copying in pqueue operations · 1bbacc9f
      This tweaks the pqueue_up and pqueue_down routines so that they
      will not do full element swaps but instead carry over the state
      of the previous loop iteration and only assign elements for which
      we know the final position.  This will avoid a little bit of data
      assignment which should improve performance in theory.
      
      Also got rid of some vector helpers that I'm no longer using.
      Russell Belfer committed
  5. 04 Feb, 2014 2 commits
    • 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
    • Replace pqueue with code from hashsig heap · 4075e060
      I accidentally wrote a separate priority queue implementation when
      I was working on file rename detection as part of the file hash
      signature calculation code.  To simplify licensing terms, I just
      adapted that to a general purpose priority queue and replace the
      old priority queue implementation that was borrowed from elsewhere.
      
      This also removes parts of the COPYING document that no longer
      apply to libgit2.
      Russell Belfer committed
  6. 08 Jan, 2013 1 commit
  7. 04 Jan, 2013 1 commit
  8. 03 Jan, 2013 1 commit
  9. 17 Apr, 2012 1 commit
  10. 13 Feb, 2012 1 commit
  11. 29 Oct, 2011 1 commit
  12. 19 Sep, 2011 1 commit
    • Tabify everything · 87d9869f
      There were quite a few places were spaces were being used instead of
      tabs. Try to catch them all. This should hopefully not break anything.
      Except for `git blame`. Oh well.
      Vicent Marti committed
  13. 18 Sep, 2011 1 commit
    • Cleanup legal data · bb742ede
      1. The license header is technically not valid if it doesn't have a
      copyright signature.
      
      2. The COPYING file has been updated with the different licenses used in
      the project.
      
      3. The full GPLv2 header in each file annoys me.
      Vicent Marti committed
  14. 01 Jul, 2011 1 commit
  15. 15 Mar, 2011 1 commit
  16. 14 Mar, 2011 1 commit
    • Rewrite the Revision Walker · 71db842f
      The new revision walker uses an internal Commit object storage system,
      custom memory allocator and much improved topological and time sorting
      algorithms. It's about 20x times faster than the previous implementation
      when browsing big repositories.
      
      The following external API calls have changed:
      
      	`git_revwalk_next` returns an OID instead of a full commit object.
      	The initial call to `git_revwalk_next` is no longer blocking when
      	iterating through a repo with a time-sorting mode.
      
      	Iterating with Topological or inverted modes still makes the initial
      	call blocking to preprocess the commit list, but this block should be
      	mostly unnoticeable on most repositories (topological preprocessing
      	times at 0.3s on the git.git repo).
      
      	`git_revwalk_push` and `git_revwalk_hide` now take an OID instead
      	of a full commit object.
      Vicent Marti committed