Archive flag for group clone not ~~functional~~ documented
The PR #349 introduced the ability to clone a whole GitLab group. Supposedly the -a flag should trigger filtering of archive repos. It isn't clear from the docs which way the filtering happens (does -a exclude archived repos or include them?) but either way it doesn't seem to do anything. I was looking at this in relation to #963 hoping there was a dry run option of some kind that would net me a list of non-archive repos in a group. Instead it seems like it just always finds all repos, archived or otherwise.
So this flag seems to be kinda funky:
- if you don't set the flag it will get all the repos, even the arrived ones
- If you set the flag with simply
-aor-a=trueit will return ONLY the archived ones - if you explicitly set the flag to
-a=falseit will filter out the archived repos.
I am kinda split about this flag. From one side it works just fine, but it's also overly complex and hard to understand.
From one side it works just fine, but it's also overly complex and hard to understand.
Also it's not documented in --help. I even tried something like this, but I didn't use the equals sign, I believe I dried just -a true and -a false just as a stab in the dark. I'll go back and try it with the = syntax.
I really don't know why you'd want to clone only archived repos, but I guess having the 3 way ability could be useful. Honestly that functionality would be more utilitarian for me if it was on my proposed list command (#958).
I can confirm -a=false does what I need, confusingly -a false silently does what both -a and -a=true does hence by conclusion that the flag was not behaving.
I don't know what argument parser you are using for this project but the = requirement is a bit unconventional. Workable, but if there was an easy way to be more flexible with that I'd say go for it.
More importantly, this 3 way usage and the correct syntax should be documented in --help.
It looks like similar issues exist with other flags. For example the -G flag exists, but already defaults to true. For it to be useful one has to use -G=false, but this is not evident from the --help page. Also it's just weird to have flags for things that are already the default behavior instead of flags for triggering something other than the defaults.
This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.