Junio C Hamano wrote: > Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: > >> On Thu, 20 Mar 2008, Brandon Casey wrote: >> >>> Add support for creating a new tag object and retaining the tag message, >>> author, and date when rewriting tags. The gpg signature, if one exists, >>> will be stripped. >>> >>> This adds nearly proper tag name filtering to filter-branch. Proper tag >>> name filtering would include the ability to change the tagger, tag date, >>> tag message, and _not_ strip a gpg signature if the tag did not change. >> I think such a change in semantics merits a new option. > > It is a different story if the fix is a good one, or has room for > improvement. For example, the sed script that knows what is on the first > and second line and relies on that knowledge to use 1c...2c... looked very > fragile to me. This tag format is described in the documentation for git-mktag as follows: Tag Format ---------- A tag signature file has a very simple fixed format: four lines of object <sha1> type <typename> tag <tagname> tagger <tagger> followed by some 'optional' free-form message (some tags created [...] So, as long as git-cat-file succeeds, shouldn't we get this format piped to sed? The type is hard coded to "commit", since $new_ref will always be a commit (the old tag could have referenced another tag), otherwise the earlier rev-parse would have failed. The portion that strips the signature, does rely on the fact that git-tag always adds the signature to the end of the tag object. Rather than stripping only between the pgp BEGIN and END markers. And the 'Q' directive may not be portable, but I really don't know. Suggestions? -brandon -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html