From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG
Date: Thu, 13 Mar 2014 12:00:24 -0700 [thread overview]
Message-ID: <xmqqfvmlj54n.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CACsJy8Dw=43m_4KzAxwCqLsFq2E23rT=bT3zmGUue6RYTnrOYg@mail.gmail.com> (Duy Nguyen's message of "Thu, 13 Mar 2014 06:37:41 +0700")
Duy Nguyen <pclouds@gmail.com> writes:
> On Sat, Mar 8, 2014 at 2:20 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Looking at "git grep -B3 OPT_NONEG" output, it seems that NONEG is
>> associated mostly with OPTION_CALLBACK and OPTION_SET_INT in the
>> existing code.
>>
>> Perhaps OPT_SET_INT should default to not just OPT_NOARG but also
>> OPT_NONEG?
>
> There are OPT_SET_INT() that should not have NONEG in current code. So
> there are two sets of SET_INT anyway. Either we convert them all to a
> new macro that takes an extra flag, or we add OPT_SET_INT_NONEG() that
> covers one set and leave the other set alone.
Are you forgetting the third alternative, of swapping the default,
if the ones that do not want NONEG are in the minority, to reduce
the number of spelled-out instances?
next prev parent reply other threads:[~2014-03-13 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 1:38 Microproject idea: new OPT_* macros for PARSE_OPT_NONEG Duy Nguyen
2014-03-07 7:39 ` Michael Haggerty
2014-03-07 7:54 ` Duy Nguyen
2014-03-07 19:20 ` Junio C Hamano
2014-03-12 23:37 ` Duy Nguyen
2014-03-13 19:00 ` Junio C Hamano [this message]
2014-03-13 23:34 ` Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqfvmlj54n.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.