git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: 1.5.4-rc2 plans

From
PHPierre Habouzit <madcoder@artemis.madism.org>
Date
Dec 21, 2007, 10:47 UTC
Message-ID
<20071221104704.GC17701@artemis.madism.org>
In-Reply-To
<7vwsr8lwf7.fsf@gitster.siamese.dyndns.org>
On Fri, Dec 21, 2007 at 12:32:28AM +0000, Junio C Hamano wrote:
Show 12 quoted lines
> 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
Previous: Steven GrimmNext: Pierre Habouzit
Message 7 of 19 in “1.5.4-rc2 plans”
  1. Junio C HamanoDec 21, 2007
  2. Johannes SixtDec 21, 2007
  3. Mike FrysingerDec 21, 2007
  4. Johannes SchindelinDec 22, 2007
  5. Mike FrysingerDec 22, 2007
  6. Steven GrimmDec 21, 2007
  7. Pierre HabouzitDec 21, 2007
  8. git-tag: fix -l switch handling regression.Pierre Habouzit, Dec 21, 2007
  9. Junio C HamanoDec 21, 2007
  10. Pierre HabouzitDec 21, 2007
  11. Junio C HamanoDec 22, 2007
  12. Junio C HamanoDec 21, 2007
  13. Pierre HabouzitDec 21, 2007
  14. parse-options: Add a gitcli(5) man page.Pierre Habouzit, Dec 21, 2007
  15. Johannes SchindelinDec 22, 2007
  16. Pierre HabouzitDec 22, 2007
  17. Junio C HamanoDec 22, 2007
  18. Pierre HabouzitDec 22, 2007
  19. Junio C HamanoDec 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.