aboutsummaryrefslogtreecommitdiffstats
path: root/t/t1460-refs-migrate.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-02-03 10:23:34 -0800
committerJunio C Hamano <gitster@pobox.com>2025-02-03 10:23:35 -0800
commit1f124f30244654fdf3e87efe1b70948fbfeab4b0 (patch)
tree041308ac20aa62f7073f88d70608bb1033aa4946 /t/t1460-refs-migrate.sh
parentb83a2f9006cdf5293370b1254f4f4cb2770c1b9f (diff)
parentf11f0a5a2db955f68776ea95aec42df7fcb8ce1b (diff)
downloadgit-1f124f30244654fdf3e87efe1b70948fbfeab4b0.tar.gz
Merge branch 'kn/reflog-migration-fix-fix'
Fix bugs in an earlier attempt to fix "git refs migration". * kn/reflog-migration-fix-fix: refs/reftable: fix uninitialized memory access of `max_index` reftable: write correct max_update_index to header
Diffstat (limited to 't/t1460-refs-migrate.sh')
-rwxr-xr-xt/t1460-refs-migrate.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t1460-refs-migrate.sh b/t/t1460-refs-migrate.sh
index ceb0c4977d..a6d9b35a46 100755
--- a/t/t1460-refs-migrate.sh
+++ b/t/t1460-refs-migrate.sh
@@ -244,6 +244,18 @@ do
done
done
+test_expect_success 'multiple reftable blocks with multiple entries' '
+ test_when_finished "rm -rf repo" &&
+ git init --ref-format=files repo &&
+ test_commit -C repo first &&
+ printf "create refs/heads/ref-%d HEAD\n" $(test_seq 5000) >stdin &&
+ git -C repo update-ref --stdin <stdin &&
+ test_commit -C repo second &&
+ printf "update refs/heads/ref-%d HEAD\n" $(test_seq 3000) >stdin &&
+ git -C repo update-ref --stdin <stdin &&
+ test_migration repo reftable
+'
+
test_expect_success 'migrating from files format deletes backend files' '
test_when_finished "rm -rf repo" &&
git init --ref-format=files repo &&