1. 13 May, 2015 3 commits
    • remote: remove live changing of refspecs · 77254990
      The base refspecs changing can be a cause of confusion as to what is the
      current base refspec set and complicate saving the remote's
      configuration.
      
      Change `git_remote_add_{fetch,push}()` to update the configuration
      instead of an instance.
      
      This finally makes `git_remote_save()` a no-op, it will be removed in a
      later commit.
      Carlos Martín Nieto committed
    • remote: move the transport ctor to the callbacks · 058b753c
      Instead of having it set in a different place from every other callback,
      put it the main structure. This removes some state from the remote and
      makes it behave more like clone, where the constructors are passed via
      the options.
      Carlos Martín Nieto committed
    • Remove the callbacks struct from the remote · 8f0104ec
      Having the setting be different from calling its actions was not a great
      idea and made for the sake of the wrong convenience.
      
      Instead of that, accept either fetch options, push options or the
      callbacks when dealing with the remote. The fetch options are currently
      only the callbacks, but more options will be moved from setters and
      getters on the remote to the options.
      
      This does mean passing the same struct along the different functions but
      the typical use-case will only call git_remote_fetch() or
      git_remote_push() and so won't notice much difference.
      Carlos Martín Nieto committed
  2. 16 Mar, 2015 1 commit
  3. 27 Feb, 2015 1 commit
  4. 08 Nov, 2014 1 commit
  5. 09 Oct, 2014 1 commit
  6. 22 Sep, 2014 1 commit
  7. 16 Sep, 2014 10 commits
  8. 01 Sep, 2014 1 commit
  9. 27 Aug, 2014 2 commits
  10. 15 Aug, 2014 1 commit
  11. 14 Aug, 2014 1 commit
  12. 07 Jul, 2014 1 commit
  13. 02 Jul, 2014 1 commit
  14. 26 Jun, 2014 3 commits
  15. 17 Jun, 2014 2 commits
  16. 13 Jun, 2014 2 commits
  17. 07 Jun, 2014 1 commit
  18. 19 May, 2014 1 commit
  19. 02 Apr, 2014 1 commit
  20. 06 Mar, 2014 1 commit
  21. 06 Feb, 2014 1 commit
  22. 05 Feb, 2014 1 commit
  23. 30 Jan, 2014 1 commit
  24. 11 Dec, 2013 1 commit
    • 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