Jeff King <> writes:

> ... But what is the normalized form for an
> optional argument? It either needs to be consistently "sticked" or
> "unsticked", either:
>   set -- -S '' --     ;# default
>   set -- -S 'foo' --  ;# not default
> or
>   set -- -S --    ;# default
>   set -- -Sfoo -- ;# not default
> so that reading the normalized form is unambiguous.

The analysis makes sense.  Either form do not let you distinguish
between the case where the end user wanted to explicitly pass "" as
the optional parameter to -S and the case where she gave -S without
any optional parameter, though.

Which pretty much agrees with j6t's (and my earlier) comment that
there is no way to solve this issue completely, I think.

It is an acceptable compromise to use your suggestion as a solution
that works for cases other than passing an explicit empty string as
an optional parameter, I would say, if the limitation is clearly


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to