]> git.ipfire.org Git - thirdparty/git.git/commit
commit: convert mergetag before computing the signature of a commit
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 2 Oct 2023 02:40:14 +0000 (21:40 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Oct 2023 21:57:39 +0000 (14:57 -0700)
commita3e8ae5473942c0d2621c5936685b6d98e63f006
tree62f14cd2a03cb230b213a394ccc23d71b98b2476
parent6206089cbd0b1cb30a017ec904567f040ab4cea0
commit: convert mergetag before computing the signature of a commit

It so happens that commit mergetag lines embed a tag object.  So to
compute the compatible signature of a commit object that has mergetag
lines the compatible embedded tag must be computed first.

Implement this by duplicating and converting the commit extra headers
into the compatible version of the commit extra headers, that need
to be passed to commit_tree_extended.

To handle merge tags only the compatible extra headers need to be
computed.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c