1. 03 Oct, 2018 2 commits
    • smart_pkt: reorder and rename parameters of `git_pkt_parse_line` · 0b3dfbf4
      The parameters of the `git_pkt_parse_line` function are quite confusing.
      First, there is no real indicator what the `out` parameter is actually
      all about, and it's not really clear what the `bufflen` parameter refers
      to. Reorder and rename the parameters to make this more obvious.
      Patrick Steinhardt committed
    • smart_pkt: explicitly avoid integer overflows when parsing packets · 40fd84cc
      When parsing data, progress or error packets, we need to copy the
      contents of the rest of the current packet line into the flex-array of
      the parsed packet. To keep track of this array's length, we then assign
      the remaining length of the packet line to the structure. We do have a
      mismatch of types here, as the structure's `len` field is a signed
      integer, while the length that we are assigning has type `size_t`.
      
      On nearly all platforms, this shouldn't pose any problems at all. The
      line length can at most be 16^4, as the line's length is being encoded
      by exactly four hex digits. But on a platforms with 16 bit integers,
      this assignment could cause an overflow. While such platforms will
      probably only exist in the embedded ecosystem, we still want to avoid
      this potential overflow. Thus, we now simply change the structure's
      `len` member to be of type `size_t` to avoid any integer promotion.
      Patrick Steinhardt committed
  2. 15 Jul, 2018 1 commit
  3. 26 Jun, 2018 1 commit
  4. 11 Apr, 2018 2 commits
  5. 01 Feb, 2018 1 commit
  6. 03 Jul, 2017 1 commit
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
  7. 10 Feb, 2017 1 commit
  8. 19 Apr, 2016 1 commit
  9. 25 Sep, 2015 1 commit
  10. 08 Sep, 2015 1 commit
  11. 13 May, 2015 1 commit
    • 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
  12. 16 Sep, 2014 1 commit
  13. 14 Aug, 2014 1 commit
    • Custom transport: minor cleanups · c180c065
       * Move the transport registration mechanisms into a new header under
         'sys/' because this is advanced stuff.
       * Remove the 'priority' argument from the registration as it adds
         unnecessary complexity.  (Since transports cannot decline to operate,
         only the highest priority transport is ever executed.)  Users who
         require per-priority transports can implement that in their custom
         transport themselves.
       * Simplify registration further by taking a scheme (eg "http") instead
         of a prefix (eg "http://").
      Edward Thomson committed
  14. 21 May, 2014 1 commit
    • smart: store reported symrefs · 8156835d
      The protocol has a capability which allows the server to tell us which
      refs are symrefs, so we can e.g. know which is the default branch.
      
      This capability is different from the ones we already support, as it's
      not setting a flag to true, but requires us to store a list of
      refspec-formatted mappings.
      
      This commit does not yet expose the information in the reference
      listing.
      Carlos Martín Nieto committed
  15. 21 Apr, 2014 1 commit
  16. 11 Nov, 2013 2 commits
  17. 30 Oct, 2013 1 commit
    • protocol: basic support for multi_ack_detailed · 2f8c481c
      This tells the server that we speak it, but we don't make use of its
      extra information to determine if there's a better place to stop
      negotiating.
      
      In a somewhat-related change, reorder the capabilities so we ask for
      them in the same order as git does.
      
      Also take this opportunity to factor out a fairly-indented portion of
      the negotiation logic.
      Carlos Martín Nieto committed
  18. 04 Oct, 2013 1 commit
  19. 02 Oct, 2013 1 commit
    • Support cancellation in push operation · 5b188225
      This commit adds cancellation for the push operation. This work consists of:
      
      1) Support cancellation during push operation
          - During object counting phase
          - During network transfer phase
              - Propagate GIT_EUSER error code out to caller
      2) Improve cancellation support during fetch
          - Handle cancellation request during network transfer phase
          - Clear error string when cancelled during indexing
      3) Fix error handling in git_smart__download_pack
      
      Cancellation during push is still only handled in the pack building and
      network transfer stages of push (and not during packbuilding).
      Jameson Miller committed
  20. 12 Mar, 2013 1 commit
  21. 08 Jan, 2013 1 commit
  22. 10 Dec, 2012 1 commit
  23. 28 Nov, 2012 1 commit
  24. 27 Nov, 2012 1 commit
  25. 06 Nov, 2012 1 commit
  26. 01 Nov, 2012 1 commit