diff options
| author | Taylor Blau <me@ttaylorr.com> | 2025-03-19 18:52:51 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-21 03:42:06 -0700 |
| commit | 7fb12bb27eacbd8f5588e4dfba283b62d7faff90 (patch) | |
| tree | 64d677e26a904a156fb0246d07c3f3c8499febb2 | |
| parent | 1b01b03e52dcb1768c569b6dbaf84402c3b166bd (diff) | |
| download | git-7fb12bb27eacbd8f5588e4dfba283b62d7faff90.tar.gz | |
t/t7704-repack-cruft.sh: consolidate `write_blob()`
A previous commit moved a handful of tests from a different script into
t7704, including one that relies on generating random blobs.
Incidentally, the original home of this test defined its own helper
"write_blob" for doing so, which is identical in function to our
"generate_random_blob" (and is slightly inferior to the latter, which
cleans up after itself).
Rewrite the test that uses "write_blob" to no longer do so and then
remove the function.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Acked-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rwxr-xr-x | t/t7704-repack-cruft.sh | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/t/t7704-repack-cruft.sh b/t/t7704-repack-cruft.sh index e6e4c2fad8..3fd5aa6089 100755 --- a/t/t7704-repack-cruft.sh +++ b/t/t7704-repack-cruft.sh @@ -618,11 +618,6 @@ test_expect_success 'cruft repack with no reachable objects' ' ) ' -write_blob () { - test-tool genrandom "$@" >in && - git hash-object -w -t blob in -} - find_pack () { for idx in $(ls $packdir/pack-*.idx) do @@ -641,8 +636,8 @@ test_expect_success 'cruft repack with --max-pack-size' ' test_commit base && # two cruft objects which exceed the maximum pack size - foo=$(write_blob foo 1048576) && - bar=$(write_blob bar 1048576) && + foo=$(generate_random_blob foo 1048576) && + bar=$(generate_random_blob bar 1048576) && test-tool chmtime --get -1000 \ "$objdir/$(test_oid_to_path $foo)" >foo.mtime && test-tool chmtime --get -2000 \ |
