2011-01-06 20:26:57 -04:00
|
|
|
{- git-annex main program
|
|
|
|
-
|
2022-09-23 16:29:28 -04:00
|
|
|
- Copyright 2010-2022 Joey Hess <id@joeyh.name>
|
2011-01-06 20:26:57 -04:00
|
|
|
-
|
2019-03-13 15:48:14 -04:00
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
2011-01-06 20:26:57 -04:00
|
|
|
-}
|
|
|
|
|
2013-11-06 16:33:45 -04:00
|
|
|
{-# LANGUAGE CPP, OverloadedStrings #-}
|
2012-06-26 09:15:47 -04:00
|
|
|
|
2014-01-26 16:25:55 -04:00
|
|
|
module CmdLine.GitAnnex where
|
2011-01-06 20:26:57 -04:00
|
|
|
|
2012-05-18 18:20:53 -04:00
|
|
|
import qualified Git.CurrentRepo
|
2011-01-07 02:15:10 -04:00
|
|
|
import CmdLine
|
2011-01-06 20:26:57 -04:00
|
|
|
import Command
|
2014-04-12 15:59:34 -04:00
|
|
|
import Utility.Env
|
|
|
|
import Annex.Ssh
|
2017-03-30 19:32:58 -04:00
|
|
|
import Annex.Multicast
|
2015-07-13 13:19:20 -04:00
|
|
|
import Types.Test
|
2019-01-04 13:43:53 -04:00
|
|
|
import Types.Benchmark
|
2011-01-06 20:26:57 -04:00
|
|
|
|
2015-07-10 16:32:33 -04:00
|
|
|
import qualified Command.Help
|
2011-01-06 20:26:57 -04:00
|
|
|
import qualified Command.Add
|
|
|
|
import qualified Command.Unannex
|
|
|
|
import qualified Command.Drop
|
|
|
|
import qualified Command.Move
|
|
|
|
import qualified Command.Copy
|
|
|
|
import qualified Command.Get
|
2015-07-09 15:23:14 -04:00
|
|
|
import qualified Command.Fsck
|
2015-07-11 20:43:45 -04:00
|
|
|
import qualified Command.LookupKey
|
2016-04-20 13:49:42 -04:00
|
|
|
import qualified Command.CalcKey
|
2015-07-11 20:43:45 -04:00
|
|
|
import qualified Command.ContentLocation
|
|
|
|
import qualified Command.ExamineKey
|
2016-01-25 16:16:18 -04:00
|
|
|
import qualified Command.MatchExpression
|
2011-01-06 20:26:57 -04:00
|
|
|
import qualified Command.FromKey
|
2015-03-15 14:37:33 -04:00
|
|
|
import qualified Command.RegisterUrl
|
2021-03-01 14:28:24 -04:00
|
|
|
import qualified Command.UnregisterUrl
|
2015-07-02 17:44:25 -04:00
|
|
|
import qualified Command.SetKey
|
2011-01-06 20:26:57 -04:00
|
|
|
import qualified Command.DropKey
|
2020-12-09 13:21:20 -04:00
|
|
|
import qualified Command.Transferrer
|
2012-08-24 17:23:58 -04:00
|
|
|
import qualified Command.TransferKey
|
2013-03-19 16:58:36 -04:00
|
|
|
import qualified Command.TransferKeys
|
2014-12-29 15:16:40 -04:00
|
|
|
import qualified Command.SetPresentKey
|
2015-03-20 11:22:27 -04:00
|
|
|
import qualified Command.ReadPresentKey
|
2015-03-20 11:44:46 -04:00
|
|
|
import qualified Command.CheckPresentKey
|
2012-02-16 16:36:35 -04:00
|
|
|
import qualified Command.ReKey
|
2016-02-25 16:11:13 -04:00
|
|
|
import qualified Command.Adjust
|
2015-07-12 09:25:43 -04:00
|
|
|
import qualified Command.MetaData
|
2014-02-18 17:38:23 -04:00
|
|
|
import qualified Command.View
|
2014-02-18 20:01:56 -04:00
|
|
|
import qualified Command.VAdd
|
add tip about metadata driven views (and more flexible view filtering)
While writing this documentation, I realized that there needed to be a way
to stay in a view like tag=* while adding a filter like tag=work that
applies to the same field.
So, there are really two ways a view can be refined. It can have a new
"field=explicitvalue" filter added to it, which does not change the
"shape" of the view, but narrows the files it shows.
Or, it can have a new view added, which adds another level of
subdirectories.
So, added a vfilter command, which takes explicit values to add to the
filter, and rejects changes that would change the shape of the view.
And, made vadd only accept changes that change the shape of the view.
And, changed the View data type slightly; now components that can match
multiple metadata values can be visible, or not visible.
This commit was sponsored by Stelian Iancu.
2014-02-19 15:10:18 -04:00
|
|
|
import qualified Command.VFilter
|
2014-02-18 17:38:23 -04:00
|
|
|
import qualified Command.VPop
|
2014-02-18 20:16:28 -04:00
|
|
|
import qualified Command.VCycle
|
2011-10-31 15:18:41 -04:00
|
|
|
import qualified Command.Reinject
|
2011-01-06 20:26:57 -04:00
|
|
|
import qualified Command.Fix
|
|
|
|
import qualified Command.Init
|
2011-03-03 17:21:00 -04:00
|
|
|
import qualified Command.Describe
|
2011-03-28 23:22:31 -04:00
|
|
|
import qualified Command.InitRemote
|
2013-04-26 18:22:44 -04:00
|
|
|
import qualified Command.EnableRemote
|
2023-04-18 15:30:49 -04:00
|
|
|
import qualified Command.ConfigRemote
|
2019-04-15 13:05:44 -04:00
|
|
|
import qualified Command.RenameRemote
|
2016-11-14 13:26:34 -04:00
|
|
|
import qualified Command.EnableTor
|
2017-03-30 19:32:58 -04:00
|
|
|
import qualified Command.Multicast
|
2015-07-10 16:26:23 -04:00
|
|
|
import qualified Command.Expire
|
2013-10-23 12:21:59 -04:00
|
|
|
import qualified Command.Repair
|
2015-07-10 16:05:56 -04:00
|
|
|
import qualified Command.Unused
|
2015-07-10 16:15:31 -04:00
|
|
|
import qualified Command.DropUnused
|
2012-05-02 14:59:05 -04:00
|
|
|
import qualified Command.AddUnused
|
2011-01-06 20:26:57 -04:00
|
|
|
import qualified Command.Unlock
|
|
|
|
import qualified Command.Lock
|
|
|
|
import qualified Command.PreCommit
|
2017-02-17 14:04:43 -04:00
|
|
|
import qualified Command.PostReceive
|
2021-05-14 10:59:48 -04:00
|
|
|
import qualified Command.FilterBranch
|
2015-07-10 12:47:35 -04:00
|
|
|
import qualified Command.Find
|
2023-01-17 14:42:29 -04:00
|
|
|
import qualified Command.FindKeys
|
2015-07-10 20:38:11 -04:00
|
|
|
import qualified Command.FindRef
|
2015-07-10 16:32:33 -04:00
|
|
|
import qualified Command.Whereis
|
2021-07-14 14:25:52 -04:00
|
|
|
import qualified Command.WhereUsed
|
2015-07-10 20:46:48 -04:00
|
|
|
import qualified Command.List
|
2015-07-13 10:44:51 -04:00
|
|
|
import qualified Command.Log
|
2011-06-22 18:46:45 -04:00
|
|
|
import qualified Command.Merge
|
2014-07-11 16:45:18 -04:00
|
|
|
import qualified Command.ResolveMerge
|
2015-07-11 10:41:52 -04:00
|
|
|
import qualified Command.Info
|
2015-07-11 10:42:46 -04:00
|
|
|
import qualified Command.Status
|
2017-12-28 11:46:39 -04:00
|
|
|
import qualified Command.Inprogress
|
2011-01-08 15:54:14 -04:00
|
|
|
import qualified Command.Migrate
|
2011-01-06 20:26:57 -04:00
|
|
|
import qualified Command.Uninit
|
2014-04-15 20:13:35 -04:00
|
|
|
import qualified Command.Reinit
|
2014-01-20 16:47:56 -04:00
|
|
|
import qualified Command.NumCopies
|
2021-01-06 14:11:08 -04:00
|
|
|
import qualified Command.MinCopies
|
2011-01-06 20:26:57 -04:00
|
|
|
import qualified Command.Trust
|
|
|
|
import qualified Command.Untrust
|
2011-01-26 15:37:16 -04:00
|
|
|
import qualified Command.Semitrust
|
2015-07-13 10:26:54 -04:00
|
|
|
import qualified Command.Dead
|
2012-10-01 15:12:04 -04:00
|
|
|
import qualified Command.Group
|
2013-10-28 14:08:38 -04:00
|
|
|
import qualified Command.Wanted
|
2015-02-06 15:12:42 -04:00
|
|
|
import qualified Command.GroupWanted
|
2015-04-18 16:04:25 -04:00
|
|
|
import qualified Command.Required
|
2013-10-13 15:40:38 -04:00
|
|
|
import qualified Command.Schedule
|
2012-10-01 15:12:04 -04:00
|
|
|
import qualified Command.Ungroup
|
2017-01-30 16:41:29 -04:00
|
|
|
import qualified Command.Config
|
2015-07-10 20:40:30 -04:00
|
|
|
import qualified Command.Vicfg
|
2011-12-09 20:27:22 -04:00
|
|
|
import qualified Command.Sync
|
git-annex pull and push
Split out two new commands, git-annex pull and git-annex push. Those plus a
git commit are equivilant to git-annex sync.
In a sense, git-annex sync conflates 3 things, and it would have been
better to have push and pull from the beginning and not sync. Although
note that git-annex sync --content is faster than a pull followed by a
push, because it only has to walk the tree once, look at preferred
content once, etc. So there is some value in git-annex sync in speed, as
well as user convenience.
And it would be hard to split out pull and push from sync, as far as the
implementaton goes. The implementation inside sync was easy, just adjust
SyncOptions so it does the right thing.
Note that the new commands default to syncing content, unless
annex.synccontent is explicitly set to false. I'd like sync to also do
that, but that's a hard transition to make. As a start to that
transition, I added a note to git-annex-sync.mdwn that it may start to
do so in a future version of git-annex. But a real transition would
necessarily involve displaying warnings when sync is used without
--content, and time.
Sponsored-by: Kevin Mueller on Patreon
2023-05-16 16:37:30 -04:00
|
|
|
import qualified Command.Pull
|
|
|
|
import qualified Command.Push
|
2015-07-10 21:05:34 -04:00
|
|
|
import qualified Command.Mirror
|
2015-07-13 10:57:49 -04:00
|
|
|
import qualified Command.AddUrl
|
2015-07-13 11:06:41 -04:00
|
|
|
import qualified Command.ImportFeed
|
2013-04-22 17:18:53 -04:00
|
|
|
import qualified Command.RmUrl
|
2015-07-13 11:15:21 -04:00
|
|
|
import qualified Command.Import
|
2017-08-29 14:58:38 -04:00
|
|
|
import qualified Command.Export
|
2011-02-03 18:55:12 -04:00
|
|
|
import qualified Command.Map
|
2012-12-13 15:44:56 -04:00
|
|
|
import qualified Command.Direct
|
|
|
|
import qualified Command.Indirect
|
2011-03-16 15:48:26 -04:00
|
|
|
import qualified Command.Upgrade
|
2015-07-11 00:42:32 -04:00
|
|
|
import qualified Command.Forget
|
2016-11-30 14:35:24 -04:00
|
|
|
import qualified Command.P2P
|
2014-11-12 15:41:15 -04:00
|
|
|
import qualified Command.Proxy
|
2014-11-24 16:14:01 -04:00
|
|
|
import qualified Command.DiffDriver
|
2015-12-04 13:02:56 -04:00
|
|
|
import qualified Command.Smudge
|
2021-11-04 15:02:36 -04:00
|
|
|
import qualified Command.FilterProcess
|
2022-09-23 16:29:28 -04:00
|
|
|
import qualified Command.Restage
|
2015-07-11 00:42:32 -04:00
|
|
|
import qualified Command.Undo
|
2011-03-19 14:33:24 -04:00
|
|
|
import qualified Command.Version
|
2016-11-29 15:41:28 -04:00
|
|
|
import qualified Command.RemoteDaemon
|
2012-06-26 09:15:47 -04:00
|
|
|
#ifdef WITH_ASSISTANT
|
2015-07-13 11:42:42 -04:00
|
|
|
import qualified Command.Watch
|
|
|
|
import qualified Command.Assistant
|
2012-07-25 23:13:01 -04:00
|
|
|
#ifdef WITH_WEBAPP
|
2015-07-13 11:53:42 -04:00
|
|
|
import qualified Command.WebApp
|
2012-07-25 23:13:01 -04:00
|
|
|
#endif
|
2012-06-26 09:15:47 -04:00
|
|
|
#endif
|
2014-08-01 15:09:49 -04:00
|
|
|
import qualified Command.Test
|
2013-05-23 19:00:46 -04:00
|
|
|
import qualified Command.FuzzTest
|
2015-07-11 00:42:32 -04:00
|
|
|
import qualified Command.TestRemote
|
2016-01-12 13:01:44 -04:00
|
|
|
import qualified Command.Benchmark
|
2011-01-06 20:26:57 -04:00
|
|
|
|
2019-01-04 13:43:53 -04:00
|
|
|
cmds :: Parser TestOptions -> TestRunner -> MkBenchmarkGenerator -> [Command]
|
2022-06-29 13:28:08 -04:00
|
|
|
cmds testoptparser testrunner mkbenchmarkgenerator = map addGitAnnexCommonOptions $
|
2015-07-10 16:32:33 -04:00
|
|
|
[ Command.Help.cmd
|
|
|
|
, Command.Add.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Get.cmd
|
|
|
|
, Command.Drop.cmd
|
|
|
|
, Command.Move.cmd
|
|
|
|
, Command.Copy.cmd
|
2015-07-09 15:23:14 -04:00
|
|
|
, Command.Fsck.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Unlock.cmd
|
2015-07-08 12:33:27 -04:00
|
|
|
, Command.Unlock.editcmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Lock.cmd
|
|
|
|
, Command.Sync.cmd
|
git-annex pull and push
Split out two new commands, git-annex pull and git-annex push. Those plus a
git commit are equivilant to git-annex sync.
In a sense, git-annex sync conflates 3 things, and it would have been
better to have push and pull from the beginning and not sync. Although
note that git-annex sync --content is faster than a pull followed by a
push, because it only has to walk the tree once, look at preferred
content once, etc. So there is some value in git-annex sync in speed, as
well as user convenience.
And it would be hard to split out pull and push from sync, as far as the
implementaton goes. The implementation inside sync was easy, just adjust
SyncOptions so it does the right thing.
Note that the new commands default to syncing content, unless
annex.synccontent is explicitly set to false. I'd like sync to also do
that, but that's a hard transition to make. As a start to that
transition, I added a note to git-annex-sync.mdwn that it may start to
do so in a future version of git-annex. But a real transition would
necessarily involve displaying warnings when sync is used without
--content, and time.
Sponsored-by: Kevin Mueller on Patreon
2023-05-16 16:37:30 -04:00
|
|
|
, Command.Pull.cmd
|
|
|
|
, Command.Push.cmd
|
2015-07-10 21:05:34 -04:00
|
|
|
, Command.Mirror.cmd
|
2015-07-13 10:57:49 -04:00
|
|
|
, Command.AddUrl.cmd
|
2015-07-13 11:06:41 -04:00
|
|
|
, Command.ImportFeed.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.RmUrl.cmd
|
2015-07-13 11:15:21 -04:00
|
|
|
, Command.Import.cmd
|
2017-08-29 14:58:38 -04:00
|
|
|
, Command.Export.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Init.cmd
|
|
|
|
, Command.Describe.cmd
|
|
|
|
, Command.InitRemote.cmd
|
|
|
|
, Command.EnableRemote.cmd
|
2023-04-18 15:30:49 -04:00
|
|
|
, Command.ConfigRemote.cmd
|
2019-04-15 13:05:44 -04:00
|
|
|
, Command.RenameRemote.cmd
|
2016-11-14 13:26:34 -04:00
|
|
|
, Command.EnableTor.cmd
|
2017-03-30 19:32:58 -04:00
|
|
|
, Command.Multicast.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Reinject.cmd
|
|
|
|
, Command.Unannex.cmd
|
|
|
|
, Command.Uninit.cmd
|
|
|
|
, Command.Reinit.cmd
|
|
|
|
, Command.PreCommit.cmd
|
2017-02-17 14:04:43 -04:00
|
|
|
, Command.PostReceive.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.NumCopies.cmd
|
2021-01-06 14:11:08 -04:00
|
|
|
, Command.MinCopies.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Trust.cmd
|
|
|
|
, Command.Untrust.cmd
|
|
|
|
, Command.Semitrust.cmd
|
2015-07-13 10:26:54 -04:00
|
|
|
, Command.Dead.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Group.cmd
|
|
|
|
, Command.Wanted.cmd
|
2015-02-06 15:12:42 -04:00
|
|
|
, Command.GroupWanted.cmd
|
2015-04-18 16:04:25 -04:00
|
|
|
, Command.Required.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Schedule.cmd
|
|
|
|
, Command.Ungroup.cmd
|
2017-01-30 16:41:29 -04:00
|
|
|
, Command.Config.cmd
|
2015-07-10 20:40:30 -04:00
|
|
|
, Command.Vicfg.cmd
|
2015-07-11 20:43:45 -04:00
|
|
|
, Command.LookupKey.cmd
|
2016-04-20 13:49:42 -04:00
|
|
|
, Command.CalcKey.cmd
|
2015-07-11 20:43:45 -04:00
|
|
|
, Command.ContentLocation.cmd
|
|
|
|
, Command.ExamineKey.cmd
|
2016-01-25 16:16:18 -04:00
|
|
|
, Command.MatchExpression.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.FromKey.cmd
|
2015-03-15 14:55:44 -04:00
|
|
|
, Command.RegisterUrl.cmd
|
2021-03-01 14:28:24 -04:00
|
|
|
, Command.UnregisterUrl.cmd
|
2015-07-02 17:44:25 -04:00
|
|
|
, Command.SetKey.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.DropKey.cmd
|
2020-12-09 13:21:20 -04:00
|
|
|
, Command.Transferrer.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.TransferKey.cmd
|
|
|
|
, Command.TransferKeys.cmd
|
2014-12-29 15:16:40 -04:00
|
|
|
, Command.SetPresentKey.cmd
|
2015-03-20 11:22:27 -04:00
|
|
|
, Command.ReadPresentKey.cmd
|
2015-03-20 11:44:46 -04:00
|
|
|
, Command.CheckPresentKey.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.ReKey.cmd
|
2016-02-25 16:11:13 -04:00
|
|
|
, Command.Adjust.cmd
|
2015-07-12 09:25:43 -04:00
|
|
|
, Command.MetaData.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.View.cmd
|
|
|
|
, Command.VAdd.cmd
|
|
|
|
, Command.VFilter.cmd
|
|
|
|
, Command.VPop.cmd
|
|
|
|
, Command.VCycle.cmd
|
|
|
|
, Command.Fix.cmd
|
2015-07-10 16:26:23 -04:00
|
|
|
, Command.Expire.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Repair.cmd
|
2015-07-10 16:05:56 -04:00
|
|
|
, Command.Unused.cmd
|
2015-07-10 16:15:31 -04:00
|
|
|
, Command.DropUnused.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.AddUnused.cmd
|
2021-05-14 10:59:48 -04:00
|
|
|
, Command.FilterBranch.cmd
|
2015-07-10 12:47:35 -04:00
|
|
|
, Command.Find.cmd
|
2023-01-17 14:42:29 -04:00
|
|
|
, Command.FindKeys.cmd
|
2015-07-10 20:38:11 -04:00
|
|
|
, Command.FindRef.cmd
|
2015-07-10 16:32:33 -04:00
|
|
|
, Command.Whereis.cmd
|
2021-07-14 14:25:52 -04:00
|
|
|
, Command.WhereUsed.cmd
|
2015-07-10 20:46:48 -04:00
|
|
|
, Command.List.cmd
|
2015-07-13 10:44:51 -04:00
|
|
|
, Command.Log.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Merge.cmd
|
|
|
|
, Command.ResolveMerge.cmd
|
2015-07-11 10:41:52 -04:00
|
|
|
, Command.Info.cmd
|
2015-07-11 10:42:46 -04:00
|
|
|
, Command.Status.cmd
|
2017-12-28 11:46:39 -04:00
|
|
|
, Command.Inprogress.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Migrate.cmd
|
|
|
|
, Command.Map.cmd
|
|
|
|
, Command.Direct.cmd
|
|
|
|
, Command.Indirect.cmd
|
|
|
|
, Command.Upgrade.cmd
|
2015-07-11 00:42:32 -04:00
|
|
|
, Command.Forget.cmd
|
2016-11-30 14:35:24 -04:00
|
|
|
, Command.P2P.cmd
|
2014-11-12 15:41:15 -04:00
|
|
|
, Command.Proxy.cmd
|
2014-11-24 16:14:01 -04:00
|
|
|
, Command.DiffDriver.cmd
|
2015-12-04 13:02:56 -04:00
|
|
|
, Command.Smudge.cmd
|
2021-11-04 15:02:36 -04:00
|
|
|
, Command.FilterProcess.cmd
|
2022-09-23 16:29:28 -04:00
|
|
|
, Command.Restage.cmd
|
2015-07-11 00:42:32 -04:00
|
|
|
, Command.Undo.cmd
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.Version.cmd
|
2016-11-29 15:41:28 -04:00
|
|
|
, Command.RemoteDaemon.cmd
|
2012-06-26 09:15:47 -04:00
|
|
|
#ifdef WITH_ASSISTANT
|
2015-07-13 11:42:42 -04:00
|
|
|
, Command.Watch.cmd
|
|
|
|
, Command.Assistant.cmd
|
2012-07-25 23:13:01 -04:00
|
|
|
#ifdef WITH_WEBAPP
|
2015-07-13 11:53:42 -04:00
|
|
|
, Command.WebApp.cmd
|
2012-11-06 00:52:35 -04:00
|
|
|
#endif
|
2012-06-26 09:15:47 -04:00
|
|
|
#endif
|
2015-07-13 13:19:20 -04:00
|
|
|
, Command.Test.cmd testoptparser testrunner
|
2014-10-14 14:20:10 -04:00
|
|
|
, Command.FuzzTest.cmd
|
2015-07-11 00:42:32 -04:00
|
|
|
, Command.TestRemote.cmd
|
2019-01-04 13:43:53 -04:00
|
|
|
, Command.Benchmark.cmd $
|
|
|
|
mkbenchmarkgenerator $ cmds testoptparser testrunner (\_ _ -> return noop)
|
2011-01-06 20:26:57 -04:00
|
|
|
]
|
|
|
|
|
2022-06-29 13:28:08 -04:00
|
|
|
addGitAnnexCommonOptions :: Command -> Command
|
|
|
|
addGitAnnexCommonOptions c = c { cmdannexoptions = gitAnnexCommonOptions ++ cmdannexoptions c }
|
2021-02-02 15:55:45 -04:00
|
|
|
|
2019-01-04 13:43:53 -04:00
|
|
|
run :: Parser TestOptions -> TestRunner -> MkBenchmarkGenerator -> [String] -> IO ()
|
|
|
|
run testoptparser testrunner mkbenchmarkgenerator args = go envmodes
|
2014-04-29 18:08:10 -04:00
|
|
|
where
|
addon commands
Seems only fair, that, like git runs git-annex, git-annex runs
git-annex-foo.
Implementation relies on O.forwardOptions, so that any options are passed
through to the addon program. Note that this includes options before the
subcommand, eg: git-annex -cx=y foo
Unfortunately, git-annex eats the --help/-h options.
This is because it uses O.hsubparser, which injects that option into each
subcommand. Seems like this should be possible to avoid somehow, to let
commands display their own --help, instead of the dummy one git-annex
displays.
The two step searching mirrors how git works, it makes finding
git-annex-foo fast when "git annex foo" is run, but will also support fuzzy
matching, once findAllAddonCommands gets implemented.
This commit was sponsored by Dr. Land Raider on Patreon.
2021-02-02 16:32:25 -04:00
|
|
|
go [] = dispatch True True args
|
2019-01-04 13:43:53 -04:00
|
|
|
(cmds testoptparser testrunner mkbenchmarkgenerator)
|
2021-02-02 15:55:45 -04:00
|
|
|
[] Git.CurrentRepo.get
|
2015-07-09 11:49:52 -04:00
|
|
|
"git-annex"
|
|
|
|
"manage files with git, without checking their contents in"
|
2014-04-29 18:08:10 -04:00
|
|
|
go ((v, a):rest) = maybe (go rest) a =<< getEnv v
|
|
|
|
envmodes =
|
2015-02-12 16:12:32 -04:00
|
|
|
[ (sshOptionsEnv, runSshOptions args)
|
2014-04-29 18:08:10 -04:00
|
|
|
, (sshAskPassEnv, runSshAskPass)
|
2017-03-30 19:32:58 -04:00
|
|
|
, (multicastReceiveEnv, runMulticastReceive args)
|
2014-04-29 18:08:10 -04:00
|
|
|
]
|