{"thread":{"id":"32483","subject":"git filter-branch doesn't dereference annotated tags","startedAt":"2012-12-31T14:36:16Z","lastAt":"2012-12-31T14:36:16Z","messageCount":1,"participants":["Grégory Pakosz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"205695","messageId":"CAC_01E3a5Bwb-KjJs+wvb6rO_A1OyDrzBRRetC0tPxUADMhYrQ@mail.gmail.com","threadId":"32483","inReplyTo":null,"subject":"git filter-branch doesn't dereference annotated tags","fromName":"Grégory Pakosz","fromEmail":"gpakosz@visionobjects.com","sentAt":"2012-12-31T14:36:16Z","receivedAt":"2012-12-31T14:36:16Z","isPatch":false,"sender":{"key":"gpakosz@visionobjects.com","avatar":"https://gravatar.com/avatar/4346628bc87f6417d0efe6a1a66d941e8f3afed0a8621ca1cec4cb768058204c?d=mp&s=160"},"body":"Hello,\n\nI noticed git-filter-branch doesn't dereference annotated tags prior\nto invoking git update-ref -d.\n\nPlease find a patch attached that changes the call to git update-ref:\n\n-git update-ref -m \"filter-branch: delete\" -d \"$ref\" $sha1\n+git update-ref -m \"filter-branch: delete\" -d $(git rev-parse --verify\n\"$ref^{commit}\") $sha1\n\nRegards,\nGregory\n\n\nFrom cee5462f26bbb280f471ba1220398924bfd4bfd7 Mon Sep 17 00:00:00 2001\nFrom: Gregory Pakosz <gpakosz@visionobjects.com>\nDate: Mon, 31 Dec 2012 15:30:36 +0100\nSubject: [PATCH] git-filter-branch: Dereference annotated tags upon deletion\n\ngit-filter-branch didn't dereference annotated tags upon deletion which made\ngit-update-ref -d unhappy.\n---\n git-filter-branch.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-filter-branch.sh b/git-filter-branch.sh\nindex 5314249..773a91b 100755\n--- a/git-filter-branch.sh\n+++ b/git-filter-branch.sh\n@@ -383,7 +383,7 @@ do\n \tcase \"$rewritten\" in\n \t'')\n \t\techo \"Ref '$ref' was deleted\"\n-\t\tgit update-ref -m \"filter-branch: delete\" -d \"$ref\" $sha1 ||\n+\t\tgit update-ref -m \"filter-branch: delete\" -d $(git rev-parse --verify \"$ref^{commit}\") $sha1 ||\n \t\t\tdie \"Could not delete $ref\"\n \t;;\n \t$_x40)\n-- \n1.8.0.1\n\n"}]}