Added annex.adviceNoSshCaching config.
Sponsored-by: Brock Spratlen on Patreon
This commit is contained in:
parent
9ad9e1eb65
commit
189fb05ffb
5 changed files with 27 additions and 3 deletions
|
@ -118,9 +118,10 @@ sshCachingInfo (host, port) = go =<< sshCacheDir'
|
|||
ConcurrentPerCpu -> warnnocaching whynocaching
|
||||
return (Nothing, [])
|
||||
|
||||
warnnocaching whynocaching = do
|
||||
warning nocachingwarning
|
||||
warning whynocaching
|
||||
warnnocaching whynocaching =
|
||||
whenM (annexAdviceNoSshCaching <$> Annex.getGitConfig) $ do
|
||||
warning nocachingwarning
|
||||
warning whynocaching
|
||||
|
||||
nocachingwarning = unwords
|
||||
[ "You have enabled concurrency, but git-annex is not able"
|
||||
|
|
|
@ -27,6 +27,7 @@ git-annex (8.20210429) UNRELEASED; urgency=medium
|
|||
* assistant: Fix a crash on startup by avoiding using forkProcess.
|
||||
* init: When annex.commitmessage is set, use that message for the commit
|
||||
that creates the git-annex branch.
|
||||
* Added annex.adviceNoSshCaching config.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Mon, 03 May 2021 10:33:10 -0400
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ data GitConfig = GitConfig
|
|||
, gpgCmd :: GpgCmd
|
||||
, mergeDirectoryRenames :: Maybe String
|
||||
, annexPrivateRepos :: S.Set UUID
|
||||
, annexAdviceNoSshCaching :: Bool
|
||||
}
|
||||
|
||||
extractGitConfig :: ConfigSource -> Git.Repo -> GitConfig
|
||||
|
@ -255,6 +256,7 @@ extractGitConfig configsource r = GitConfig
|
|||
| otherwise = Nothing
|
||||
in mapMaybe get (M.toList (Git.config r))
|
||||
]
|
||||
, annexAdviceNoSshCaching = getbool (annexConfig "adviceNoSshCaching") True
|
||||
}
|
||||
where
|
||||
getbool k d = fromMaybe d $ getmaybebool k
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 5"""
|
||||
date="2021-05-27T16:26:19Z"
|
||||
content="""
|
||||
Seems to me that annex.jobs must be set in the git config for that message
|
||||
to be displayed as shown.
|
||||
|
||||
I agree, it would make sense to have a way to disable the message.
|
||||
Added annex.adviceNoSshCaching
|
||||
"""]]
|
|
@ -1002,6 +1002,15 @@ repository, using [[git-annex-config]]. See its man page for a list.)
|
|||
ControlMaster and ControlPersist settings
|
||||
(if built using a new enough ssh). To disable this, set to `false`.
|
||||
|
||||
* `annex.adviceNoSshCaching`
|
||||
|
||||
When git-annex is unable to use ssh connection caching, or has been
|
||||
configured not to, and concurrency is enabled, it will warn that
|
||||
this might result in multiple ssh processes prompting for passwords
|
||||
at the same time. To disable that warning, eg if you have configured ssh
|
||||
connection caching yourself, or have ssh agent caching passwords,
|
||||
set this to `false`.
|
||||
|
||||
* `annex.alwayscommit`
|
||||
|
||||
By default, git-annex automatically commits data to the git-annex branch
|
||||
|
|
Loading…
Reference in a new issue