1. 22 Nov, 2014 1 commit
    • peel: reject bad queries with EINVALIDSPEC · 753e17b0
      There are some combination of objects and target types which we know
      cannot be fulfilled. Return EINVALIDSPEC for those to signify that there
      is a mismatch in the user-provided data and what the object model is
      capable of satisfying.
      
      If we start at a tag and in the course of peeling find out that we
      cannot reach a particular type, we return EPEEL.
      Carlos Martín Nieto committed
  2. 08 Oct, 2014 5 commits
  3. 24 Jul, 2014 1 commit
  4. 10 Jun, 2014 1 commit
    • revwalk: more sensible array handling · f9a97667
      Instead of using a sentinel empty value to detect the last commit, let's
      check for when we get a NULL from popping the stack, which lets us know
      when we're done.
      
      The current code causes us to read uninitialized data, although only on
      RHEL/CentOS 6 in release mode. This is a readability win overall.
      Carlos Martín Nieto committed
  5. 31 Mar, 2014 1 commit
  6. 24 Mar, 2014 3 commits
  7. 20 Mar, 2014 1 commit
    • revwalk: don't try to find merge bases when there can be none · 704b55cc
      As a way to speed up the cases where we need to hide some commits, we
      find out what the merge bases are so we know to stop marking commits as
      uninteresting and avoid walking down a potentially very large amount of
      commits which we will never see. There are however two oversights in
      current code.
      
      The merge-base finding algorithm fails to recognize that if it is only
      given one commit, there can be no merge base. It instead walks down the
      whole ancestor chain needlessly. Make it return an empty list
      immediately in this situation.
      
      The revwalk does not know whether the user has asked to hide any commits
      at all. In situation where the user pushes multiple commits but doesn't
      hide any, the above fix wouldn't do the trick. Keep track of whether the
      user wants to hide any commits and only run the merge-base finding
      algorithm when it's needed.
      Carlos Martín Nieto committed
  8. 05 Feb, 2014 3 commits
  9. 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
  10. 11 Dec, 2013 2 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
  11. 23 Sep, 2013 1 commit
    • Remove regex usage from places that don't need it · 106c12f1
      In revwalk, we are doing a very simple check to see if a string
      contains wildcard characters, so a full regular expression match
      is not needed.
      
      In remote listing, now that we have git_config_foreach_match with
      full regular expression matching, we can take advantage of that
      and eliminate the regex here, replacing it with much simpler string
      manipulation.
      Russell Belfer committed
  12. 09 Sep, 2013 1 commit
  13. 06 Sep, 2013 1 commit
  14. 11 May, 2013 1 commit
    • refs: remove the OID/SYMBOLIC filtering · 2b562c3a
      Nobody should ever be using anything other than ALL at this level, so
      remove the option altogether.
      
      As part of this, git_reference_foreach_glob is now implemented in the
      frontend using an iterator. Backends will later regain the ability of
      doing the glob filtering in the backend.
      Carlos Martín Nieto committed
  15. 15 Apr, 2013 3 commits
  16. 09 Apr, 2013 1 commit
  17. 07 Apr, 2013 1 commit
  18. 08 Jan, 2013 1 commit
  19. 30 Nov, 2012 1 commit
  20. 27 Nov, 2012 2 commits
  21. 27 Sep, 2012 1 commit
  22. 09 Sep, 2012 1 commit
  23. 05 Sep, 2012 1 commit
    • Diff iterators · f335ecd6
      This refactors the diff output code so that an iterator object
      can be used to traverse and generate the diffs, instead of just
      the `foreach()` style with callbacks.  The code has been rearranged
      so that the two styles can still share most functions.
      
      This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses
      that as a common error code for marking the end of iteration when
      using a iterator style of object.
      Russell Belfer committed
  24. 27 Aug, 2012 1 commit
  25. 11 Jul, 2012 1 commit
  26. 22 Jun, 2012 1 commit
  27. 11 Jun, 2012 1 commit