git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>,
	git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH 07/25] parse-options: make some arguments optional, add  callbacks.
Date: Tue, 16 Oct 2007 18:53:19 +0200	[thread overview]
Message-ID: <20071016165319.GC13946@artemis.corp> (raw)
In-Reply-To: <Pine.LNX.4.64.0710161742040.25221@racer.site>

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

On Tue, Oct 16, 2007 at 04:44:44PM +0000, Johannes Schindelin wrote:
> Hi,
> 
> On Tue, 16 Oct 2007, Ren? Scharfe wrote:
> 
> > Pierre Habouzit schrieb:
> > > This bit is to allow to aggregate options with arguments together when
> > > the argument is numeric.
> > > 
> > >     +#if 0
> > >     +		/* can be used to understand -A1B1 like -A1 -B1 */
> > >     +		if (flag & OPT_SHORT && opt->opt && isdigit(*opt->opt)) {
> > >     +			*(int *)opt->value = strtol(opt->opt, (char **)&opt->opt, 10);
> > >     +			return 0;
> > >     +		}
> > >     +#endif
> > 
> > I don't like it, it complicates number options with unit suffixes (e.g.
> > --windows-memory of git-pack-objects).
> 
> Why?  It only means that you cannot say -W10mxabc instead of -W10m xabc.  
> 
> Remember: this is a special case for OPT_INTEGER.  Nothing to do with 
> OPT_SIZE, which you'd probably implement as a callback.

  Yeah but the point is that you can't migrate an option currently being
an integer to an OPT_SIZE because of that (see my other mail). Meaning
that once an argument is of type OPT_INTEGER you can't change it's type
in the future _AT ALL_ without breaking backward compatibility badly.
I'd say it's a rather sucky design.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-10-16 16:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-16  8:16 [parse-options] proposal for merge, take 1 Pierre Habouzit
2007-10-16  8:20 ` Pierre Habouzit
2007-10-16  8:43   ` Pierre Habouzit
     [not found] ` <1192523998-19474-1-git-send-email-madcoder@debian.org>
     [not found]   ` <1192523998-19474-2-git-send-email-madcoder@debian.org>
     [not found]     ` <1192523998-19474-3-git-send-email-madcoder@debian.org>
     [not found]       ` <1192523998-19474-4-git-send-email-madcoder@debian.org>
     [not found]         ` <1192523998-19474-5-git-send-email-madcoder@debian.org>
     [not found]           ` <1192523998-19474-6-git-send-email-madcoder@debian.org>
     [not found]             ` <1192523998-19474-7-git-send-email-madcoder@debian.org>
2007-10-16  8:45               ` [PATCH 07/25] parse-options: make some arguments optional, add callbacks Pierre Habouzit
2007-10-16 13:18                 ` Johannes Schindelin
2007-10-16 16:38                 ` René Scharfe
2007-10-16 16:44                   ` Johannes Schindelin
2007-10-16 16:53                     ` Pierre Habouzit [this message]
2007-10-16 17:21                       ` Nicolas Pitre
2007-10-16 17:04                     ` René Scharfe
2007-10-16 16:44                   ` Nicolas Pitre
2007-10-16 16:50                   ` Pierre Habouzit
2007-10-17  4:44                     ` Shawn O. Pearce
2007-10-17 18:00                       ` Johannes Schindelin
     [not found]               ` <1192523998-19474-8-git-send-email-madcoder@debian.org>
     [not found]                 ` <1192523998-19474-9-git-send-email-madcoder@debian.org>
2007-10-16  8:55                   ` [PATCH 09/25] Port builtin-add.c to use the new option parser Michael Witten
2007-10-16  9:36                     ` Michael Witten
2007-10-16 13:17                     ` Johannes Schindelin
2007-10-16 15:36                       ` Michael Witten
2007-10-16 16:55                     ` Pierre Habouzit
2007-10-16 17:56         ` [PATCH 04/25] Rework make_usage to print the usage message immediately Alex Riesen
2007-10-16 22:15           ` Pierre Habouzit
2007-10-17 19:06             ` Alex Riesen
     [not found] ` <1192523721-18985-1-git-send-email-madcoder@debian.org>
2007-10-17  7:24   ` [PATCH 01/25] Add a simple option parser Shawn O. Pearce
2007-10-17  7:52     ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071016165319.GC13946@artemis.corp \
    --to=madcoder@debian.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=rene.scharfe@lsrfire.ath.cx \
    --cc=spearce@spearce.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).