split out Git/Command.hs
This commit is contained in:
parent
02f1bd2bf4
commit
ef28b3fef7
22 changed files with 125 additions and 100 deletions
|
@ -15,6 +15,7 @@ import System.Process
|
|||
import Common.Annex
|
||||
import Types.Remote
|
||||
import qualified Git
|
||||
import qualified Git.Command
|
||||
import qualified Git.Config
|
||||
import qualified Git.Construct
|
||||
import Config
|
||||
|
@ -148,7 +149,7 @@ checkPresent r bupr k
|
|||
ok <- onBupRemote bupr boolSystem "git" params
|
||||
return $ Right ok
|
||||
| otherwise = liftIO $ catchMsgIO $
|
||||
boolSystem "git" $ Git.gitCommandLine params bupr
|
||||
boolSystem "git" $ Git.Command.gitCommandLine params bupr
|
||||
where
|
||||
params =
|
||||
[ Params "show-ref --quiet --verify"
|
||||
|
@ -168,7 +169,7 @@ storeBupUUID u buprepo = do
|
|||
r' <- Git.Config.read r
|
||||
let olduuid = Git.Config.get "annex.uuid" "" r'
|
||||
when (olduuid == "") $
|
||||
Git.run "config"
|
||||
Git.Command.run "config"
|
||||
[Param "annex.uuid", Param v] r'
|
||||
where
|
||||
v = fromUUID u
|
||||
|
|
|
@ -16,6 +16,7 @@ import Utility.RsyncFile
|
|||
import Annex.Ssh
|
||||
import Types.Remote
|
||||
import qualified Git
|
||||
import qualified Git.Command
|
||||
import qualified Git.Config
|
||||
import qualified Git.Construct
|
||||
import qualified Annex
|
||||
|
@ -176,7 +177,7 @@ onLocal r a = do
|
|||
-- for anything onLocal is used to do.
|
||||
Annex.BranchState.disableUpdate
|
||||
ret <- a
|
||||
liftIO Git.reap
|
||||
liftIO Git.Command.reap
|
||||
return ret
|
||||
|
||||
keyUrls :: Git.Repo -> Key -> [String]
|
||||
|
|
|
@ -12,6 +12,7 @@ import qualified Data.Map as M
|
|||
import Common.Annex
|
||||
import Types.Remote
|
||||
import qualified Git
|
||||
import qualified Git.Command
|
||||
import qualified Git.Construct
|
||||
|
||||
{- Special remotes don't have a configured url, so Git.Repo does not
|
||||
|
@ -33,7 +34,7 @@ gitConfigSpecialRemote u c k v = do
|
|||
set ("annex-"++k) v
|
||||
set ("annex-uuid") (fromUUID u)
|
||||
where
|
||||
set a b = inRepo $ Git.run "config"
|
||||
set a b = inRepo $ Git.Command.run "config"
|
||||
[Param (configsetting a), Param b]
|
||||
remotename = fromJust (M.lookup "name" c)
|
||||
configsetting s = "remote." ++ remotename ++ "." ++ s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue