diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-05 19:16:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-05 19:16:20 -0700 |
commit | e9dd7518666ae8bfb3d7ddbca1a00c018d2e79e8 (patch) | |
tree | 0c5f257be4726f4760bd4d63dfb3585ea667c090 /t | |
parent | e2e2defc14a79ea5b4aaae23e33072f29c5965eb (diff) | |
parent | 1bf6551e42c79a594689a356a9b14759d55f3cf5 (diff) | |
download | git-e9dd7518666ae8bfb3d7ddbca1a00c018d2e79e8.tar.gz |
Merge branch 'bc/filter-branch'
* bc/filter-branch:
filter-branch.sh: support nearly proper tag name filtering
Diffstat (limited to 't')
-rwxr-xr-x | t/t7003-filter-branch.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index efd658adb6..16df3d4adb 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -219,4 +219,36 @@ test_expect_success 'Subdirectory filter with disappearing trees' ' test $(git rev-list master | wc -l) = 3 ' +test_expect_success 'Tag name filtering retains tag message' ' + git tag -m atag T && + git cat-file tag T > expect && + git filter-branch -f --tag-name-filter cat && + git cat-file tag T > actual && + git diff expect actual +' + +faux_gpg_tag='object XXXXXX +type commit +tag S +tagger T A Gger <tagger@example.com> 1206026339 -0500 + +This is a faux gpg signed tag. +-----BEGIN PGP SIGNATURE----- +Version: FauxGPG v0.0.0 (FAUX/Linux) + +gdsfoewhxu/6l06f1kxyxhKdZkrcbaiOMtkJUA9ITAc1mlamh0ooasxkH1XwMbYQ +acmwXaWET20H0GeAGP+7vow= +=agpO +-----END PGP SIGNATURE----- +' +test_expect_success 'Tag name filtering strips gpg signature' ' + sha1=$(git rev-parse HEAD) && + sha1t=$(echo "$faux_gpg_tag" | sed -e s/XXXXXX/$sha1/ | git mktag) && + git update-ref "refs/tags/S" "$sha1t" && + echo "$faux_gpg_tag" | sed -e s/XXXXXX/$sha1/ | head -n 6 > expect && + git filter-branch -f --tag-name-filter cat && + git cat-file tag S > actual && + git diff expect actual +' + test_done |