httpalso: Support being used with special remotes that do not have encryption= in their config.

This commit is contained in:
Joey Hess 2020-09-29 13:56:27 -04:00
parent 59263d2c6f
commit 084b502c7a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 23 additions and 1 deletions

View file

@ -105,7 +105,9 @@ httpAlsoSetup _ (Just u) _ c gc = do
_url <- maybe (giveup "Specify url=")
(return . fromProposedAccepted)
(M.lookup urlField c)
(c', _encsetup) <- encryptionSetup c gc
c' <- if isJust (M.lookup encryptionField c)
then fst <$> encryptionSetup c gc
else pure c
gitConfigSpecialRemote u c' [("httpalso", "true")]
return (c', u)