From 7673ecd2dcdcf0aae01cccdb5c25f9b96160a8c0 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Sun, 1 Oct 2023 21:40:34 -0500 Subject: t1016-compatObjectFormat: add tests to verify the conversion between objects For now my strategy is simple. Create two identical repositories one in each format. Use fixed timestamps. Verify the dynamically computed compatibility objects from one repository match the objects stored in the other repository. A general limitation of this strategy is that the git when generating signed tags and commits with compatObjectFormat enabled will generate a signature for both formats. To overcome this limitation I have added "test-tool delete-gpgsig" that when fed an signed commit or tag with two signatures deletes one of the signatures. With that in place I can have "git commit" and "git tag" generate signed objects, have my tool delete one, and feed the new object into "git hash-object" to create the kinds of commits and tags git without compatObjectFormat enabled will generate. Signed-off-by: "Eric W. Biederman" Signed-off-by: Junio C Hamano --- t/helper/test-tool.c | 1 + 1 file changed, 1 insertion(+) (limited to 't/helper/test-tool.c') diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c index abe8a785eb..8b6c84f202 100644 --- a/t/helper/test-tool.c +++ b/t/helper/test-tool.c @@ -21,6 +21,7 @@ static struct test_cmd cmds[] = { { "csprng", cmd__csprng }, { "ctype", cmd__ctype }, { "date", cmd__date }, + { "delete-gpgsig", cmd__delete_gpgsig }, { "delta", cmd__delta }, { "dir-iterator", cmd__dir_iterator }, { "drop-caches", cmd__drop_caches }, -- cgit v1.2.3