]> git.ipfire.org Git - thirdparty/git.git/commit
t1016-compatObjectFormat: add tests to verify the conversion between objects
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 2 Oct 2023 02:40:34 +0000 (21:40 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Oct 2023 21:57:40 +0000 (14:57 -0700)
commit7673ecd2dcdcf0aae01cccdb5c25f9b96160a8c0
tree215eb210ff384db5342c80055f8e5a4486dc2ba2
parent3afa8d86accb01686a24c7859bee31370472ef56
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" <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/helper/test-delete-gpgsig.c [new file with mode: 0644]
t/helper/test-tool.c
t/helper/test-tool.h
t/t1016-compatObjectFormat.sh [new file with mode: 0755]
t/t1016/gpg [new file with mode: 0755]