Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Feb 27, 2014
  1. @gitster

    Merge branch 'jk/pack-bitmap'

    gitster authored
    Borrow the bitmap index into packfiles from JGit to speed up
    enumeration of objects involved in a commit range without having to
    fully traverse the history.
    * jk/pack-bitmap: (26 commits)
      ewah: unconditionally ntohll ewah data
      ewah: support platforms that require aligned reads
      read-cache: use get_be32 instead of hand-rolled ntoh_l
      block-sha1: factor out get_be and put_be wrappers
      do not discard revindex when re-preparing packfiles
      pack-bitmap: implement optional name_hash cache
      t/perf: add tests for pack bitmaps
      t: add basic bitmap functionality tests
      count-objects: recognize .bitmap in garbage-checking
      repack: consider bitmaps when performing repacks
      repack: handle optional files created by pack-objects
      repack: turn exts array into array-of-struct
      repack: stop using magic number for ARRAY_SIZE(exts)
      pack-objects: implement bitmap writing
      rev-list: add bitmap mode to speed up object lists
      pack-objects: use bitmaps when packing objects
      pack-objects: split add_object_entry
      pack-bitmap: add support for bitmap indexes
      documentation: add documentation for the bitmap format
      ewah: compressed bitmap implementation
Commits on Jan 10, 2014
  1. @gitster

    Merge branch 'jk/sha1write-void'

    gitster authored
    Code clean-up.
    * jk/sha1write-void:
      do not pretend sha1write returns errors
Commits on Dec 17, 2011
  1. @gitster

    Merge branch 'jc/stream-to-pack'

    gitster authored
    * jc/stream-to-pack:
      bulk-checkin: replace fast-import based implementation
      csum-file: introduce sha1file_checkpoint
      finish_tmp_packfile(): a helper function
      create_tmp_packfile(): a helper function
      write_pack_header(): a helper function
Commits on Nov 17, 2011
  1. @gitster

    receive-pack, fetch-pack: reject bogus pack that records objects twice

    gitster authored
    When receive-pack & fetch-pack are run and store the pack obtained over
    the wire to a local repository, they internally run the index-pack command
    with the --strict option. Make sure that we reject incoming packfile that
    records objects twice to avoid spreading such a damage.
    Signed-off-by: Junio C Hamano <>
Commits on Oct 28, 2011
  1. @gitster

    finish_tmp_packfile(): a helper function

    gitster authored
    Factor out a small logic out of the private write_pack_file() function
    in builtin/pack-objects.c.
    This changes the order of finishing multi-pack generation slightly. The
    code used to
     - adjust shared perm of temporary packfile
     - rename temporary packfile to the final name
     - update mtime of the packfile under the final name
     - adjust shared perm of temporary idxfile
     - rename temporary idxfile to the final name
    but because the helper does not want to do the mtime thing, the updated
    code does that step first and then all the rest.
    Signed-off-by: Junio C Hamano <>
  2. @gitster

    create_tmp_packfile(): a helper function

    gitster authored
    Factor out a small logic out of the private write_pack_file() function
    in builtin/pack-objects.c
    Signed-off-by: Junio C Hamano <>
  3. @gitster

    write_pack_header(): a helper function

    gitster authored
    Factor out a small logic out of the private write_pack_file() function
    in builtin/pack-objects.c
    Signed-off-by: Junio C Hamano <>
Commits on Feb 28, 2011
  1. @gitster

    index-pack --verify: read anomalous offsets from v2 idx file

    gitster authored
    A pack v2 .idx file usually records offset using 64-bit representation
    only when the offset does not fit within 31-bit, but you can handcraft
    your .idx file to record smaller offset using 64-bit, storing all zero
    in the upper 4-byte.  By inspecting the original idx file when running
    index-pack --verify, encode such low offsets that do not need to be in
    64-bit but are encoded using 64-bit just like the original idx file so
    that we can still validate the pack/idx pair by comparing the idx file
    recomputed with the original.
    Signed-off-by: Junio C Hamano <>
  2. @gitster

    write_idx_file: need_large_offset() helper function

    gitster authored
    Signed-off-by: Junio C Hamano <>
  3. @gitster

    index-pack: --verify

    gitster authored
    Given an existing .pack file and the .idx file that describes it,
    this new mode of operation reads and re-index the packfile and makes
    sure the existing .idx file matches the result byte-for-byte.
    All the objects in the .pack file are validated during this operation as
    well.  Unlike verify-pack, which visits each object described in the .idx
    file in the SHA-1 order, index-pack efficiently exploits the delta-chain
    to avoid rebuilding the objects that are used as the base of deltified
    objects over and over again while validating the objects, resulting in
    much quicker verification of the .pack file and its .idx file.
    This version however cannot verify a .pack/.idx pair with a handcrafted v2
    index that uses 64-bit offset representation for offsets that would fit
    within 31-bit. You can create such an .idx file by giving a custom offset
    to --index-version option to the command.
    Signed-off-by: Junio C Hamano <>
  4. @gitster

    write_idx_file: introduce a struct to hold idx customization options

    gitster authored
    Remove two globals, pack_idx_default version and pack_idx_off32_limit,
    and place them in a pack_idx_option structure.  Allow callers to pass
    it to write_idx_file() as a parameter.
    Adjust all callers to the API change.
    Signed-off-by: Junio C Hamano <>
Commits on Feb 25, 2009
  1. @gitster

    Merge branch 'jc/maint-1.6.0-pack-directory'

    gitster authored
    * jc/maint-1.6.0-pack-directory:
      Make sure objects/pack exists before creating a new pack
  2. @gitster

    Make sure objects/pack exists before creating a new pack

    gitster authored
    In a repository created with git older than f49fb35 (git-init-db: create
    "pack" subdirectory under objects, 2005-06-27), objects/pack/ directory is
    not created upon initialization.  It was Ok because subdirectories are
    created as needed inside directories init-db creates, and back then,
    packfiles were recent invention.
    After the said commit, new codepaths started relying on the presense of
    objects/pack/ directory in the repository.  This was exacerbated with
    8b4eb6b (Do not perform cross-directory renames when creating packs,
    2008-09-22) that moved the location temporary pack files are created from
    objects/ directory to objects/pack/ directory, because moving temporary to
    the final location was done carefully with lazy leading directory creation.
    Many packfile related operations in such an old repository can fail
    mysteriously because of this.
    This commit introduces two helper functions to make things work better.
     - odb_mkstemp() is a specialized version of mkstemp() to refactor the
       code and teach it to create leading directories as needed;
     - odb_pack_keep() refactors the code to create a ".keep" file while
       create leading directories as needed.
    Signed-off-by: Junio C Hamano <>
Commits on Nov 2, 2007
  1. @gitster

    Merge branch 'np/progress'

    gitster authored
    * np/progress:
      Show total transferred as part of throughput progress
      make sure throughput display gets updated even if progress doesn't move
      return the prune-packed progress display to the inner loop
      add throughput display to git-push
      add some copyright notice to the progress display code
      add throughput display to index-pack
      add throughput to progress display
      relax usage of the progress API
      make struct progress an opaque type
      prune-packed: don't call display_progress() for every file
      Stop displaying "Pack pack-$ID created." during git-gc
      Teach prune-packed to use the standard progress meter
      Change 'Deltifying objects' to 'Compressing objects'
      fix for more minor memory leaks
      fix const issues with some functions
      pack-objects.c: fix some global variable abuse and memory leaks
      pack-objects: no delta possible with only one object in the list
      cope with multiple line breaks within sideband progress messages
      more compact progress display
Something went wrong with that request. Please try again.