summaryrefslogtreecommitdiff
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-02 00:53:00 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-02 00:53:00 -0400
commitd1f49b0ad032f13adc39d963cc8ceca28215b1d5 (patch)
tree928b469a98f90113822e0300f4c52bd41c6a4863 /CmdLine.hs
parent2d2bfe9809f8d8d5862bc12fbe40c2e25b2405a3 (diff)
add fields to git-annex-shell
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 910f228b6..edbe5e107 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -30,8 +30,8 @@ type Params = [String]
type Flags = [Annex ()]
{- Runs the passed command line. -}
-dispatch :: Bool -> Params -> [Command] -> [Option] -> String -> IO Git.Repo -> IO ()
-dispatch fuzzyok allargs allcmds commonoptions header getgitrepo = do
+dispatch :: Bool -> Params -> [Command] -> [Option] -> [(String, String)] -> String -> IO Git.Repo -> IO ()
+dispatch fuzzyok allargs allcmds commonoptions fields header getgitrepo = do
setupConsole
r <- E.try getgitrepo :: IO (Either E.SomeException Git.Repo)
case r of
@@ -40,6 +40,7 @@ dispatch fuzzyok allargs allcmds commonoptions header getgitrepo = do
state <- Annex.new g
(actions, state') <- Annex.run state $ do
checkfuzzy
+ forM_ fields $ \(f, v) -> Annex.setField f v
sequence_ flags
prepCommand cmd params
tryRun state' cmd $ [startup] ++ actions ++ [shutdown $ cmdoneshot cmd]