1. 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
  2. 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
  3. 09 Sep, 2013 1 commit
  4. 06 Sep, 2013 1 commit
  5. 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
  6. 15 Apr, 2013 3 commits
  7. 09 Apr, 2013 1 commit
  8. 07 Apr, 2013 1 commit
  9. 08 Jan, 2013 1 commit
  10. 30 Nov, 2012 1 commit
  11. 27 Nov, 2012 2 commits
  12. 27 Sep, 2012 1 commit
  13. 09 Sep, 2012 1 commit
  14. 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
  15. 27 Aug, 2012 1 commit
  16. 11 Jul, 2012 1 commit
  17. 22 Jun, 2012 1 commit
  18. 11 Jun, 2012 1 commit
  19. 07 Jun, 2012 1 commit
  20. 17 May, 2012 2 commits
  21. 15 May, 2012 1 commit
    • really reset walker with git_revwalk_reset · 0b86fdf9
      From the description  of git_revwalk_reset in revwalk.h the function should
      clear all pushed and hidden commits, and leave the walker in a blank state (just like at creation).
      Apparently everything gets reseted appart of pushed commits (walk->one and walk->twos)
      
      This fix should reset the walker properly.
      Nico von Geyso committed
  22. 03 May, 2012 1 commit
  23. 26 Apr, 2012 1 commit
  24. 25 Apr, 2012 4 commits
  25. 23 Apr, 2012 1 commit
  26. 17 Apr, 2012 2 commits
    • Fix warnings on 64-bit windows builds · 44ef8b1b
      This fixes all the warnings on win64 except those in deps, which
      come from the regex code.
      Russell Belfer committed
    • Add git_reference_lookup_oid and lookup_resolved · f201d613
      Adds a new public reference function `git_reference_lookup_oid`
      that directly resolved a reference name to an OID without returning
      the intermediate `git_reference` object (hence, no free needed).
      
      Internally, this adds a `git_reference_lookup_resolved` function
      that combines looking up and resolving a reference.  This allows
      us to be more efficient with memory reallocation.
      
      The existing `git_reference_lookup` and `git_reference_resolve`
      are reimplmented on top of the new utility and a few places in the
      code are changed to use one of the two new functions.
      Russell Belfer committed
  27. 12 Apr, 2012 5 commits