diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-02-12 10:08:51 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-12 10:08:51 -0800 |
| commit | aae91a86fb2a71ff89a71b63ccec3a947b26ca51 (patch) | |
| tree | 3bfc421ac1b1f445d22bae71a3b3524ec993fb4c /t/test-lib-functions.sh | |
| parent | The ninth batch (diff) | |
| parent | pack-objects: prevent name hash version change (diff) | |
| download | git-aae91a86fb2a71ff89a71b63ccec3a947b26ca51.tar.gz git-aae91a86fb2a71ff89a71b63ccec3a947b26ca51.zip | |
Merge branch 'ds/name-hash-tweaks'
"git pack-objects" and its wrapper "git repack" learned an option
to use an alternative path-hash function to improve delta-base
selection to produce a packfile with deeper history than window
size.
* ds/name-hash-tweaks:
pack-objects: prevent name hash version change
test-tool: add helper for name-hash values
p5313: add size comparison test
pack-objects: add GIT_TEST_NAME_HASH_VERSION
repack: add --name-hash-version option
pack-objects: add --name-hash-version option
pack-objects: create new name-hash function version
Diffstat (limited to 't/test-lib-functions.sh')
| -rw-r--r-- | t/test-lib-functions.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 14d511f509..b93736e0d5 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1896,6 +1896,32 @@ test_subcommand () { fi } +# Check that the given subcommand was run with the given set of +# arguments in order (but with possible extra arguments). +# +# test_subcommand_flex [!] <command> <args>... < <trace> +# +# If the first parameter passed is !, this instead checks that +# the given command was not called. +# +test_subcommand_flex () { + local negate= + if test "$1" = "!" + then + negate=t + shift + fi + + local expr="$(printf '"%s".*' "$@")" + + if test -n "$negate" + then + ! grep "\[$expr\]" + else + grep "\[$expr\]" + fi +} + # Check that the given command was invoked as part of the # trace2-format trace on stdin. # |
