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 Loading
base: d4833b22abc0093153534cfaa93bb90be9a708ca
Choose a base ref
...
head repository: git/git Loading
compare: 23c1e71369f4a5a5e5b176d77cfc9d8edf68ebec
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Feb 5, 2024

  1. t5332-multi-pack-reuse.sh: extract pack-objects helper functions

    Most of the tests in t5332 perform some setup before repeating a common
    refrain that looks like:
    
        : >trace2.txt &&
        GIT_TRACE2_EVENT="$PWD/trace2.txt" \
          git pack-objects --stdout --revs --all >/dev/null &&
    
        test_pack_reused $objects_nr <trace2.txt &&
        test_packs_reused $packs_nr <trace2.txt
    
    The next commit will add more tests which repeat the above refrain.
    Avoid duplicating this invocation even further and prepare for the
    following commit by wrapping the above in a helper function called
    `test_pack_objects_reused_all()`.
    
    Introduce another similar function `test_pack_objects_reused`, which
    expects to read a list of revisions over stdin for tests which need more
    fine-grained control of the contents of the pack they generate.
    
    Signed-off-by: Taylor Blau <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    ttaylorr authored and gitster committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    7c01878 View commit details
    Browse the repository at this point in the history
  2. pack-objects: enable multi-pack reuse via feature.experimental

    Now that multi-pack reuse is supported, enable it via the
    feature.experimental configuration in addition to the classic
    `pack.allowPackReuse`.
    
    This will allow more users to experiment with the new behavior who might
    not otherwise be aware of the existing `pack.allowPackReuse`
    configuration option.
    
    The enum with values NO_PACK_REUSE, SINGLE_PACK_REUSE, and
    MULTI_PACK_REUSE is defined statically in builtin/pack-objects.c's
    compilation unit. We could hoist that enum into a scope visible from the
    repository_settings struct, and then use that enum value in
    pack-objects. Instead, define a single int that indicates what
    pack-objects's default value should be to avoid additional unnecessary
    code movement.
    
    Though `feature.experimental` implies `pack.allowPackReuse=multi`, this
    can still be overridden by explicitly setting the latter configuration
    to either "single" or "false". Tests covering all of these cases are
    showin t5332.
    
    Signed-off-by: Taylor Blau <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    ttaylorr authored and gitster committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    23c1e71 View commit details
    Browse the repository at this point in the history
Loading