blind enabling gcrypt repos on rsync.net
This pulls off quite a nice trick: When given a path on rsync.net, it determines if it is an encrypted git repository that the user has the key to decrypt, and merges with it. This is works even when the local repository had no idea that the gcrypt remote exists! (As previously done with local drives.) This commit sponsored by Pedro Côrte-Real
This commit is contained in:
parent
8888e825fc
commit
e864c8d033
6 changed files with 111 additions and 58 deletions
|
@ -168,3 +168,12 @@ fromPipe r cmd params = try $
|
|||
where
|
||||
p = proc cmd $ toCommand params
|
||||
|
||||
{- Reads git config from a specified file and returns the repo populated
|
||||
- with the configuration. -}
|
||||
fromFile :: Repo -> FilePath -> IO (Either SomeException (Repo, String))
|
||||
fromFile r f = fromPipe r "git"
|
||||
[ Param "config"
|
||||
, Param "--file"
|
||||
, File f
|
||||
, Param "--list"
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue