httpalso: Support being used with special remotes that do not have encryption= in their config.
This commit is contained in:
parent
59263d2c6f
commit
084b502c7a
4 changed files with 23 additions and 1 deletions
|
@ -32,6 +32,8 @@ git-annex (8.20200909) UNRELEASED; urgency=medium
|
|||
(Other special remotes may support this later as well.)
|
||||
* addurl: Avoid a redundant git ignores check for speed.
|
||||
* upgrade: Avoid an upgrade failure of a bare repo in unusual circumstances.
|
||||
* httpalso: Support being used with special remotes that do not have
|
||||
encryption= in their config.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Mon, 14 Sep 2020 18:34:37 -0400
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -40,3 +40,5 @@ git annex 8.20200908 on current Debian sid (as packaged)
|
|||
My first git-annex repository dates back 2010-12-21 ... so: yes.
|
||||
|
||||
The introduction of httpalso simplifies the setup in the [annex-to-web](https://gitlab.com/chrysn/annex-to-web) server, which on one hand consumes them in order to pass out redirects, and on the other hand .
|
||||
|
||||
> [[fixed|done]] to the extent this was a bug at all. --[[Joey]]
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 4"""
|
||||
date="2020-09-29T17:52:03Z"
|
||||
content="""
|
||||
Made it check if the inherited config has encryption and skip setting it
|
||||
up. So if there is a special remote that does not support encryption
|
||||
config, it won't fail this way.
|
||||
|
||||
Come to think, at least tahoe does not support encryption config.
|
||||
Although it seems very unlikely it would be useful combined with tahoe.
|
||||
|
||||
Of course, it still won't, and cannot possibly work when combined with a
|
||||
http export of a git working tree. But then the docs are clear it won't
|
||||
work with everything.
|
||||
"""]]
|
Loading…
Reference in a new issue