docs: clarify archived flag on repo clone

This commit is contained in:
Kai Armstrong 2023-11-29 16:30:42 -06:00
parent 6a57590b9f
commit 9140521625
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View File

@ -77,6 +77,9 @@ func NewCmdClone(f *cmdutils.Factory, runE func(*CloneOptions, *ContextOpts) err
# Clone all repos in a group
$ glab repo clone -g everyonecancontribute --paginate
# Clone all non-archived repos in a group
$ glab repo clone -g everyonecancontribute --archived=false --paginate
# Clone from a self-hosted instance
$ GITLAB_HOST=salsa.debian.org glab repo clone myrepo
`),
@ -134,7 +137,7 @@ func NewCmdClone(f *cmdutils.Factory, runE func(*CloneOptions, *ContextOpts) err
repoCloneCmd.Flags().StringVarP(&opts.GroupName, "group", "g", "", "Specify group to clone repositories from")
repoCloneCmd.Flags().BoolVarP(&opts.PreserveNamespace, "preserve-namespace", "p", false, "Clone the repo in a subdirectory based on namespace")
repoCloneCmd.Flags().BoolVarP(&opts.Archived, "archived", "a", false, "Limit by archived status. Used with --group flag")
repoCloneCmd.Flags().BoolVarP(&opts.Archived, "archived", "a", false, "Limit by archived status. Use with -a=false to exclude archived repositories. Used with --group flag")
repoCloneCmd.Flags().BoolVarP(&opts.IncludeSubgroups, "include-subgroups", "G", true, "Include projects in subgroups of this group. Default is true. Used with --group flag")
repoCloneCmd.Flags().BoolVarP(&opts.Owned, "mine", "m", false, "Limit by projects in the group owned by the current authenticated user. Used with --group flag")
repoCloneCmd.Flags().StringVarP(&opts.Visibility, "visibility", "v", "", "Limit by visibility {public, internal, or private}. Used with --group flag")

View File

@ -42,6 +42,9 @@ $ glab repo clone 4356677 # finds the project by the ID provided and clones it
# Clone all repos in a group
$ glab repo clone -g everyonecancontribute --paginate
# Clone all non-archived repos in a group
$ glab repo clone -g everyonecancontribute --archived=false --paginate
# Clone from a self-hosted instance
$ GITLAB_HOST=salsa.debian.org glab repo clone myrepo
@ -52,7 +55,7 @@ $ GITLAB_HOST=salsa.debian.org glab repo clone myrepo
```plaintext
-g, --group string Specify group to clone repositories from
-p, --preserve-namespace Clone the repo in a subdirectory based on namespace
-a, --archived Limit by archived status. Used with --group flag
-a, --archived Limit by archived status. Use with -a=false to exclude archived repositories. Used with --group flag
-G, --include-subgroups Include projects in subgroups of this group. Default is true. Used with --group flag (default true)
-m, --mine Limit by projects in the group owned by the current authenticated user. Used with --group flag
-v, --visibility string Limit by visibility {public, internal, or private}. Used with --group flag