[[!comment format=mdwn
 username="joey"
 subject="""comment 2"""
 date="2018-05-23T17:18:35Z"
 content="""
The bug was that it got the test backwards for whether 
it was supposed to be adding or removing the extension!

Bug was introduced in [[!commit 9c4650358ca85a298b747bb897dbf4f8f891fa22]]
over a year ago.

The bogus SHA256 key with an extension tacked on at the end
passes fsck because the code happens to always strip extensions from
hashes, even if the key type is not supposed to include an extension.

Fixed the bug. But this leaves the potential for these badly formed
SHA256 keys with an extension on the end being in a repository and
needing to keep code working for them. (The SHA256E keys without an
extension that also result from the bug are technically not badly formed.)

So, I also made migrate fix those badly formed keys. You have to specify
--backend=SHA256, and then it will migrate the badly formed SHA256 key to
a correctly formed SHA256 key.

Also, git-annex fsck will now warn when it detects a key needing such a
migration.
"""]]
