git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Denton Liu <liu.denton@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	Andrew White <andrew.white@audinate.com>
Subject: Re: [PATCH] Use OPT_CALLBACK and OPT_CALLBACK_F
Date: Tue, 28 Apr 2020 10:34:26 -0700	[thread overview]
Message-ID: <xmqq368n4iql.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200428084543.GC2381876@coredump.intra.peff.net> (Jeff King's message of "Tue, 28 Apr 2020 04:45:43 -0400")

Jeff King <peff@peff.net> writes:

> On Tue, Apr 28, 2020 at 04:36:28AM -0400, Denton Liu wrote:
>
>> In the codebase, there are many options which use OPTION_CALLBACK in a
>> plain ol' struct definition. However, we have the OPT_CALLBACK and
>> OPT_CALLBACK_F macros which are meant to abstract these plain struct
>> definitions away. These macros are useful as they semantically signal to
>> developers that these are just normal callback option with nothing fancy
>> happening.
>
> I think this is worth doing. It's a little easier to read, and sets a
> better example anyone copying the code.

Sure.

And it would be much nicer if the patch actually applies.  I am
getting "SHA-1 information for builtin/push.c is unusable" from 
"am -3".

I'd reject the first hunk on builtin/push.c as that part should be
done with an updated version of the patch that is titled "push:
unset PARSE_OPT_OPTARG for --recurse-submodules" and apply the rest
as an independent clean-up patch.

Thanks, both.





  reply	other threads:[~2020-04-28 17:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  1:31 Bug v2.23.0: command help for 'git push --recurse-submodules' is incorrect Andrew White
2020-04-27  6:44 ` [PATCH] push: unset PARSE_OPT_OPTARG for --recurse-submodules Denton Liu
2020-04-27 12:02   ` Jeff King
2020-04-27 18:54     ` Junio C Hamano
2020-04-28  8:36       ` [PATCH] Use OPT_CALLBACK and OPT_CALLBACK_F Denton Liu
2020-04-28  8:45         ` Jeff King
2020-04-28 17:34           ` Junio C Hamano [this message]
2020-04-28 17:51       ` [PATCH] push: unset PARSE_OPT_OPTARG for --recurse-submodules Junio C Hamano
2020-04-28 22:59         ` Denton Liu

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq368n4iql.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=andrew.white@audinate.com \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).