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

From: Junio C Hamano <[email-masked]>
Date: Sun, 19 Oct 2008 13:11:31 -0700

Miklos Vajna <[email-masked]> writes:

> Signed-off-by: Miklos Vajna <[email-masked]>
> ---
>
> On Sat, Oct 18, 2008 at 03:17:23AM +0200, Miklos Vajna <[email-masked]> 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?