refactor
This commit is contained in:
parent
5bd5e604ad
commit
b58bb4c8c1
3 changed files with 19 additions and 24 deletions
|
@ -72,3 +72,11 @@ getGCryptRemoteName u repoloc = do
|
|||
void $ inRepo $ Git.Remote.remove tmpremote
|
||||
return mname
|
||||
|
||||
checkGCryptRepoEncryption :: String -> Handler Html -> Handler Html -> Handler Html
|
||||
checkGCryptRepoEncryption location notencrypted encrypted =
|
||||
dispatch =<< liftAnnex (inRepo $ Git.GCrypt.probeRepo location)
|
||||
where
|
||||
dispatch Git.GCrypt.Decryptable = encrypted
|
||||
dispatch Git.GCrypt.NotEncrypted = notencrypted
|
||||
dispatch Git.GCrypt.NotDecryptable =
|
||||
error "This git repository is encrypted with a GnuPG key that you do not have."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue