Re: [PATCH] builtin-tag: fix fallouts from recent parsopt restriction.

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] builtin-tag: fix fallouts from recent parsopt restriction.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:00

Jeff King [off-list ref] writes:
On Mon, Dec 17, 2007 at 11:52:29AM -0800, Junio C Hamano wrote:
quoted
So in short, for an option that takes optional option-argument:
I agree with everything you said, except...
quoted
   - if it is given as "--long-name", and there is a next word, see if
     that is plausible as its argument.  Get it and signal the caller
     you consumed it, if it is.  Ignore it and signal the caller you
     didn't, if it isn't.
This "plausible" makes me a little nervous, and I wonder why we want to
support this at all. Is it

  1. We have traditionally supported "--abbrev 10"? I don't think this
     is the case.
  2. Consistency with "--non-optional-arg foo"? Do we have any such
     non-optional long arguments? I didn't see any; I think we stick
     with --non-optional-arg=foo everywhere.
  3. More convenience to the user? I don't see how " " is easier than
     "=".
You forgot one case.

    4. Everybody who does _not_ know that we traditionally did not
       support the form would expect "--abbrev 10" and "-n 4" to work.

Re: [PATCH] builtin-tag: fix fallouts from recent parsopt restriction.

From: Jeff King <hidden>
Date: 2016-06-15 22:44:00

On Mon, Dec 17, 2007 at 12:42:51PM -0800, Junio C Hamano wrote:
You forgot one case.

    4. Everybody who does _not_ know that we traditionally did not
       support the form would expect "--abbrev 10" and "-n 4" to work.
I would expect "-n 4" to work, but not "--abbrev 10". But perhaps that
is just me. If that is the expectation, I think the behavior you
outlined is sensible.

-Peff

Re: [PATCH] builtin-tag: fix fallouts from recent parsopt restriction.

From: Pierre Habouzit <hidden>
Date: 2016-06-15 22:44:00

On Mon, Dec 17, 2007 at 08:53:55PM +0000, Jeff King wrote:
On Mon, Dec 17, 2007 at 12:42:51PM -0800, Junio C Hamano wrote:
quoted
You forgot one case.

    4. Everybody who does _not_ know that we traditionally did not
       support the form would expect "--abbrev 10" and "-n 4" to work.
I would expect "-n 4" to work, but not "--abbrev 10". But perhaps that
is just me. If that is the expectation, I think the behavior you
outlined is sensible.
FWIW that's exactly the opposite for me. -n4 is easy to type, and I
always do that. Though on a keyboard, ' ' is under the thumb, '=' is
harder to catch, so I tend to prefer when CLIs don't force me to use =.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help