]> dgit.raspbian.org Git - git-annex.git/commit
simplify base64 to only use ByteString
authorJoey Hess <joeyh@joeyh.name>
Thu, 26 Oct 2023 16:42:32 +0000 (12:42 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 26 Oct 2023 17:10:05 +0000 (13:10 -0400)
commit3742263c99180d1391e4fd51724aae52d6d02137
treea0d773a3a2a28ecbeb68ec69c85e6db06a717f1d
parent985dd38847452d522b9eac84b3331ded3d17df8e
simplify base64 to only use ByteString

Note the use of fromString and toString from Data.ByteString.UTF8 dated
back to commit 9b93278e8abe1163d53fbf56909d0fe6d7de69e9. Back then it
was using the dataenc package for base64, which operated on Word8 and
String. But with the switch to sandi, it uses ByteString, and indeed
fromB64' and toB64' were already using ByteString without that
complication. So I think there is no risk of such an encoding related
breakage.

I also tested the case that 9b93278e8abe1163d53fbf56909d0fe6d7de69e9
fixed:

git-annex metadata -s foo='a …' x
git-annex metadata x
metadata x
  foo=a …

In Remote.Helper.Encryptable, it was avoiding using Utility.Base64
because of that UTF8 conversion. Since that's no longer done, it can
just use it now.
Annex/TaggedPush.hs
Creds.hs
Logs/ContentIdentifier/Pure.hs
Remote/Helper/Encryptable.hs
Test.hs
Types/MetaData.hs
Utility/Base64.hs