git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Dec 2017, #02; Thu, 7)

From
Christian Couder <christian.couder@gmail.com>
Date
Dec 8, 2017, 15:36 UTC
Message-ID
<CAP8UFD1zDcwfMBWy5F0KAru9wWS8k6qmKtCRLTZBsN-jLXeysw@mail.gmail.com>
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:
Show 15 quoted lines
> * 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.
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “What's cooking in git.git (Dec 2017, #02; Thu, 7)”
  1. Junio C HamanoDec 7, 2017
  2. Torsten BögershausenDec 8, 2017
  3. Johannes SchindelinDec 8, 2017
  4. Junio C HamanoDec 8, 2017
  5. Christian CouderDec 8, 2017
  6. Junio C HamanoDec 8, 2017
  7. Christian CouderDec 12, 2017
  8. Philip OakleyDec 12, 2017
  9. Jeff HostetlerDec 13, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.