mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix(repo): reject --repo on commands that act on no repository
tea repo list -R acme/service listed the account's repositories and tea repo create foo -R alice/project created alice/foo: the flag was silently ignored. repo list, repo create, repo migrate and search repo now fail with a usage error that suggests the intended command, such as "--repo is not used by repo list; did you mean: tea repo list acme". repo list takes the owner as an argument (--owner still works), and repo create accepts OWNER/NAME, creating in the organization OWNER. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
7 files changed
+96
-7
No files matched your search
@@ -36,7 +36,7 @@ const (
|
||||
// help omits --repo, --remote and --cwd.
|
||||
var noRepoCommands = []string{
|
||||
"tea admin", "tea alias", "tea auth", "tea completion", "tea config", "tea help", "tea man", "tea org",
|
||||
"tea repo create", "tea repo list", "tea search repo", "tea ssh-key", "tea team", "tea version",
|
||||
"tea repo create", "tea repo list", "tea repo migrate", "tea search repo", "tea ssh-key", "tea team", "tea version",
|
||||
}
|
||||
|
||||
// writeHelp prints the help page of cmd.
|
||||
|
||||
Reference in new issue
Block a user