1. 13 May, 2014 1 commit
  2. 15 Jan, 2014 1 commit
  3. 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
  4. 15 Aug, 2013 1 commit
  5. 29 May, 2013 1 commit
  6. 21 May, 2013 1 commit
  7. 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
  8. 30 Apr, 2013 2 commits
  9. 29 Apr, 2013 1 commit
  10. 22 Apr, 2013 4 commits
  11. 21 Apr, 2013 1 commit
    • Move odb_backend implementors stuff into git2/sys · 83cc70d9
      This moves some of the odb_backend stuff that is related to the
      internals of an odb_backend implementation into include/git2/sys.
      
      Some of the stuff related to streaming I left in include/git2
      because it seemed like it would be reasonably needed by a normal
      user who wanted to stream objects into and out of the ODB.
      
      Also, I added APIs for traversing the list of backends so that
      some of the tests would not need to access ODB internals.
      Russell Belfer committed
  12. 31 Mar, 2013 1 commit
  13. 07 Mar, 2013 1 commit
  14. 08 Jan, 2013 1 commit
  15. 03 Dec, 2012 1 commit
  16. 01 Dec, 2012 2 commits
  17. 30 Nov, 2012 1 commit
  18. 27 Nov, 2012 2 commits
  19. 17 Nov, 2012 1 commit
  20. 02 Nov, 2012 1 commit
    • tags: Fixed the tag parser to correctly treat the message field as optional. · 6bb9fea1
      This fix makes libgit2 capable of parsing annotated tag objects that lack
      the optional message/description field.
      Previously, libgit2 treated this field as mandatory and raised a tag_error on
      such tags. However, the message field is optional.
      
      An example of such a tag is refs/tags/v2.6.16.31-rc1 in Linux:
      
      $ git cat-file tag refs/tags/v2.6.16.31-rc1
      object afaa018cefb6af63befef1df7d8febaae904434f
      type commit
      tag v2.6.16.31-rc1
      tagger Adrian Bunk <bunk@stusta.de> 1162716505 +0100
      $
      Erik van Zijst committed
  21. 09 Oct, 2012 1 commit
  22. 22 Sep, 2012 1 commit
  23. 27 Aug, 2012 1 commit
    • Make git_object_peel a bit smarter · d8057a5b
      This expands the types of peeling that `git_object_peel` knows
      how to do to include TAG -> BLOB peeling, and makes the errors
      slightly more consistent depending on the situation.  It also
      adds a new special behavior where peeling to ANY will peel until
      the object type changes (e.g. chases TAGs to a non-TAG).
      
      Using this expanded peeling, this replaces peeling code that was
      embedded in `git_tag_peel` and `git_reset`.
      Russell Belfer committed
  24. 19 Jun, 2012 1 commit
    • message: Expose git_message_prettify() · 743a4b3b
      git_commit() and git_tag() no longer prettify the
      message by default. This has to be taken care of
      by the caller.
      
      This has the nice side effect of putting the
      caller in position to actually choose to strip
      the comments or not.
      nulltoken committed
  25. 17 May, 2012 2 commits
  26. 07 May, 2012 1 commit
  27. 03 May, 2012 1 commit
  28. 26 Apr, 2012 1 commit
  29. 17 Apr, 2012 1 commit
  30. 10 Apr, 2012 1 commit
  31. 06 Mar, 2012 1 commit
    • error-handling: Repository · cb8a7961
      This also includes droping `git_buf_lasterror` because it makes no sense
      in the new system. Note that in most of the places were it has been
      dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so
      instead it should return a generic `-1` and obviously not throw
      anything.
      Vicent Martí committed