Avoid displaying network transport warning when a ssh remote does not yet have an annex.uuid set.

Instead, only display transport error if the configlist output doesn't
include an annex.uuid line, even an empty one.

A recent change made git-annex init try to get all the remote uuids, and so
the transport error would be displayed by it. It was also displayed when
eg, copying files to a remote that had no uuid yet.
This commit is contained in:
Joey Hess 2015-10-15 15:28:29 -04:00
parent 8c54069980
commit 806819be57
Failed to extract signature
4 changed files with 26 additions and 1 deletions

View file

@ -221,7 +221,7 @@ tryGitConfigRead autoinit r
v <- Git.Config.fromPipe r cmd params
case v of
Right (r', val) -> do
when (getUncachedUUID r' == NoUUID && not (null val)) $ do
unless (isUUIDConfigured r' || null val) $ do
warningIO $ "Failed to get annex.uuid configuration of repository " ++ Git.repoDescribe r
warningIO $ "Instead, got: " ++ show val
warningIO $ "This is unexpected; please check the network transport!"