From 70d2ece381990dadb208c28b7ac0fd0cf5c97085 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 3 Oct 2022 13:49:42 -0400 Subject: [PATCH] improve usage These commands operate on not only remotes, but any way a repository can be specified, including "here" etc. Sponsored-by: Graham Spencer on Patreon --- CmdLine/Usage.hs | 2 ++ Command/Dead.hs | 2 +- Command/Semitrust.hs | 2 +- Command/Trust.hs | 2 +- Command/Untrust.hs | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CmdLine/Usage.hs b/CmdLine/Usage.hs index ed390d0e8f..f3434d7091 100644 --- a/CmdLine/Usage.hs +++ b/CmdLine/Usage.hs @@ -60,6 +60,8 @@ paramNumRange :: String paramNumRange = "NUM|RANGE" paramRemote :: String paramRemote = "REMOTE" +paramRemote :: String +paramRemote = "REPOSITORY" paramField :: String paramField = "FIELD" paramGlob :: String diff --git a/Command/Dead.hs b/Command/Dead.hs index b304514ead..fcac38a27e 100644 --- a/Command/Dead.hs +++ b/Command/Dead.hs @@ -16,7 +16,7 @@ import Git.Types cmd :: Command cmd = command "dead" SectionSetup "hide a lost repository or key" - (paramRepeating paramRemote) (seek <$$> optParser) + (paramRepeating paramRepository) (seek <$$> optParser) data DeadOptions = DeadRemotes [RemoteName] | DeadKeys [Key] diff --git a/Command/Semitrust.hs b/Command/Semitrust.hs index 5bf556ed30..c9a7336c3f 100644 --- a/Command/Semitrust.hs +++ b/Command/Semitrust.hs @@ -14,7 +14,7 @@ import Command.Trust (trustCommand) cmd :: Command cmd = command "semitrust" SectionSetup "return repository to default trust level" - (paramRepeating paramRemote) (withParams seek) + (paramRepeating paramRepository) (withParams seek) seek :: CmdParams -> CommandSeek seek = trustCommand "semitrust" SemiTrusted diff --git a/Command/Trust.hs b/Command/Trust.hs index 44fb968e3d..b251fb194e 100644 --- a/Command/Trust.hs +++ b/Command/Trust.hs @@ -18,7 +18,7 @@ import qualified Data.Set as S cmd :: Command cmd = command "trust" SectionSetup "trust a repository" - (paramRepeating paramRemote) (withParams seek) + (paramRepeating paramRepository) (withParams seek) seek :: CmdParams -> CommandSeek seek = trustCommand "trust" Trusted diff --git a/Command/Untrust.hs b/Command/Untrust.hs index 88973596ce..9126cbed57 100644 --- a/Command/Untrust.hs +++ b/Command/Untrust.hs @@ -13,7 +13,7 @@ import Command.Trust (trustCommand) cmd :: Command cmd = command "untrust" SectionSetup "do not trust a repository" - (paramRepeating paramRemote) (withParams seek) + (paramRepeating paramRepository) (withParams seek) seek :: CmdParams -> CommandSeek seek = trustCommand "untrust" UnTrusted