git-annex/Utility
Joey Hess da8e84efe9
fix failing quickcheck properties
QuickCheck 2.10 found a counterexample eg "\929184" broke the property.

As far as I can tell, Git.Filename is matching how git handles encoding
of strange high unicode characters in filenames for display. Git does
not display high unicode characters, and instead displays the C-style
escaped form of each byte. This is ambiguous, but since git is not
unicode aware, it doesn't need to roundtrip parse it.

So, making Git.FileName's roundtrip test only chars < 256 seems fine.

Utility.Format.format uses encode_c, in order to mimic git, so that's
ok.

Utility.Format.gen uses decode_c, but only so that stuff like "\n"
in the format string is handled. If the format string contains C-style
octal escapes, they will be converted to ascii characters, and not
combined into unicode characters, but that should not be a problem.
If the user wants unicode characters, they can include them in the
format string, without escaping them.

Finally, decode_c is used by Utility.Gpg.secretKeys, because gpg
--with-colons hex-escapes some characters in particular ':' and '\\'.
gpg passes unicode through, so this use of decode_c is not a problem.

This commit was sponsored by Henrik Riomar on Patreon.
2017-06-17 16:48:00 -04:00
..
DirWatcher Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00
LockFile remove temp file in failure case 2017-06-06 14:23:33 -04:00
LockPool Fix transfer log file locking problem when running concurrent transfers. 2017-05-25 17:40:23 -04:00
Process
Scheduled
Touch
Applicative.hs
AuthToken.hs unified AuthToken type between webapp and tor 2016-11-22 14:18:34 -04:00
Base64.hs
Batch.hs
Bloom.hs
CoProcess.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
CopyFile.hs
Daemon.hs Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00
Data.hs
DataUnits.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
DBus.hs
Directory.hs optimisation 2017-05-16 11:33:53 -04:00
DirWatcher.hs disable closingTracked on OSX 2017-06-09 14:18:58 -04:00
DiskFree.hs
Dot.hs
DottedVersion.hs Some optimisations to string splitting code. 2017-01-31 19:06:22 -04:00
Env.hs
Exception.hs allow Utility.Exception to still be used when not building with cabal 2016-11-15 22:01:55 -04:00
ExternalSHA.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
FileMode.hs multicast: New command, uses uftp to multicast annexed files, for eg a classroom setting. 2017-03-30 19:35:30 -04:00
FileSize.hs
FileSystemEncoding.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Format.hs fix failing quickcheck properties 2017-06-17 16:48:00 -04:00
FreeDesktop.hs use System.Directory not Utility.Directory 2016-09-22 11:34:55 -04:00
Glob.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Gpg.hs fix failing quickcheck properties 2017-06-17 16:48:00 -04:00
Hash.hs stop using MissingH for MD5 2017-05-15 21:36:03 -04:00
HumanNumber.hs
HumanTime.hs
InodeCache.hs Fix build with QuickCheck 2.10. 2017-06-17 13:04:48 -04:00
libkqueue.c
libkqueue.h
LinuxMkLibs.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
LockFile.hs
LockPool.hs
LogFile.hs
Lsof.hs Some optimisations to string splitting code. 2017-01-31 19:06:22 -04:00
MagicWormhole.hs wormhole pairing appid flag day 2021-12-31 2017-02-03 15:06:40 -04:00
Matcher.hs
Metered.hs Improve progress display when watching file size, in cases where a transfer does not resume. 2017-05-25 14:30:18 -04:00
Misc.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Monad.hs
Mounts.hs
Network.hs
NotificationBroadcaster.hs
OptParse.hs
OSX.hs
Parallel.hs
PartialPrelude.hs correct spelling mistakes 2017-02-12 17:30:23 -04:00
Path.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Percentage.hs
PID.hs
PosixFiles.hs
Process.hs simpler more generic processTranscript' 2017-02-15 16:02:10 -04:00
QuickCheck.hs Fix build with QuickCheck 2.10. 2017-06-17 13:04:48 -04:00
Quvi.hs Some optimisations to string splitting code. 2017-01-31 19:06:22 -04:00
Rsync.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
SafeCommand.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Scheduled.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Shell.hs Windows: Fix bug in shell script shebang lookup code that caused a "delayed read on closed handle" error. 2017-03-13 16:20:52 -04:00
SimpleProtocol.hs git-annex-shell, remotedaemon, git remote: Fix some memory DOS attacks. 2016-12-09 13:34:32 -04:00
Split.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
SRV.hs Drop support for building with old versions of dns and http-conduit. 2017-03-10 15:49:14 -04:00
SshConfig.hs
Su.hs more windows build fix 2016-12-30 16:39:51 -04:00
SystemDirectory.hs Fix build with directory-1.3. 2016-12-20 15:23:59 -04:00
Tense.hs
ThreadLock.hs
ThreadScheduler.hs
TList.hs
Tmp.hs avoid warnings about not exported System.Directory.isSymbolicLink 2016-04-28 15:18:11 -04:00
Tor.hs Support all common locations of the torrc file. 2016-12-28 15:12:31 -04:00
Touch.hs
Tuple.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Url.hs Drop support for building with old versions of directory, feed, and http-types. 2017-03-10 15:57:41 -04:00
UserInfo.hs Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00
Verifiable.hs
WebApp.hs cleanup 2016-12-24 15:14:46 -04:00
WinProcess.hs
Yesod.hs