git subcommand cleanup
Pass subcommand as a regular param, which allows passing git parameters like -c before it. This was already done in the pipeing set of functions, but not the command running set.
This commit is contained in:
parent
3a783b4a3a
commit
0c13d3065e
20 changed files with 95 additions and 76 deletions
|
@ -204,8 +204,11 @@ storeBupUUID u buprepo = do
|
|||
r' <- Git.Config.read r
|
||||
let olduuid = Git.Config.get "annex.uuid" "" r'
|
||||
when (olduuid == "") $
|
||||
Git.Command.run "config"
|
||||
[Param "annex.uuid", Param v] r'
|
||||
Git.Command.run
|
||||
[ Param "config"
|
||||
, Param "annex.uuid"
|
||||
, Param v
|
||||
] r'
|
||||
where
|
||||
v = fromUUID u
|
||||
|
||||
|
|
|
@ -141,10 +141,10 @@ tryGitConfigRead r
|
|||
{- Is this remote just not available, or does
|
||||
- it not have git-annex-shell?
|
||||
- Find out by trying to fetch from the remote. -}
|
||||
whenM (inRepo $ Git.Command.runBool "fetch" [Param "--quiet", Param n]) $ do
|
||||
whenM (inRepo $ Git.Command.runBool [Param "fetch", Param "--quiet", Param n]) $ do
|
||||
let k = "remote." ++ n ++ ".annex-ignore"
|
||||
warning $ "Remote " ++ n ++ " does not have git-annex installed; setting " ++ k
|
||||
inRepo $ Git.Command.run "config" [Param k, Param "true"]
|
||||
inRepo $ Git.Command.run [Param "config", Param k, Param "true"]
|
||||
return r
|
||||
_ -> return r
|
||||
| Git.repoIsHttp r = do
|
||||
|
|
|
@ -34,7 +34,7 @@ gitConfigSpecialRemote u c k v = do
|
|||
set ("annex-"++k) v
|
||||
set ("annex-uuid") (fromUUID u)
|
||||
where
|
||||
set a b = inRepo $ Git.Command.run "config"
|
||||
[Param (configsetting a), Param b]
|
||||
set a b = inRepo $ Git.Command.run
|
||||
[Param "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