Skip to content

Commit b2c1ca6

Browse files
ijcgitster
authored andcommitted
filter-branch: use hash-object instead of mktag
This allows us to recreate even historical tags which would now be consider invalid, such as v2.6.12-rc2..v2.6.13-rc3 in the Linux kernel source tree which lack the `tagger` header. $ git rev-parse v2.6.12-rc2 9e73477 $ git cat-file tag v2.6.12-rc2 | git mktag error: char76: could not find "tagger " fatal: invalid tag signature file $ git cat-file tag v2.6.12-rc2 | git hash-object -t tag -w --stdin 9e73477 Signed-off-by: Ian Campbell <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bd2c79f commit b2c1ca6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-filter-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ if [ "$filter_tag_name" ]; then
561561
}' \
562562
-e '/^-----BEGIN PGP SIGNATURE-----/q' \
563563
-e 'p' ) |
564-
git mktag) ||
564+
git hash-object -t tag -w --stdin) ||
565565
die "Could not create new tag object for $ref"
566566
if git cat-file tag "$ref" | \
567567
sane_grep '^-----BEGIN PGP SIGNATURE-----' >/dev/null 2>&1

0 commit comments

Comments
 (0)