-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arg_from_usage(): required values not being enforced when followed by another option #665
Comments
Thanks for filing this report, this looks like a bug and I'll start investigating it! There may be a way to force what you're looking for by using the Also, a side note not related to this issue, if you have multiple .args_from_usage("
--in-reply-to [Message-Id] 'Make the first mail a reply to the specified Message-Id'
--no-from 'Don't include in-body \"From:\" headers when formatting patches authored by others'
-v, --reroll-count=[N] 'Mark the patch series as PATCH vN'
--stdout 'Write patches to stdout rather than files'
--subject-prefix [Subject-Prefix] 'Use [Subject-Prefix] instead of the standard [PATCH] prefix'") |
@ajdlinux I'm not able to reproduce this. Can you post a link to the file where this happening, it may be related to another setting or something that you're using. |
Branch: https://github.com/ajdlinux/git-series/tree/format-subject-prefix I'm not very familiar with this codebase (forked it just to add a single new option) so there might be something in there I'm missing. Will look into it shortly when I've got a bit more time. |
@ajdlinux sorry it's take so long! I've been doing a lot of traveling and then the holidays came around. I'm finally able to reproduce this, and it's next up on the fix list! I'll let you know what I find. |
This is fixed in #796 One thing to note is that you should add |
Thanks @kbknapp, apologies for not following this up, I'd forgotten about this! |
I've got a SubCommand defined with a few options that have required values:
If I use either the
--subject-prefix
or-v
options alone, without specifying a value, it complains:But if I use
--subject-prefix
followed by-v 2
, it gives me an empty value for--subject-prefix
:And vice versa:
This is shown in both 2.10.0 and 2.12.1.
(Apologies for the poor nature of this report, I'm in the middle of yak shaving so I may well have missed something here.)
The text was updated successfully, but these errors were encountered: