diff options
author | Joey Hess <joey@kitenet.net> | 2013-03-04 23:27:18 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-03-04 23:27:18 -0400 |
commit | 6f4e0fa4a08b5abccbbfd363892f084faa6a2c39 (patch) | |
tree | 109b7f0b60c7951120d5391ec4eb9b4ec69d2ba9 /Remote | |
parent | 5123a1a83aa3b954fe67629508bab5ccea0e4148 (diff) |
print a warning message when garbage is received from configlist
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Git.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 7f9f95e2a..d39e0afe2 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -161,8 +161,15 @@ tryGitConfigRead r =<< liftIO (try a :: IO (Either SomeException Git.Repo)) pipedconfig cmd params = - withHandle StdoutHandle createProcessSuccess p $ - Git.Config.hRead r + withHandle StdoutHandle createProcessSuccess p $ \h -> do + fileEncoding h + val <- hGetContentsStrict h + r' <- Git.Config.store val r + when (getUncachedUUID r' == NoUUID && not (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!" + return r' where p = proc cmd $ toCommand params |