1. 15 Sep, 2012 1 commit
  2. 14 Sep, 2012 10 commits
  3. 13 Sep, 2012 1 commit
  4. 14 Sep, 2012 2 commits
  5. 13 Sep, 2012 10 commits
  6. 12 Sep, 2012 2 commits
    • odb_pack: try lookup before refreshing packs · ab8a0402
      This reduces the rate of syscalls for the common case of sequences of
      object reads from the same pack.
      
      Best of 5 timings for libgit2_clar before this patch:
      real    0m5.375s
      user    0m0.392s
      sys     0m3.564s
      
      After applying this patch:
      real    0m5.285s
      user    0m0.356s
      sys     0m3.544s
      
      0.6% improvement in system time.
      9.2% improvement in user time.
      1.7% improvement in elapsed time.
      
      Confirmed a 0.6% reduction in number of system calls with strace.
      
      Expect greater improvement for graph-traversal with large packs.
      David Michael Barr committed
    • Add tests and improve param checks · a13fb55a
      Fixed some minor `git_repository_hashfile` issues:
      
      - Fixed incorrect doc (saying that repo could be NULL)
      - Added checking of object type value to acceptable ones
      - Added more tests for various parameter permutations
      Russell Belfer committed
  7. 11 Sep, 2012 9 commits
  8. 10 Sep, 2012 3 commits
    • 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
    • Move diff max_size to public API · e597b189
      This commit adds a max_size value in the public `git_diff_options`
      structure so that the user can automatically flag blobs over a
      certain size as binary regardless of other properties.
      
      Also, and perhaps more importantly, this moves binary detection
      to be as early as possible in the diff traversal inner loop and
      makes sure that we stop loading objects as soon as we decide that
      they are binary.
      Russell Belfer committed
    • Replace git_diff_iterator_num_files with progress · b36effa2
      The `git_diff_iterator_num_files` API was problematic, since we
      don't actually know the exact number of files to be iterated over
      until we load those files into memory.  This replaces it with a
      new `git_diff_iterator_progress` API that goes from 0 to 1, and
      moves and renamed the old API for the internal places that can
      tolerate a max value instead of an exact value.
      Russell Belfer committed
  9. 09 Sep, 2012 1 commit
  10. 07 Sep, 2012 1 commit