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

Re: [PATCH] parse-opt: migrate builtin-checkout-index.

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 19, 2008, 20:11 UTC
Message-ID
<7vabd073bg.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1224441040-5071-1-git-send-email-vmiklos@frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
Show 21 quoted lines
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>
> On Sat, Oct 18, 2008 at 03:17:23AM +0200, Miklos Vajna <vmiklos@frugalware.org> wrote:
>> > This adds a new feature to say --no-z from the command line, doesn't
>> > it?
>> > And I suspect the feature is broken ;-).
>>
>> Right, I fixed this in option_parse_z(). --no-z should set
>> line_termination to \n instead of 1.
>
> Originally in option_parse_z() I had
>
>         line_termination = unset;
>
> which is in fact right, because (as Pierre pointed out) unset for short
> options are always false, but I changed it to
>
>         line_termination = 0;
>
> to make it more readable.

I think Pierre's comment is short-sighted. Think of what would happen when somebody adds "--nul" as a longer equivalent to "-z", since it is extremely easy to do things like that with the use of parse-opt API?

Previous: Miklos VajnaNext: Pierre Habouzit
Message 3 of 5 in “parse-opt: migrate builtin-checkout-index.”
  1. parse-opt: migrate builtin-checkout-index.Miklos Vajna, Oct 19, 2008
  2. Miklos VajnaOct 19, 2008
  3. Junio C HamanoOct 19, 2008
  4. Pierre HabouzitOct 19, 2008
  5. Junio C HamanoOct 19, 2008

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.