1. 10 Jan, 2013 3 commits
  2. 08 Jan, 2013 1 commit
  3. 21 Dec, 2012 1 commit
  4. 01 Dec, 2012 1 commit
  5. 30 Nov, 2012 2 commits
    • indexer: use the packfile streaming API · f56f8585
      The new API allows us to read the object bit by bit from the packfile,
      instead of needing it all at once in the packfile. This also allows us
      to hash the object as it comes in from the network instead of having
      to try to read it all and failing repeatedly for larger objects.
      
      This is only the first step, but it already shows huge improvements
      when dealing with objects over a few megabytes in size. It reduces the
      memory needs in some cases, but delta objects still need to be
      completely in memory and the old inefficent method is still used for
      that.
      Carlos Martín Nieto committed
  6. 28 Nov, 2012 1 commit
  7. 27 Nov, 2012 1 commit
  8. 16 Nov, 2012 1 commit
  9. 13 Nov, 2012 2 commits
  10. 05 Nov, 2012 1 commit
  11. 09 Oct, 2012 1 commit
  12. 27 Sep, 2012 1 commit
  13. 15 Sep, 2012 1 commit
  14. 13 Sep, 2012 1 commit
  15. 12 Sep, 2012 1 commit
  16. 11 Sep, 2012 1 commit
  17. 10 Sep, 2012 1 commit
    • Reorg internal odb read header and object lookup · c6ac28fd
      Often `git_odb_read_header` will "fail" and have to read the
      entire object into memory instead of just the header.  When this
      happens, the object is loaded and then disposed of immediately,
      which makes it difficult to efficiently use the header information
      to decide if the object should be loaded (since attempting to do
      so will often result in loading the object twice).
      
      This commit takes the existing code and reorganizes it to have
      two new functions:
      
      - `git_odb__read_header_or_object` which acts just like the old
        read header function except that it returns the object, too, if
        it was forced to load the whole thing.  It then becomes the
        callers responsibility to free the `git_odb_object`.
      - `git_object__from_odb_object` which was extracted from the old
        `git_object_lookup` and creates a subclass of `git_object` from
        an existing `git_odb_object` (separating the ODB lookup from the
        `git_object` creation).  This allows you to use the first header
        reading function efficiently without instantiating the
        `git_odb_object` twice.
      
      There is no net change to the behavior of any of the existing
      functions, but this allows internal code to tap into the ODB
      lookup and object creation to be more efficient.
      Russell Belfer committed
  18. 06 Sep, 2012 2 commits
    • Implement filters for status/diff blobs · 60b9d3fc
      This adds support to diff and status for running filters (a la crlf)
      on blobs in the workdir before computing SHAs and before generating
      text diffs.  This ended up being a bit more code change than I had
      thought since I had to reorganize some of the diff logic to minimize
      peak memory use when filtering blobs in a diff.
      
      This also adds a cap on the maximum size of data that will be loaded
      to diff.  I set it at 512Mb which should match core git.  Right now
      it is a #define in src/diff.h but it could be moved into the public
      API if desired.
      Russell Belfer committed
    • odb: mark unused variable · 0e9f2fce
      Michael Schubert committed
  19. 27 Aug, 2012 1 commit
  20. 09 Aug, 2012 1 commit
  21. 04 Aug, 2012 1 commit
    • Update iterators for consistency across library · 5dca2010
      This updates all the `foreach()` type functions across the library
      that take callbacks from the user to have a consistent behavior.
      The rules are:
      
      * A callback terminates the loop by returning any non-zero value
      * Once the callback returns non-zero, it will not be called again
        (i.e. the loop stops all iteration regardless of state)
      * If the callback returns non-zero, the parent fn returns GIT_EUSER
      * Although the parent returns GIT_EUSER, no error will be set in
        the library and `giterr_last()` will return NULL if called.
      
      This commit makes those changes across the library and adds tests
      for most of the iteration APIs to make sure that they follow the
      above rules.
      Russell Belfer committed
  22. 24 Jul, 2012 1 commit
  23. 03 Jul, 2012 1 commit
  24. 19 Jun, 2012 1 commit
  25. 17 May, 2012 2 commits
  26. 12 May, 2012 1 commit
  27. 04 May, 2012 1 commit
    • Fix valgrind issues · 282283ac
      There are three changes here:
      - correctly propogate error code from failed object lookups
      - make zlib inflate use our allocators
      - add OID to notfound error in ODB lookups
      Russell Belfer committed
  28. 25 Apr, 2012 1 commit
    • Implement git_pool paged memory allocator · 2bc8fa02
      This adds a `git_pool` object that can do simple paged memory
      allocation with free for the entire pool at once.  Using this,
      you can replace many small allocations with large blocks that
      can then cheaply be doled out in small pieces.  This is best
      used when you plan to free the small blocks all at once - for
      example, if they represent the parsed state from a file or data
      stream that are either all kept or all discarded.
      
      There are two real patterns of usage for `git_pools`: either
      for "string" allocation, where the item size is a single byte
      and you end up just packing the allocations in together, or for
      "fixed size" allocation where you are allocating a large object
      (e.g. a `git_oid`) and you generally just allocation single
      objects that can be tightly packed.  Of course, you can use it
      for other things, but those two cases are the easiest.
      Russell Belfer committed
  29. 20 Mar, 2012 1 commit
  30. 15 Mar, 2012 1 commit
    • Continue error conversion · deafee7b
      This converts blob.c, fileops.c, and all of the win32 files.
      Also, various minor cleanups throughout the code.  Plus, in
      testing the win32 build, I cleaned up a bunch (although not
      all) of the warnings with the 64-bit build.
      Russell Belfer committed
  31. 13 Mar, 2012 1 commit
    • Migrate ODB files to new error handling · e1de726c
      This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to
      the new style of error handling.  Also got the unix and win32
      versions of map.c.  There are some minor changes to other
      files but no others were completely converted.
      
      This also contains an update to filebuf so that a zeroed out
      filebuf will not think that the fd (== 0) is actually open
      (and inadvertently call close() on fd 0 if cleaned up).
      
      Lastly, this was built and tested on win32 and contains a
      bunch of fixes for the win32 build which was pretty broken.
      Russell Belfer committed
  32. 07 Mar, 2012 2 commits
  33. 05 Mar, 2012 1 commit