Re: [PATCH v6 08/10] submodule: add a helper to check if it is safe to write to .gitmodules
- From
Antonio Ospite <ao2@ao2.it>
- Date
- Oct 6, 2018, 09:19 UTC
- Message-ID
- <20181006111904.cb45cb24e097ad86f7525fcd@ao2.it>
- In-Reply-To
- <CAGZ79kbaeRVBLhYiqzisADHs+Af+c2giXcsCySAEe4jue_rWwA@mail.gmail.com>
On Fri, 5 Oct 2018 16:50:10 -0700 Stefan Beller <sbeller@google.com> wrote:
Show 8 quoted lines
> > static int module_config(int argc, const char **argv, const char *prefix)
> > {
> > + enum {
> > + CHECK_WRITEABLE = 1
> > + } command = 0;
>
> Can we have the default named? Then we would only use states
> from within the enum?The default would mean:
"no command passed as a CLI *option*"
I copied this style from builtin/bisect--helper.c::cmd_bisect__helper() and it's also used in builtin/rebase--helper.c
I can add a name for the default enum value but I am not sure what it should be: NO_COMMAND_OPTION, COMMAND_DEFAULT, MODE_DEFAULT?
Ciao, Antonio
-- Antonio Ospite https://ao2.it https://twitter.com/ao2it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?