set remote's annexUrl automatically
When the remote repository's git config file has annex.url set to an annex+http url.
This commit is contained in:
parent
c87cfe1e00
commit
bc9cc79e85
5 changed files with 35 additions and 21 deletions
|
@ -340,6 +340,12 @@ tryGitConfigRead autoinit r hasuuid
|
|||
-- optimisation.
|
||||
unless (fromMaybe False $ Git.Config.isBare r') $
|
||||
setremote setRemoteBare False
|
||||
-- When annex.url is set to a P2P http url,
|
||||
-- store in remote.name.annexUrl
|
||||
case Git.fromConfigValue <$> Git.Config.getMaybe (annexConfig "url") r' of
|
||||
Just u | isP2PHttpProtocolUrl u ->
|
||||
setremote (setConfig . annexUrlConfigKey) u
|
||||
_ -> noop
|
||||
return r'
|
||||
Left err -> do
|
||||
set_ignore "not usable by git-annex" False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue