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:
Joey Hess 2013-03-03 13:39:07 -04:00
parent 3a783b4a3a
commit 0c13d3065e
20 changed files with 95 additions and 76 deletions

View file

@ -76,10 +76,11 @@ setRepoConfig uuid mremote oldc newc = do
let remotefetch = "remote." ++ T.unpack (repoName oldc) ++ ".fetch"
needfetch <- isNothing <$> fromRepo (Git.Config.getMaybe remotefetch)
when needfetch $
inRepo $ Git.Command.run "config"
[Param remotefetch, Param ""]
inRepo $ Git.Command.run "remote"
[ Param "rename"
inRepo $ Git.Command.run
[Param "config", Param remotefetch, Param ""]
inRepo $ Git.Command.run
[ Param "remote"
, Param "rename"
, Param $ T.unpack $ repoName oldc
, Param name
]