1. 14 Aug, 2013 1 commit
  2. 25 Jul, 2013 1 commit
  3. 15 Jul, 2013 1 commit
  4. 31 May, 2013 2 commits
    • Mutex init can fail · 1a42dd17
      It is obviously quite a serious problem if this happens, but mutex
      initialization can fail and we should detect it.  It's a bit like
      a memory allocation failure, in that you're probably pretty screwed
      if this occurs, but at least we'll catch it.
      Russell Belfer committed
    • Zero memory for major objects before freeing · f658dc43
      By zeroing out the memory when we free larger objects (i.e. those
      that serve as collections of other data, such as repos, odb, refdb),
      I'm hoping that it will be easier for libgit2 bindings to find
      errors in their object management code.
      Russell Belfer committed
  5. 02 May, 2013 4 commits
  6. 29 Apr, 2013 1 commit
  7. 22 Apr, 2013 4 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
    • Further threading fixes · 53607868
      This builds on the earlier thread safety work to make it so that
      setting the odb, index, refdb, or config for a repository is done
      in a threadsafe manner with minimized locking time.  This is done
      by adding a lock to the repository object and using it to guard
      the assignment of the above listed pointers.  The lock is only
      held to assign the pointer value.
      
      This also contains some minor fixes to the other work with pack
      files to reduce the time that locks are being held to and fix an
      apparently memory leak.
      Russell Belfer committed
    • Add mutex around mapping and unmapping pack files · 24c70804
      When I was writing threading tests for the new cache, the main
      error I kept running into was a pack file having it's content
      unmapped underneath the running thread.  This adds a lock around
      the routines that map and unmap the pack data so that threads can
      effectively reload the data when they need it.
      
      This also required reworking the error handling paths in a couple
      places in the code which I tried to make consistent.
      Russell Belfer committed
  8. 03 Mar, 2013 1 commit
    • indexer: use a hashtable for keeping track of offsets · 0e040c03
      These offsets are needed for REF_DELTA objects, which encode which
      object they use as a base, but not where it lies in the packfile, so
      we need a list.
      
      These objects are mostly from older packfiles, before OFS_DELTA was
      widely spread. The time spent in indexing these packfiles is greatly
      reduced, though remains above what git is able to do.
      Carlos Martín Nieto committed
  9. 27 Jan, 2013 1 commit
  10. 26 Jan, 2013 1 commit
  11. 14 Jan, 2013 2 commits
  12. 12 Jan, 2013 2 commits
  13. 11 Jan, 2013 7 commits
  14. 08 Jan, 2013 1 commit
  15. 02 Dec, 2012 1 commit
    • pack: add git_packfile_resolve_header · 44f9f547
      To paraphrase @peff:
      
      You can get both size and type from a packed object reasonably cheaply.
      If you have:
      
      * An object that is not a delta; both type and size are available in the
        packfile header.
      * An object that is a delta. The packfile type will be OBJ_*_DELTA, and
        you have to resolve back to the base to find the real type. That means
        potentially a lot of packfile index lookups, but each one is
        relatively cheap. For the size, you inflate the first few bytes of the
        delta, whose header will tell you the resulting size of applying the
        delta to the base.
      
      For simplicity, we just decompress the whole delta for now.
      David Michael Barr committed
  16. 30 Nov, 2012 1 commit
  17. 27 Nov, 2012 1 commit
  18. 24 Nov, 2012 1 commit
  19. 23 Nov, 2012 1 commit
  20. 14 Sep, 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. 28 Jun, 2012 1 commit
  25. 12 Jun, 2012 1 commit