Improve behavior when a just added http remote is not available during uuid probe. Do not mark it as annex-ignore, so it will be tried again later.

This commit is contained in:
Joey Hess 2016-05-03 12:53:42 -04:00
parent 157993dd2f
commit bfb4095c13
Failed to extract signature
3 changed files with 12 additions and 4 deletions

View file

@ -233,14 +233,17 @@ tryGitConfigRead autoinit r
hClose h
let url = Git.repoLocation r ++ "/config"
ifM (Url.downloadQuiet url tmpfile uo)
( pipedconfig "git" [Param "config", Param "--null", Param "--list", Param "--file", File tmpfile]
, return $ Left $ error $ "unable to load config from " ++ url
( Just <$> pipedconfig "git" [Param "config", Param "--null", Param "--list", Param "--file", File tmpfile]
, return Nothing
)
case v of
Left _ -> do
Nothing -> do
warning $ "Failed to get annex.uuid configuration of repository " ++ Git.repoDescribe r
return r
Just (Left _) -> do
set_ignore "not usable by git-annex" False
return r
Right r' -> do
Just (Right r') -> do
-- Cache when http remote is not bare for
-- optimisation.
unless (Git.Config.isBare r') $