summaryrefslogtreecommitdiff
path: root/Trust.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-02-28 16:10:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-02-28 16:18:55 -0400
commitfcdc4797a9ab2b792a9bb20f2ca9802b8f6d5a1e (patch)
tree0471848c11df7c1481d8c735eab1280d7684eddc /Trust.hs
parent7e5678bcf7cd78bd04520117201be37dc9d4d544 (diff)
use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes, throughout the code.
Diffstat (limited to 'Trust.hs')
-rw-r--r--Trust.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Trust.hs b/Trust.hs
index 695059a93..7b2cf9ff8 100644
--- a/Trust.hs
+++ b/Trust.hs
@@ -81,8 +81,12 @@ trustSet uuid level = do
logfile <- trustLog
liftIO $ safeWriteFile logfile (serialize m')
g <- Annex.gitRepo
- liftIO $ Git.run g ["add", logfile]
- liftIO $ Git.run g ["commit", "-q", "-m", "git annex trust change", logfile]
+ liftIO $ Git.run g "add" [File logfile]
+ liftIO $ Git.run g "commit"
+ [ Params "-q -m"
+ , Param "git annex trust change"
+ , File logfile
+ ]
where
serialize m = unlines $ map showpair $ M.toList m
showpair (u, t) = u ++ " " ++ show t