add SeekInput (not yet used)
No behavior changes (hopefully), just adding SeekInput and plumbing it through to the JSON display code for later use. Over the course of 2 grueling days. withFilesNotInGit reimplemented in terms of seekHelper should be the only possible behavior change. It seems to test as behaving the same. Note that seekHelper dummies up the SeekInput in the case where segmentPaths' gives up on sorting the expanded paths because there are too many input paths. When SeekInput later gets exposed as a json field, that will result in it being a little bit wrong in the case where 100 or more paths are passed to a git-annex command. I think this is a subtle enough problem to not matter. If it does turn out to be a problem, fixing it would require splitting up the input parameters into groups of < 100, which would make git ls-files run perhaps more than is necessary. May want to revisit this, because that fix seems fairly low-impact.
This commit is contained in:
parent
a1accac084
commit
3a05d53761
88 changed files with 561 additions and 405 deletions
10
Command.hs
10
Command.hs
|
@ -74,13 +74,15 @@ withGlobalOptions :: [[GlobalOption]] -> Command -> Command
|
|||
withGlobalOptions os c = c { cmdglobaloptions = cmdglobaloptions c ++ concat os }
|
||||
|
||||
{- For start stage to indicate what will be done. -}
|
||||
starting:: MkActionItem t => String -> t -> CommandPerform -> CommandStart
|
||||
starting msg t a = next (StartMessage msg (mkActionItem t), a)
|
||||
starting:: MkActionItem actionitem => String -> actionitem -> SeekInput -> CommandPerform -> CommandStart
|
||||
starting msg ai si a = next
|
||||
(StartMessage msg (mkActionItem ai) si, a)
|
||||
|
||||
{- Use when noMessages was used but the command is going to output
|
||||
- usual messages after all. -}
|
||||
startingUsualMessages :: MkActionItem t => String -> t -> CommandPerform -> CommandStart
|
||||
startingUsualMessages msg t a = next (StartUsualMessages msg (mkActionItem t), a)
|
||||
startingUsualMessages :: MkActionItem t => String -> t -> SeekInput -> CommandPerform -> CommandStart
|
||||
startingUsualMessages msg t si a = next
|
||||
(StartUsualMessages msg (mkActionItem t) si, a)
|
||||
|
||||
{- When no message should be displayed at start/end, but messages can still
|
||||
- be displayed when using eg includeCommandAction. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue