git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (Dec 2017, #02; Thu, 7)
Date: Fri, 8 Dec 2017 16:36:13 +0100	[thread overview]
Message-ID: <CAP8UFD1zDcwfMBWy5F0KAru9wWS8k6qmKtCRLTZBsN-jLXeysw@mail.gmail.com> (raw)
In-Reply-To: <xmqqfu8me7ot.fsf@gitster.mtv.corp.google.com>

On Thu, Dec 7, 2017 at 7:04 PM, Junio C Hamano <gitster@pobox.com> wrote:


> * cc/skip-to-optional-val (2017-12-07) 7 commits
>  - t4045: test 'diff --relative' for real
>  - t4045: reindent to make helpers readable
>  - diff: use skip-to-optional-val in parsing --relative
>  - diff: use skip_to_optional_val_default()
>  - diff: use skip_to_optional_val()
>  - index-pack: use skip_to_optional_val()
>  - git-compat-util: introduce skip_to_optional_val()
>
>  Introduce a helper to simplify code to parse a common pattern that
>  expects either "--key" or "--key=<something>".
>
>  Even though I queued fixes for "diff --relative" on top, it may
>  still want a final reroll to make it harder to misuse by allowing
>  NULL at the valp part of the argument.

Yeah, I already implemented that and it will be in the next v3 version.

> Also s/_val/_arg/.

I am not sure that is a good idea, because it could suggest that the
functions are designed to parse only command option arguments, while
they can be used to parse any "key=val" string where "key" is also
allowed.

>  cf. <xmqqh8t6o9me.fsf@gitster.mtv.corp.google.com>
>  cf. <xmqqd13uo9d1.fsf@gitster.mtv.corp.google.com>

It doesn't look like s/_val/_arg/ was discussed in the above messages.

  parent reply	other threads:[~2017-12-08 15:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 18:04 What's cooking in git.git (Dec 2017, #02; Thu, 7) Junio C Hamano
2017-12-08  5:49 ` Torsten Bögershausen
2017-12-08 11:38   ` Johannes Schindelin
2017-12-08 20:58     ` Junio C Hamano
2017-12-08 15:36 ` Christian Couder [this message]
2017-12-08 15:56   ` Junio C Hamano
2017-12-12  9:30 ` Christian Couder
2017-12-12 16:53   ` Philip Oakley
2017-12-13 15:58   ` Jeff Hostetler

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=CAP8UFD1zDcwfMBWy5F0KAru9wWS8k6qmKtCRLTZBsN-jLXeysw@mail.gmail.com \
    --to=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).