be quiet when reading cluster and proxy information at startup

I had a transfer of 3 files fail like this:

git-annex: transferrer protocol error: "(recording state in git...)"

The remote had stalldetection enabled, although I didn't see it stall.
So git-annex transferrer would have been started up. I guess that
one of these new git-annex branch reads, that happens early, caused
that message due to perhaps an uncommitted git-annex branch change.

Since the transferrer speaks a protocol over stdout, it needs to be
prevented from outputting other messages to stdout. Interestingly,
startupAnnex is run after prepRunCommand, so if a command requests quiet
output it would already be quiet. But the transferrer does not, instead
it calls Annex.setOutput SerializedOutput in its start action.
This commit is contained in:
Joey Hess 2024-06-18 21:31:32 -04:00
parent f916ce4b68
commit 6eac3112e5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ startup = do
- Alternatively, run after initialization.
-}
startupAnnex :: Annex ()
startupAnnex =
startupAnnex = doQuietAction $
-- Logs.Location needs clusters to be loaded before it is used,
-- in order for a cluster to be treated as the location of keys
-- that are located in any of its nodes.

View file

@ -94,7 +94,7 @@ list autoinit = do
c <- fromRepo Git.config
rs <- mapM (tweakurl c) =<< Annex.getGitRemotes
rs' <- mapM (configRead autoinit) (filter (not . isGitRemoteAnnex) rs)
proxies <- getProxies
proxies <- doQuietAction getProxies
if proxies == mempty
then return rs'
else do