enableremote: Remove annex-ignore configuration from a remote.

This commit is contained in:
Joey Hess 2016-05-24 15:48:22 -04:00
parent b33a649a25
commit 1b3bde0625
Failed to extract signature
5 changed files with 34 additions and 17 deletions

View file

@ -247,7 +247,7 @@ tryGitConfigRead autoinit r
-- Cache when http remote is not bare for
-- optimisation.
unless (Git.Config.isBare r') $
setremote "annex-bare" (Git.Config.boolConfig False)
setremote setRemoteBare False
return r'
store = observe $ \r' -> do
@ -274,21 +274,18 @@ tryGitConfigRead autoinit r
return r
set_ignore msg longmessage = do
let k = "annex-ignore"
case Git.remoteName r of
Nothing -> noop
Just n -> do
warning $ "Remote " ++ n ++ " " ++ msg ++ "; setting " ++ k
warning $ "Remote " ++ n ++ " " ++ msg ++ "; setting annex-ignore"
when longmessage $
warning $ "This could be a problem with the git-annex installation on the remote. Please make sure that git-annex-shell is available in PATH when you ssh into the remote. Once you have fixed the git-annex installation, run: git config remote." ++ n ++ "." ++ k ++ " false"
setremote k (Git.Config.boolConfig True)
warning $ "This could be a problem with the git-annex installation on the remote. Please make sure that git-annex-shell is available in PATH when you ssh into the remote. Once you have fixed the git-annex installation, run: git annex enableremote " ++ n
setremote setRemoteIgnore True
setremote k v = case Git.remoteName r of
setremote setter v = case Git.remoteName r of
Nothing -> noop
Just n -> do
let k' = "remote." ++ n ++ "." ++ k
inRepo $ Git.Command.run [Param "config", Param k', Param v]
Just n -> setter r v
handlegcrypt Nothing = return r
handlegcrypt (Just _cacheduuid) = do
-- Generate UUID from the gcrypt-id