git-annex/Remote
Joey Hess 89e1a05a8f
Fix mangling of --json output of utf-8 characters when not running in a utf-8 locale
As long as all code imports Utility.Aeson rather than Data.Aeson,
and no Strings that may contain utf-8 characters are used for eg, object
keys via T.pack, this is guaranteed to fix the problem everywhere that
git-annex generates json.

It's kind of annoying to need to wrap ToJSON with a ToJSON', especially
since every data type that has a ToJSON instance has to be ported over.
However, that only took 50 lines of code, which is worth it to ensure full
coverage. I initially tried an alternative approach of a newtype FileEncoded,
which had to be used everywhere a String was fed into aeson, and chasing
down all the sites would have been far too hard. Did consider creating an
intentionally overlapping instance ToJSON String, and letting ghc fail
to build anything that passed in a String, but am not sure that wouldn't
pollute some library that git-annex depends on that happens to use ToJSON
String internally.

This commit was supported by the NSF-funded DataLad project.
2018-04-16 16:21:21 -04:00
..
Directory remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
External Added EXTENSIONS to external special remote protocol. 2018-02-07 15:02:12 -04:00
Helper fix bad refactoring 2018-04-06 16:59:14 -04:00
Rsync Support exporttree=yes for rsync special remotes. 2018-02-28 13:36:20 -04:00
WebDAV webdav: Avoid unncessisarily creating the collection at the top of the repo 2017-10-11 11:10:33 -04:00
Adb.hs store probed androidserial for later use by enableremote 2018-03-27 17:38:04 -04:00
BitTorrent.hs Use http-conduit for url downloads by default, annex.web-options enables curl 2018-04-06 17:36:20 -04:00
Bup.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
Ddar.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
Directory.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
External.hs Avoid running annex.http-headers-command more than once. 2018-04-04 15:15:08 -04:00
GCrypt.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
Git.hs Use http-conduit for url downloads by default, annex.web-options enables curl 2018-04-06 17:36:20 -04:00
Glacier.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
Hook.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
List.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
P2P.hs fix nested progress meters when using git-annex-shell fallback 2018-03-12 19:20:10 -04:00
Rsync.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
S3.hs remove unused import 2018-04-09 13:09:40 -04:00
Tahoe.hs Fix mangling of --json output of utf-8 characters when not running in a utf-8 locale 2018-04-16 16:21:21 -04:00
Web.hs Use http-conduit for url downloads by default, annex.web-options enables curl 2018-04-06 17:36:20 -04:00
WebDAV.hs Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00