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

Re: Incorrect diff-parseopt conversion?

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
May 22, 2019, 00:35 UTC
Message-ID
<791da98b-4065-e477-92cb-ceac80cc04e6@ramsayjones.plus.com>
In-Reply-To
<CACsJy8BHeVDDnEYXaOAPtEoesTVNCiPGSgnJYjtL6aYSU0-J5A@mail.gmail.com>
On 22/05/2019 01:11, Duy Nguyen wrote:
Show 23 quoted lines
> On Wed, May 22, 2019 at 2:56 AM Ramsay Jones
> <ramsay@ramsayjones.plus.com> wrote:
>>
>> Hi Duy,
>>
>> I am in the middle of rebasing a long running branch onto
>> current master (v2.22.0-rc1) and noticed something odd with
>> commit af2f368091 ("diff-parseopt: convert --output-*",
>> 2019-02-21).
>>
>> As part of the branch I am rebasing, I have defined a new
>> OPT_LL_CALLBACK() macro[1], which I had intended to apply to
>> the 'output' option to diff. However, commit af2f368091
>> defines that option thus:
>>
>> +               { OPTION_CALLBACK, 0, "output", options, N_("<file>"),
>> +                 N_("Output to a specific file"),
>> +                 PARSE_OPT_NONEG, NULL, 0, diff_opt_output },
>>
>> Note that the 'option type' is given as OPTION_CALLBACK, not
>> as OPTION_LOWLEVEL_CALLBACK. Is this intended?
> 
> Yeah I think this is correct (phew!).

OK, I just had a look at the code in parse-options.c. Hmm, somewhat ugly! :-D

Thanks.

ATB, Ramsay Jones

Previous: Duy NguyenNext: Duy Nguyen
Message 3 of 6 in “Incorrect diff-parseopt conversion?”
  1. Ramsay JonesMay 21, 2019
  2. Duy NguyenMay 22, 2019
  3. Ramsay JonesMay 22, 2019
  4. Duy NguyenMay 24, 2019
  5. Ævar Arnfjörð BjarmasonMay 24, 2019
  6. Duy NguyenMay 25, 2019

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.