1. 18 May, 2014 1 commit
  2. 16 May, 2014 2 commits
    • indexer: mmap fixes for Windows · 0731a5b4
      Windows has its own ftruncate() called _chsize_s().
      
      p_mkstemp() is changed to use p_open() so we can make sure we open for
      writing; the addition of exclusive create is a good thing to do
      regardless, as we want a temporary path for ourselves.
      
      Lastly, MSVC doesn't quite know how to add two numbers if one of them is a
      void pointer, so let's alias it to unsigned char.C
      Carlos Martín Nieto committed
    • indexer: use mmap for writing · f7310540
      Some OSs cannot keep their ideas about file content straight when mixing
      standard IO with file mapping. As we use mmap for reading from the
      packfile, let's make writing to the pack file use mmap.
      Carlos Martín Nieto committed
  3. 13 May, 2014 1 commit
  4. 08 May, 2014 1 commit
    • indexer: avoid memory moves · 2dde1e0c
      Our vector does a move of the rest of the array when we remove an
      item. Doing this repeatedly can be expensive, and we do this a lot in
      the indexer. Instead, set the value to NULL and skip those entries.
      
      perf reported around 30% of `index-pack` time was going into
      memmove. With this change, that goes away and we spent most of the time
      hashing and inflating data.
      Carlos Martín Nieto committed
  5. 21 Apr, 2014 1 commit
  6. 30 Jan, 2014 1 commit
  7. 14 Jan, 2014 2 commits
  8. 13 Jan, 2014 2 commits
  9. 12 Dec, 2013 1 commit
    • Cleanups, renames, and leak fixes · 9cfce273
      This renames git_vector_free_all to the better git_vector_free_deep
      and also contains a couple of memory leak fixes based on valgrind
      checks.  The fixes are specifically: failure to free global dir
      path variables when not compiled with threading on and failure to
      free filters from the filter registry that had not be initialized
      fully.
      Russell Belfer committed
  10. 11 Dec, 2013 5 commits
    • Test cancel from indexer progress callback · 7697e541
      This adds tests that try canceling an indexer operation from
      within the progress callback.
      
      After writing the tests, I wanted to run this under valgrind and
      had a number of errors in that situation because mmap wasn't
      working.  I added a CMake option to force emulation of mmap and
      consolidated the Amiga-specific code into that new place (so we
      don't actually need separate Amiga code now, just have to turn on
      -DNO_MMAP).
      
      Additionally, I made the indexer code propagate error codes more
      reliably than it used to.
      Russell Belfer committed
    • 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
    • Add git_vector_free_all · fcd324c6
      There are a lot of places that we call git__free on each item in
      a vector and then call git_vector_free on the vector itself.  This
      just wraps that up into one convenient helper function.
      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. 03 Dec, 2013 1 commit
  12. 07 Nov, 2013 1 commit
  13. 05 Nov, 2013 1 commit
  14. 01 Nov, 2013 2 commits
  15. 30 Oct, 2013 1 commit
    • indexer: remove the stream infix · a6154f21
      It was there to keep it apart from the one which read in from a file on
      disk. This other indexer does not exist anymore, so there is no need for
      anything other than git_indexer to refer to it.
      
      While here, rename _add() function to _append() and _finalize() to
      _commit(). The former change is cosmetic, while the latter avoids
      talking about "finalizing", which OO languages use to mean something
      completely different.
      Carlos Martín Nieto committed
  16. 23 Oct, 2013 1 commit
    • indexer: include the delta stats · ab46b1d8
      The user is unable to derive the number of deltas in the pack, as that
      would require them to capture the stats exactly in the moment between
      download and final processing, which is abstracted away in the fetch.
      
      Capture these numbers for the user and expose them in the progress
      struct. The clone and fetch examples now also present this information
      to the user.
      Carlos Martín Nieto committed
  17. 11 Oct, 2013 1 commit
  18. 08 Oct, 2013 1 commit
  19. 04 Oct, 2013 2 commits
  20. 03 Oct, 2013 1 commit
  21. 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
  22. 26 Sep, 2013 1 commit
  23. 18 Sep, 2013 3 commits
  24. 15 Jul, 2013 1 commit
  25. 01 Jul, 2013 1 commit
  26. 16 May, 2013 1 commit
  27. 29 Apr, 2013 1 commit
  28. 22 Apr, 2013 2 commits
    • Consolidate packfile allocation further · 5d2d21e5
      Rename git_packfile_check to git_packfile_alloc since it is now
      being used more in that capacity.  Fix the various places that use
      it.  Consolidate some repeated code in odb_pack.c related to the
      allocation of a new pack_backend.
      Russell Belfer committed
    • Make indexer use shared packfile open code · 38eef611
      The indexer was creating a packfile object separately from the
      code in pack.c which was a problem since I put a call to
      git_mutex_init into just pack.c.  This commit updates the pack
      function for creating a new pack object (i.e. git_packfile_check())
      so that it can be used in both places and then makes indexer.c
      use the shared initialization routine.
      
      There are also a few minor formatting and warning message fixes.
      Russell Belfer committed