From: Pierre Habouzit <madcoder@debian.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [RFH] convert shortlog to use parse_options
Date: Thu, 13 Dec 2007 21:53:05 +0100 [thread overview]
Message-ID: <20071213205305.GA5423@artemis.madism.org> (raw)
In-Reply-To: <7vzlwe1jeb.fsf@gitster.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 2351 bytes --]
On Thu, Dec 13, 2007 at 07:31:24PM +0000, Junio C Hamano wrote:
> So I am not entirely opposed to your version, nor I am claiming my
> suggestion is better. However, I just thought that "some parameters you
> MUST stick to the flag" might create confusion to the end users, and I
> wanted to see if others can come up with a less confusing alternative.
> And the way I did so was to keep the discussion going by stirring the
> pot a bit.
I understand that, and I hope I wasn't sounding harsh at all, I was just
debating. Note that I don't like the asymmetry of some options needing a
specific syntax whereas all the rest is lax. It's cumbersome at the very
least. Though, to me there is one gain: when the user uses the
--long-opt=foo version you are _sure_ about what he meant. When you have
--long-opt foo you're not.
Your proposal tries hard to do what the user meant, with a reasonable
chance of being wrong. My proposal is on the conservative side, but
generate totally incomprehensible errors: if you do
$ git describe --abbrev 10 HEAD
with my patch you get a not very nice
fatal: Not a valid object name 10
as an answer. which is kind of going back to the kind of situations
parse-options is trying to avoid in the first place. I wouldn't be
really annoyed by my solution if we were able to generate an
intelligible error message instead. But guess what, if we were able to
do so, we would be able to fix the ambiguity in the first place *sigh*.
So maybe the thing would be to sleep on a it a bit and not taking any of
my patches yet (not even in pu) and let people think. It's not a major
problem, though it's one that must be fixed before 1.5.4 because we
don't want a broken option parser ever be released.
Note that there is another path, that would be to disallow mixing of
options with real arguments, and have an option separator (though with
`--` having a distinct meaning in git, that wouldn't be that easy). But
sadly some git commands already allowed such a thing, so imposing it in
parse-options would be backward incompatible for those. And I believe
many people are attached to this feature anyways.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-12-13 20:53 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-13 5:52 [RFH] convert shortlog to use parse_options Jeff King
2007-12-13 9:06 ` Pierre Habouzit
2007-12-13 9:10 ` Jeff King
2007-12-13 9:35 ` Pierre Habouzit
2007-12-13 10:26 ` [PATCH 1/2] parseopt: Enforce the use of the sticked form for optional arguments Pierre Habouzit
2007-12-13 10:27 ` [PATCH 2/2] parseopt: Add a gitcli(5) man page Pierre Habouzit
2007-12-13 11:04 ` Wincent Colaiuta
2007-12-13 13:56 ` Pierre Habouzit
2007-12-17 7:28 ` [PATCH] (squashme) gitcli documentation fixups Junio C Hamano
2007-12-17 8:51 ` Pierre Habouzit
2007-12-17 8:57 ` Pierre Habouzit
2007-12-17 7:28 ` [PATCH] builtin-tag: fix fallouts from recent parsopt restriction Junio C Hamano
2007-12-17 9:07 ` Pierre Habouzit
2007-12-17 10:53 ` Junio C Hamano
2007-12-17 10:58 ` Pierre Habouzit
2007-12-17 11:21 ` Junio C Hamano
2007-12-17 12:33 ` Pierre Habouzit
2007-12-17 19:52 ` Junio C Hamano
2007-12-17 20:31 ` Jeff King
2007-12-17 20:42 ` Pierre Habouzit
2007-12-17 21:01 ` Pierre Habouzit
2007-12-17 23:07 ` Jeff King
2007-12-17 23:14 ` Pierre Habouzit
2007-12-17 20:42 ` Junio C Hamano
2007-12-17 20:53 ` Jeff King
2007-12-17 21:24 ` Pierre Habouzit
2007-12-17 21:11 ` Pierre Habouzit
2007-12-17 11:13 ` Junio C Hamano
2007-12-17 11:56 ` Pierre Habouzit
2007-12-17 11:59 ` Pierre Habouzit
2007-12-13 17:40 ` [RFH] convert shortlog to use parse_options Junio C Hamano
2007-12-13 18:03 ` Pierre Habouzit
2007-12-13 18:07 ` Pierre Habouzit
2007-12-13 19:49 ` Junio C Hamano
2007-12-13 18:28 ` Kristian Høgsberg
2007-12-13 18:47 ` Kristian Høgsberg
2007-12-13 20:46 ` Junio C Hamano
2007-12-14 4:08 ` Jeff King
2007-12-14 5:59 ` Junio C Hamano
2007-12-14 8:33 ` Andreas Ericsson
2007-12-14 8:39 ` Pierre Habouzit
2007-12-14 20:34 ` Junio C Hamano
2007-12-15 11:03 ` Pierre Habouzit
2007-12-17 7:27 ` Junio C Hamano
2007-12-17 7:36 ` Andreas Ericsson
2007-12-17 7:59 ` Junio C Hamano
2007-12-17 9:38 ` Andreas Ericsson
2007-12-17 16:21 ` Kristian Høgsberg
2007-12-13 19:31 ` Junio C Hamano
2007-12-13 20:53 ` Pierre Habouzit [this message]
2007-12-13 9:29 ` Pierre Habouzit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071213205305.GA5423@artemis.madism.org \
--to=madcoder@debian.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).