summaryrefslogtreecommitdiff
path: root/t/t6050-replace.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-01-23 09:07:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-01 00:02:59 (GMT)
commitcc400f50112a58471b992a54b1a05d99a8a82457 (patch)
treed6f0e37bf8d3c05630dee2fe3b68bd0f075322bc /t/t6050-replace.sh
parenta3e826722515ec8abed8ccf29d958eb52d4be3f8 (diff)
downloadgit-cc400f50112a58471b992a54b1a05d99a8a82457.zip
git-cc400f50112a58471b992a54b1a05d99a8a82457.tar.gz
git-cc400f50112a58471b992a54b1a05d99a8a82457.tar.bz2
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>
Diffstat (limited to 't/t6050-replace.sh')
-rwxr-xr-xt/t6050-replace.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index 0a585ec..334aed6 100755
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
@@ -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