avoid redundant prompt for http password in git-annex get that does autoinit
autoEnableSpecialRemotes runs a subprocess, and if the uuid for a git remote has not been probed yet, that will do a http get that will prompt for a password. And then the parent process will subsequently prompt for a password when getting annexed files from the remote. So the solution is for autoEnableSpecialRemotes to run remoteList before the subprocess, which will probe for the uuid for the git remote in the same process that will later be used to get annexed files. But, Remote.Git imports Annex.Init, and Remote.List imports Remote.Git, so Annex.Init cannot import Remote.List. Had to pass remoteList into functions in Annex.Init to get around this dependency loop.
This commit is contained in:
parent
9621beabc4
commit
c62fe5e9a8
6 changed files with 44 additions and 13 deletions
|
@ -28,6 +28,7 @@ import Utility.Daemon
|
|||
import Types.Transfer
|
||||
import Types.ActionItem
|
||||
import Types.WorkerPool as ReExported
|
||||
import Remote.List
|
||||
|
||||
{- Generates a normal Command -}
|
||||
command :: String -> CommandSection -> String -> CmdParamsDesc -> (CmdParamsDesc -> CommandParser) -> Command
|
||||
|
@ -125,7 +126,7 @@ commonChecks :: [CommandCheck]
|
|||
commonChecks = [repoExists]
|
||||
|
||||
repoExists :: CommandCheck
|
||||
repoExists = CommandCheck 0 ensureInitialized
|
||||
repoExists = CommandCheck 0 (ensureInitialized remoteList)
|
||||
|
||||
notBareRepo :: Command -> Command
|
||||
notBareRepo = addCheck checkNotBareRepo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue