.git/annex/journal/* with permissions configured by core.sharedRepository.
* Bug fix: Lock files were created with wrong modes for some combinations
of core.sharedRepository and umask.
+ * initremote: Avoid creating a remote that is not encrypted when gpg is
+ broken.
-- Joey Hess <id@joeyh.name> Sat, 08 Apr 2023 13:57:18 -0400
- It is armored, to avoid newlines, since gpg only reads ciphers up to the
- first newline. -}
genRandom :: GpgCmd -> Bool -> Size -> IO String
-genRandom cmd highQuality size = checksize <$> readStrict cmd params
+genRandom cmd highQuality size = do
+ s <- readStrict cmd params
+ checksize s
+ return s
where
params =
[ Param "--gen-random"
expectedlength = size * 8 `div` 6
checksize s = let len = length s in
- if len >= expectedlength
- then s
- else shortread len
+ unless (len >= expectedlength) $
+ shortread len
shortread got = giveup $ unwords
[ "Not enough bytes returned from gpg", show params
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
It's awesome 👍
+
+> Indeed, there was a laziness bug that prevented it from exiting early
+> enough. [[fixed|done]] --[[Joey]]