diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-28 16:10:16 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-28 16:18:55 -0400 |
commit | fcdc4797a9ab2b792a9bb20f2ca9802b8f6d5a1e (patch) | |
tree | 0471848c11df7c1481d8c735eab1280d7684eddc /Command/Init.hs | |
parent | 7e5678bcf7cd78bd04520117201be37dc9d4d544 (diff) |
use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes,
throughout the code.
Diffstat (limited to 'Command/Init.hs')
-rw-r--r-- | Command/Init.hs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Command/Init.hs b/Command/Init.hs index 2976b988d..1074d100e 100644 --- a/Command/Init.hs +++ b/Command/Init.hs @@ -51,8 +51,12 @@ cleanup :: CommandCleanup cleanup = do g <- Annex.gitRepo logfile <- uuidLog - liftIO $ Git.run g ["add", logfile] - liftIO $ Git.run g ["commit", "-q", "-m", "git annex init", logfile] + liftIO $ Git.run g "add" [File logfile] + liftIO $ Git.run g "commit" + [ Params "-q -m" + , Param "git annex init" + , File logfile + ] return True {- configure git to use union merge driver on state files, if it is not @@ -72,9 +76,12 @@ gitAttributesWrite repo = do where attributes = Git.attributes repo commit = do - Git.run repo ["add", attributes] - Git.run repo ["commit", "-q", "-m", "git-annex setup", - attributes] + Git.run repo "add" [Param attributes] + Git.run repo "commit" + [ Params "-q -m" + , Param "git-annex setup" + , Param attributes + ] attrLine :: String attrLine = stateDir </> "*.log merge=union" |