started converting to use optparse-applicative
This is a work in progress. It compiles and is able to do basic command dispatch, including git autocorrection, while using optparse-applicative for the core commandline parsing. * Many commands are temporarily disabled before conversion. * Options are not wired in yet. * cmdnorepo actions don't work yet. Also, removed the [Command] list, which was only used in one place.
This commit is contained in:
parent
4018e5f6f1
commit
a2ba701056
104 changed files with 435 additions and 370 deletions
|
@ -21,9 +21,10 @@ import Utility.FileMode
|
|||
import System.IO.HVFS
|
||||
import System.IO.HVFS.Utils
|
||||
|
||||
cmd :: [Command]
|
||||
cmd = [addCheck check $ command "uninit" paramPaths seek
|
||||
SectionUtility "de-initialize git-annex and clean out repository"]
|
||||
cmd :: Command
|
||||
cmd = addCheck check $ command "uninit" paramPaths
|
||||
SectionUtility "de-initialize git-annex and clean out repository"
|
||||
(commandParser seek)
|
||||
|
||||
check :: Annex ()
|
||||
check = do
|
||||
|
@ -39,7 +40,7 @@ check = do
|
|||
revhead = inRepo $ Git.Command.pipeReadStrict
|
||||
[Param "rev-parse", Param "--abbrev-ref", Param "HEAD"]
|
||||
|
||||
seek :: CommandSeek
|
||||
seek :: CmdParams -> CommandSeek
|
||||
seek ps = do
|
||||
withFilesNotInGit False (whenAnnexed startCheckIncomplete) ps
|
||||
Annex.changeState $ \s -> s { Annex.fast = True }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue