KEMBAR78
Comparing fba9654364...fe0ac2fb7f · git/git · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fba9654364
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fe0ac2fb7f
Choose a head ref
  • 7 commits
  • 11 files changed
  • 2 contributors

Commits on Aug 16, 2018

  1. Add delta-islands.{c,h}

    Hosting providers that allow users to "fork" existing
    repos want those forks to share as much disk space as
    possible.
    
    Alternates are an existing solution to keep all the
    objects from all the forks into a unique central repo,
    but this can have some drawbacks. Especially when
    packing the central repo, deltas will be created
    between objects from different forks.
    
    This can make cloning or fetching a fork much slower
    and much more CPU intensive as Git might have to
    compute new deltas for many objects to avoid sending
    objects from a different fork.
    
    Because the inefficiency primarily arises when an
    object is deltified against another object that does
    not exist in the same fork, we partition objects into
    sets that appear in the same fork, and define
    "delta islands". When finding delta base, we do not
    allow an object outside the same island to be
    considered as its base.
    
    So "delta islands" is a way to store objects from
    different forks in the same repo and packfile without
    having deltas between objects from different forks.
    
    This patch implements the delta islands mechanism in
    "delta-islands.{c,h}", but does not yet make use of it.
    
    A few new fields are added in 'struct object_entry'
    in "pack-objects.h" though.
    
    The documentation will follow in a patch that actually
    uses delta islands in "builtin/pack-objects.c".
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff authored and gitster committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    c8d521f View commit details
    Browse the repository at this point in the history
  2. pack-objects: refactor code into compute_layer_order()

    In a following commit, as we will use delta islands, we will
    have to compute the write order for different layers, not just
    for one.
    
    Let's prepare for that by refactoring the code that will be
    used to compute the write order for a given layer into a new
    compute_layer_order() function.
    
    This will make it easier to see and understand what the
    following changes are doing.
    
    Helped-by: Duy Nguyen <pclouds@gmail.com>
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    chriscool authored and gitster committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    f64ba53 View commit details
    Browse the repository at this point in the history
  3. pack-objects: add delta-islands support

    Implement support for delta islands in git pack-objects
    and document how delta islands work in
    "Documentation/git-pack-objects.txt" and Documentation/config.txt.
    
    This allows users to setup delta islands in their config and
    get the benefit of less disk usage while cloning and fetching
    is still quite fast and not much more CPU intensive.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff authored and gitster committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    28b8a73 View commit details
    Browse the repository at this point in the history
  4. repack: add delta-islands support

    Implement simple support for --delta-islands option and
    repack.useDeltaIslands config variable in git repack.
    
    This allows users to setup delta islands in their config and
    get the benefit of less disk usage while cloning and fetching
    is still quite fast and not much more CPU intensive.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff authored and gitster committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    16d75fa View commit details
    Browse the repository at this point in the history
  5. t5320: tests for delta islands

    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff authored and gitster committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    9eb0986 View commit details
    Browse the repository at this point in the history
  6. pack-objects: move tree_depth into 'struct packing_data'

    This reduces the size of 'struct object_entry' and therefore
    makes packing objects more efficient.
    
    This also renames cmp_tree_depth() into tree_depth_compare(),
    as it is more modern to have the name of the compare functions
    end with "compare".
    
    Helped-by: Jeff King <peff@peff.net>
    Helped-by: Duy Nguyen <pclouds@gmail.com>
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    chriscool authored and gitster committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    108f530 View commit details
    Browse the repository at this point in the history
  7. pack-objects: move 'layer' into 'struct packing_data'

    This reduces the size of 'struct object_entry' from 88 bytes
    to 80 and therefore makes packing objects more efficient.
    
    For example on a Linux repo with 12M objects,
    `git pack-objects --all` needs extra 96MB memory even if the
    layer feature is not used.
    
    Helped-by: Jeff King <peff@peff.net>
    Helped-by: Duy Nguyen <pclouds@gmail.com>
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    chriscool authored and gitster committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    fe0ac2f View commit details
    Browse the repository at this point in the history
Loading