summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-03 13:39:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-03 13:39:07 -0400
commit9bce151df7b073c5f2507ea15ca2237814ae9248 (patch)
tree653751d0c0f70475fc1bd7e89d0465fa76b8c630 /Remote
parente4fc1c290dba197a16c0e1cc0ff07ecfe2ee542b (diff)
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.
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Bup.hs7
-rw-r--r--Remote/Git.hs4
-rw-r--r--Remote/Helper/Special.hs4
3 files changed, 9 insertions, 6 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs
index 2976ff086..f81751f82 100644
--- a/Remote/Bup.hs
+++ b/Remote/Bup.hs
@@ -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
diff --git a/Remote/Git.hs b/Remote/Git.hs
index b1b6a2938..7f9f95e2a 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -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
diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs
index f25ee8ee0..7fc421f46 100644
--- a/Remote/Helper/Special.hs
+++ b/Remote/Helper/Special.hs
@@ -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