mktag: call "check_sha1_signature" with the replacement sha1
Otherwise we get a "sha1 mismatch" error for replaced objects. Note that I am not sure at all that this is a good change. It may be that we should just refuse to tag a replaced object. But in this case we should probably give a meaningfull error message instead of "sha1 mismatch". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a3e8267225
commit
cc400f5011
@ -70,6 +70,18 @@ test_expect_success 'replace the author' '
|
||||
git show $HASH2 | grep "O Thor"
|
||||
'
|
||||
|
||||
cat >tag.sig <<EOF
|
||||
object $HASH2
|
||||
type commit
|
||||
tag mytag
|
||||
tagger T A Gger <> 0 +0000
|
||||
|
||||
EOF
|
||||
|
||||
test_expect_success 'tag replaced commit' '
|
||||
git mktag <tag.sig >.git/refs/tags/mytag 2>message
|
||||
'
|
||||
|
||||
#
|
||||
#
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user