All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Habouzit <madcoder@artemis.madism.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: 1.5.4-rc2 plans
Date: Fri, 21 Dec 2007 11:47:04 +0100	[thread overview]
Message-ID: <20071221104704.GC17701@artemis.madism.org> (raw)
In-Reply-To: <7vwsr8lwf7.fsf@gitster.siamese.dyndns.org>

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

On Fri, Dec 21, 2007 at 12:32:28AM +0000, Junio C Hamano wrote:
> I've tagged -rc1 last night.  The changes are mostly fixes.  There are
> some remaining issues I'd like to see fixed/decided before 1.5.4.
> 
> One important issue is to identify and fix regressions since 1.5.3
> series.  No "rewrite scripted git-foo completely in C" can be regression
> free, and we had quite a few internal changes during 1.5.4 cycle (not
> just rewrite to C, but C level uses new and improved API such as strbuf
> and parse-options).  Currently I am aware of these regressions:
> 
>  * handling of options, "--abbrev 10 HEAD", "--abbrev=10 HEAD" and
>    "--abbrev HEAD".  The last one does not work for commands that use
>    parse-options.  Pierre is on top of this, I hope.

Hmm now I'm confused, I believed we settled for the: --abbrev 10 HEAD is
forbidden, --abbrev=10 HEAD works, and --abbrev HEAD too. This would
introduce no regressions _yet_ as none of the commands that use
parse-options and take --abbrev accepted the --abbrev 10 form before. I
already sent this once, and assumed you took it, hence me being silent
the last days. Here is it again then.  Of course this does not affects
other long options for which `--long-option arg` still works (if they do
take an argument).

I'd also like to see any kind of form of gitcli(5) be merged for 1.5.4
too, I believe the first version I ever sent. In the thread where I
posted the proposal using `{}` the patch introducing it is the version
formed using:
  * my first proposal for it ;
  * your english fixes squashed on top of it ;
  * a fix wrt the '--no-' prefix and Boolean options that we discussed.
This version describes the current state of things properly IMHO. I can
find the message id if you need, but I don't have the commit locally
anymore atm.

Cheers,

From 37c7baaa82f36d16697fa190635f5d3efbe2a83d Mon Sep 17 00:00:00 2001
From: Pierre Habouzit <madcoder@debian.org>
Date: Fri, 21 Dec 2007 11:41:41 +0100
Subject: [PATCH] Force the sticked form for options with optional arguments.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 parse-options.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/parse-options.c b/parse-options.c
index 574ed31..4f5c55e 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -89,7 +89,7 @@ static int get_value(struct optparse_t *p,
 			*(const char **)opt->value = NULL;
 			return 0;
 		}
-		if (opt->flags & PARSE_OPT_OPTARG && (!arg || *arg == '-')) {
+		if (opt->flags & PARSE_OPT_OPTARG && !p->opt) {
 			*(const char **)opt->value = (const char *)opt->defval;
 			return 0;
 		}
@@ -103,7 +103,7 @@ static int get_value(struct optparse_t *p,
 			return (*opt->callback)(opt, NULL, 1);
 		if (opt->flags & PARSE_OPT_NOARG)
 			return (*opt->callback)(opt, NULL, 0);
-		if (opt->flags & PARSE_OPT_OPTARG && (!arg || *arg == '-'))
+		if (opt->flags & PARSE_OPT_OPTARG && !p->opt)
 			return (*opt->callback)(opt, NULL, 0);
 		if (!arg)
 			return opterror(opt, "requires a value", flags);
@@ -114,7 +114,7 @@ static int get_value(struct optparse_t *p,
 			*(int *)opt->value = 0;
 			return 0;
 		}
-		if (opt->flags & PARSE_OPT_OPTARG && (!arg || !isdigit(*arg))) {
+		if (opt->flags & PARSE_OPT_OPTARG && !p->opt) {
 			*(int *)opt->value = opt->defval;
 			return 0;
 		}
-- 
1.5.4.rc1.1096.g37c7b


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

  parent reply	other threads:[~2007-12-21 10:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21  0:32 1.5.4-rc2 plans Junio C Hamano
2007-12-21  7:26 ` Johannes Sixt
2007-12-21  9:09   ` Mike Frysinger
2007-12-22 15:04     ` Johannes Schindelin
2007-12-22 17:54       ` Mike Frysinger
2007-12-21  8:57 ` Steven Grimm
2007-12-21 10:47 ` Pierre Habouzit [this message]
2007-12-21 10:50   ` [PATCH] git-tag: fix -l switch handling regression Pierre Habouzit
2007-12-21 16:32     ` Junio C Hamano
2007-12-21 21:18       ` Pierre Habouzit
2007-12-22  8:01         ` Junio C Hamano
2007-12-21 11:06   ` 1.5.4-rc2 plans Junio C Hamano
2007-12-21 11:13     ` Pierre Habouzit
2007-12-21 11:19       ` [PATCH] parse-options: Add a gitcli(5) man page Pierre Habouzit
2007-12-22 15:05 ` 1.5.4-rc2 plans Johannes Schindelin
2007-12-22 17:03 ` Pierre Habouzit
2007-12-22 17:16   ` Junio C Hamano
2007-12-22 17:38     ` Pierre Habouzit
2007-12-22 17:52     ` Junio C Hamano

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=20071221104704.GC17701@artemis.madism.org \
    --to=madcoder@artemis.madism.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.