1. 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
  2. 30 Nov, 2012 1 commit
  3. 27 Nov, 2012 1 commit
  4. 14 Sep, 2012 1 commit
  5. 24 Jul, 2012 1 commit
  6. 03 Jul, 2012 1 commit
  7. 13 Apr, 2012 1 commit
  8. 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
  9. 13 Feb, 2012 1 commit
  10. 14 Oct, 2011 1 commit
    • *: correct and codify various file permissions · 01ad7b3a
      The following files now have 0444 permissions:
      
      - loose objects
      - pack indexes
      - pack files
      - packs downloaded by fetch
      - packs downloaded by the HTTP transport
      
      And the following files now have 0666 permissions:
      
      - config files
      - repository indexes
      - reflogs
      - refs
      
      This brings libgit2 more in line with Git.
      
      Note that git_filebuf_commit() and git_filebuf_commit_at() have both
      gained a new mode parameter.
      
      The latter change fixes an important issue where filebufs created with
      GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3)
      usage). Now we chmod() the file before renaming it into place.
      
      Tests have been added to confirm that new commit, tag, and tree
      objects are created with the right permissions. I don't have access to
      Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
      Brodie Rao committed
  11. 19 Sep, 2011 1 commit
    • Tabify everything · 87d9869f
      There were quite a few places were spaces were being used instead of
      tabs. Try to catch them all. This should hopefully not break anything.
      Except for `git blame`. Oh well.
      Vicent Marti committed
  12. 18 Sep, 2011 1 commit
    • Cleanup legal data · bb742ede
      1. The license header is technically not valid if it doesn't have a
      copyright signature.
      
      2. The COPYING file has been updated with the different licenses used in
      the project.
      
      3. The full GPLv2 header in each file annoys me.
      Vicent Marti committed
  13. 18 Aug, 2011 1 commit
    • Implement cooperative caching · c1af5a39
      When indexing a file with ref deltas, a temporary cache for the
      offsets has to be built, as we don't have an index file yet. If the
      user takes the responsiblity for filling the cache, the packing code
      will look there first when it finds a ref delta.
      
      Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
      Carlos Martín Nieto committed
  14. 02 Aug, 2011 4 commits