local git remote autoinit improvements

* Improve display of problems auto-initializing or upgrading local git
  remotes.
* When a local git remote cannot be initialized because it has no
  git-annex branch or a .noannex file, avoid displaying a message about it.
This commit is contained in:
Joey Hess 2020-06-16 13:24:00 -04:00
parent 9f61cb94c0
commit a76b1ba3d6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 27 additions and 2 deletions

View file

@ -337,7 +337,9 @@ tryGitConfigRead autoinit r hasuuid
readlocalannexconfig = do
let check = do
Annex.BranchState.disableUpdate
catchNonAsync ensureInitialized (warning . show)
catchNonAsync autoInitialize $ \e ->
warning $ "remote " ++ Git.repoDescribe r ++
" :" ++ show e
Annex.getState Annex.repo
s <- Annex.new r
Annex.eval s $ check `finally` stopCoProcesses