git-annex/CmdLine
Joey Hess a6c1d9752b
move/copy: option parsing for --from with --to
Allowing --from and --to as an alternative to --from or --to
is hard to do with optparse-applicative!

The obvious approach of (pfrom <|> pto <|> pfromandto) does not work
when pfromandto uses the same option names as pfrom and pto do.
It compiles but the generated parser does not work for all desired
combinations.

Instead, have to parse optionally from and optionally to. When neither
is provided, the parser succeeds, but it's a result that can't be
handled. So, have to giveup after option parsing. There does not seem to
be a way to make an optparse-applicative Parser give up internally
either.

Also, need seek' because I first tried making fto be a where binding,
but that resulted in a hang when git-annex move was run without --from
or --to. I think because startConcurrency was not expecting the stages
value to contain an exception and so ended up blocking.

Sponsored-by: Dartmouth College's DANDI project
2023-01-18 14:42:39 -04:00
..
GitAnnex move/copy: option parsing for --from with --to 2023-01-18 14:42:39 -04:00
GitAnnexShell remove git-annex-shell compat code 2021-10-11 15:36:51 -04:00
Action.hs Improved handling of --time-limit when combined with -J 2022-09-22 12:54:52 -04:00
AnnexSetter.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Batch.hs use lookupKeyStaged in --batch code paths 2022-10-26 14:43:06 -04:00
GitAnnex.hs findkeys: New command, very similar to git-annex find but operating on keys 2023-01-17 14:51:57 -04:00
GitAnnexShell.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
GitRemoteTorAnnex.hs avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
Option.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Seek.hs fix misleading helper function name 2023-01-17 14:25:38 -04:00
Usage.hs fix typo 2022-10-07 12:30:07 -04:00