Skip to contentSkip to conversation

1.5.4-rc2 plans

PATCH In review Junio C Hamano 7 participants 19 messages Jun 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

* handling of EDITOR in git commit and git tag is currently different. It expects "vi" not "vi --some-funny-option". I sent out a for-discussion patch after seeing Steven's and Luciano's.

but I am sure there must be others that we haven't even identified.

Also there have been handful usability issues, which can be solved without incompatible changes:

* Should "git stash" stop doing anything useful? I think the patch from Nana today may be a reasonable compromise, although I still think fundamentally different behaviour for the same command configurable per-user is not very nice (we have precedent in "git clean" already, though, but "git clean" is inherently dangerous command, and "git stash" is much more useful and the issue impacts more people).

* Introduction of "<tree>:./path" (Dscho). I could be talked into accepting the patch if it is useful to people who live deep within subdirectories.

* Making commit log message cleansing optionally less aggressive. I do not think we have seen the end of the thread yet, but I think Linus's "three cleansing levels" approach is on the right track.

I'd like to see the above resolved and hopefully 12 other regressions identified and fixed before the end of the year, when -rc2 can hopefully happen.

The following technical issues have been raised but not resolved and I do not expect the resolution to be part of 1.5.4.

* Authenticated pserver (Ævar Arnfjörð Bjarmason). It needs security audit of the code and also the password storage needs to be decided. This can wait post 1.5.4.

* Threaded "repack -a -d -f" when having a verify tight pack suffers from massive malloc(3) memory fragmentation, which we cannot do much about.

* Rebase using "format-patch | am" machinery has issues when dealing with a mostly-text change that includes NUL (or anything you cannot e-mail patch for). The workaround is "rebase -m" which unfortunatly is slow. I am working on rewriting cherry-pick whenever I find time to address it, though.

* Handling of trailing blank lines does not mesh well with the way diff and apply whitespace logic is done.

#1 lore raw
Quoted 3 lines · Junio C Hamano

* handling of EDITOR in git commit and git tag is currently different. It expects "vi" not "vi --some-funny-option". I sent out a for-discussion patch after seeing Steven's and Luciano's.

I'm perfectly fine with your approach (punt and let the shell figure it out). It's certainly a lot less code change than mine. However, if you want another rev of mine with Johannes' comments taken into account, I should be able to do that in the next day or two.

-Steve

#2 lore raw
In reply to Junio C Hamano
Quoted 9 lines · Junio C Hamano

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:

Quoted 3 lines

* 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 <[email protected]>
Date: Fri, 21 Dec 2007 11:41:41 +0100
Subject: [PATCH] Force the sticked form for options with optional arguments.

---
 parse-options.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
parse-options.c +3 -3
index 574ed31..4f5c55e 100644
@@ -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;
 		}
Signature · 1 line
1.5.4.rc1.1096.g37c7b
#3 lore raw

PATCH 1/1 git-tag: fix -l switch handling regression.

---

It seems that you didnt took that patch either, that IMHO gives a better semantics to git tag -l than yours, while keeping backward compatibility.

 builtin-tag.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
builtin-tag.c +5 -7
index 274901a..020ee1c 100644
@@ -16,7 +16,7 @@
 static const char * const git_tag_usage[] = {
 	"git-tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
 	"git-tag -d <tagname>...",
-	"git-tag [-n [<num>]] -l [<pattern>]",
+	"git-tag -l [-n [<num>]] [<pattern>]",
 	"git-tag -v <tagname>...",
 	NULL
 };
@@ -370,13 +370,11 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
 	struct ref_lock *lock;
 
 	int annotate = 0, sign = 0, force = 0, lines = 0,
-					delete = 0, verify = 0;
-	char *list = NULL, *msgfile = NULL, *keyid = NULL;
-	const char *no_pattern = "NO_PATTERN";
+		list = 0, delete = 0, verify = 0;
+	char *msgfile = NULL, *keyid = NULL;
 	struct msg_arg msg = { 0, STRBUF_INIT };
 	struct option options[] = {
-		{ OPTION_STRING, 'l', NULL, &list, "pattern", "list tag names",
-			PARSE_OPT_OPTARG, NULL, (intptr_t) no_pattern },
+		OPT_BOOLEAN('l', NULL, &list, "list tag names"),
 		{ OPTION_INTEGER, 'n', NULL, &lines, NULL,
 				"print n lines of each tag message",
 				PARSE_OPT_OPTARG, NULL, 1 },
@@ -408,7 +406,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
 		annotate = 1;
 
 	if (list)
-		return list_tags(list == no_pattern ? NULL : list, lines);
+		return list_tags(argv[0], lines);
 	if (delete)
 		return for_each_tag_name(argv, delete_tag);
 	if (verify)
Signature · 1 line
1.5.4.rc1.1096.g37c7b
#4 lore raw

Re: [PATCH] git-tag: fix -l switch handling regression.

Quoted 6 lines · Pierre Habouzit

---

It seems that you didnt took that patch either, that IMHO gives a better semantics to git tag -l than yours, while keeping backward compatibility.

I thought this depended on some other changes. As is, doesn't it break the t7004 test?

#5 lore raw

Re: [PATCH] git-tag: fix -l switch handling regression.

Quoted 11 lines · Junio C Hamano
Quoted 6 lines · Pierre Habouzit

---

It seems that you didnt took that patch either, that IMHO gives a better semantics to git tag -l than yours, while keeping backward compatibility.

I thought this depended on some other changes. As is, doesn't it break the t7004 test?

Well there are tests that test:

git tag -n xxx -l ...

or

git tag -n "" -l ...

but I think we agreed those test nothing legitimate, and that the
tests have to be removed. SO yes it hides another patch to cleanse t7004 from the broken tests.

Signature · 3 lines
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org
#6 lore raw

Re: [PATCH] git-tag: fix -l switch handling regression.

Quoted 9 lines · Pierre Habouzit

On Fri, Dec 21, 2007 at 04:32:43PM +0000, Junio C Hamano wrote:
...

Quoted 2 lines

I thought this depended on some other changes. As is, doesn't it break the t7004 test?

Well there are tests that test:

git tag -n xxx -l ...

Quoted 7 lines

or

git tag -n "" -l ...

but I think we agreed those test nothing legitimate, and that the
tests have to be removed. SO yes it hides another patch to cleanse t7004 from the broken tests.

Thanks for a clarification; I'll resurect parts of my test fix-ups and squash that in.

#7 lore raw
In reply to Pierre Habouzit
Quoted 2 lines · Pierre Habouzit

Hmm now I'm confused, I believed we settled for the: --abbrev 10 HEAD is forbidden, --abbrev=10 HEAD works, and --abbrev HEAD too.

http://thread.gmane.org/gmane.comp.version-control.git/68121/focus=68659 ?

Quoted 4 lines

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:

Unfortunately I've been busy lately and have already discarded the whole series that had the {} stuff. Could you resend cleaned up patch please, so that I can take a look over the weekend?

#8 lore raw
Quoted 6 lines · Junio C Hamano
Quoted 2 lines · Pierre Habouzit

Hmm now I'm confused, I believed we settled for the: --abbrev 10 HEAD is forbidden, --abbrev=10 HEAD works, and --abbrev HEAD too.

http://thread.gmane.org/gmane.comp.version-control.git/68121/focus=68659 ?

okay, then it's what I remembered, I was confused because the patch
for that was around for quite some time, but I just resent it so this one is okay.

Quoted 9 lines
Quoted 4 lines

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:

Unfortunately I've been busy lately and have already discarded the whole series that had the {} stuff. Could you resend cleaned up patch please, so that I can take a look over the weekend?

sure, this is the patch from
http://article.gmane.org/gmane.comp.version-control.git/68140 actually, I will resend a proper patch when I've been able to get that one back :)

Signature · 3 lines
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org
#9 lore raw

PATCH 1/1 parse-options: Add a gitcli(5) man page.

This page should hold every information about the git ways to parse command lines, and best practices to be used for scripting.

---

Quoted 8 lines
Quoted 4 lines

Unfortunately I've been busy lately and have already discarded the whole series that had the {} stuff. Could you resend cleaned up patch please, so that I can take a look over the weekend?

sure, this is the patch from
http://article.gmane.org/gmane.comp.version-control.git/68140 actually, I will resend a proper patch when I've been able to get that one back :)

in fact that is not the proper one, and I had one kept here. I just pushed the 3 patches on my ph/parseopt branch at
git://git.madism.org/git.git, rebased on the current next.

Cheers,

 Documentation/Makefile   |    2 +-
 Documentation/gitcli.txt |  113 ++++++++++++++++++++++++++++++++++++++++++++++
 Makefile                 |    1 +
 3 files changed, 115 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/gitcli.txt
Documentation/Makefile +1 -1
index 76df06c..c4486d3 100644
@@ -2,7 +2,7 @@ MAN1_TXT= \
 	$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
 		$(wildcard git-*.txt)) \
 	gitk.txt
-MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt
+MAN5_TXT=gitattributes.txt gitignore.txt gitcli.txt gitmodules.txt
 MAN7_TXT=git.txt
 
 MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
Documentation/gitcli.txt new file +113 -0

113 lines not on this page · raw message

Makefile +1 -0
index b635be8..dd6c0d6 100644
@@ -1173,6 +1173,7 @@ check-docs::
 		documented,gitattributes | \
 		documented,gitignore | \
 		documented,gitmodules | \
+		documented,gitcli | \
 		documented,git-tools | \
 		sentinel,not,matching,is,ok ) continue ;; \
 		esac; \
Signature · 1 line
1.5.4.rc1.1096.g37c7b
#10 lore raw
In reply to Junio C Hamano
Quoted 7 lines · Junio C Hamano

* Should "git stash" stop doing anything useful? I think the patch from Nana today may be a reasonable compromise, although I still think fundamentally different behaviour for the same command configurable per-user is not very nice (we have precedent in "git clean" already, though, but "git clean" is inherently dangerous command, and "git stash" is much more useful and the issue impacts more people).

IMO we should give in and play the safe game. For those who don't like to type "git stash save" can always

    git config --global alias.shelve "stash save"
    git config --global alias.unshelve "stash apply"

and retrain the fingers.

-- Hannes

#11 lore raw
Quoted 9 lines · Johannes Sixt
Quoted 7 lines · Junio C Hamano

* Should "git stash" stop doing anything useful? I think the patch from Nana today may be a reasonable compromise, although I still think fundamentally different behaviour for the same command configurable per-user is not very nice (we have precedent in "git clean" already, though, but "git clean" is inherently dangerous command, and "git stash" is much more useful and the issue impacts more people).

Quoted 7 lines

IMO we should give in and play the safe game. For those who don't like to type "git stash save" can always

    git config --global alias.shelve "stash save"
    git config --global alias.unshelve "stash apply"

and retrain the fingers.

in the past, i used git merely to checkout code and send diffs to maintainers ... never for my own work. ive started to transition from using svn everywhere to trying out git, and saw reference to this "stash" command on another list. i wanted to learn more about it, so i started off with git-stash to get some info, and wondered what just happened. then i typoed the --help option and wondered even more what just happened :).

after flipping through the git mailing list for a while, it's good to see that git stash <random crap> will be fixed in the next release, and yes the default behavior of saving is confusing. the argument that newbies can easily recover their work really only works if the newbie knows what's going on. if they knew from the start, then they wouldnt be newbies eh.

making the default behavior non-destructive (which is to say, not changing anything) and allowing people to arbitrarily configure the default behavior sounds sane to me. taking it up a level, people could just as easily write functions in their shell environment to do the same thing. which is to say that imho, the argument against this for fear of different behavior depending on user is over the top. configuration options are there to change the behavior based on the user's preference.
-mike

#12 lore raw

Hi,

Quoted 5 lines · Mike Frysinger

ive started to transition from using svn everywhere to trying out git, and saw reference to this "stash" command on another list. i wanted to learn more about it, so i started off with git-stash to get some info, and wondered what just happened. then i typoed the --help option and wondered even more what just happened :).

I'm very sorry for you, but I, for one, refuse to let decisions be influenced by people who did not have so much as a glimpse in the documentation.

It may be okay for a certain nation state to award people spilling that hot coffee that they ordered over there laps, but the rest of the world laughs about such a behaviour.

If you got rope, stuck your neck through the noose, and jumped, without reading the manual first, well, that's not my problem.

But I guess that we'll get that no-default-action behaviour, and I will have to change my ways. Sigh.

Ciao,
Dscho

#13 lore raw
Quoted 7 lines · Johannes Schindelin
Quoted 5 lines · Mike Frysinger

ive started to transition from using svn everywhere to trying out git, and saw reference to this "stash" command on another list. i wanted to learn more about it, so i started off with git-stash to get some info, and wondered what just happened. then i typoed the --help option and wondered even more what just happened :).

Quoted 5 lines

I'm very sorry for you, but I, for one, refuse to let decisions be influenced by people who did not have so much as a glimpse in the documentation.

<snip pointless garbage>

why do you insist on wasting people's time if your point is merely to insult ? if that is your goal, go somewhere else.
-mike

#14 lore raw
In reply to Junio C Hamano

Hi,

Quoted 3 lines · Junio C Hamano

* Introduction of "<tree>:./path" (Dscho). I could be talked into accepting the patch if it is useful to people who live deep within subdirectories.

IMHO this can safely await post-1.5.4.

Ciao,
Dscho

#15 lore raw
In reply to Junio C Hamano
Quoted 9 lines · Junio C Hamano

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:

Quoted 3 lines

* 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.

About that, I know we talked about the -default thing and so on, I'm
not sure we should hurry that for 1.5.4 for the following reasons:

* I grepped through the source and the _sole_ instance of parse-options enabled option arguments are --abbrev ones for now (even in the shell scripts migrated to git rev-parse --parseopt).

* Not adding *-default and lax parsing for optional arguments is _not_ a regression for the migrated commands.

* I don't want to urge that because well, I still have the hope we could come up with something even better.

So I'd argue in favor of that:
+ push the patch that forces the stuck forms (that I already posted)

    for 1.5.4.

+ prepare a series in pu with *-default post 1.5.4 to evaluate this and see what people think.

Most of the function with optional arguments are the git diff ones,
and we'll see about them post 1.5.4 anyways.

Signature · 3 lines
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org
#16 lore raw
Quoted 3 lines · Pierre Habouzit

So I'd argue in favor of that:
+ push the patch that forces the stuck forms (that I already posted)

    for 1.5.4.

Ok, sounds sane. You posted multiple serieses; which ones?

#17 lore raw
Quoted 7 lines · Junio C Hamano
Quoted 3 lines · Pierre Habouzit

So I'd argue in favor of that:
+ push the patch that forces the stuck forms (that I already posted)

    for 1.5.4.

Ok, sounds sane. You posted multiple serieses; which ones?

All the patches I think should go in 1.5.4 are in that very thread. Forcing the stuck forms for optional arguments is in
Message-Id: <[email protected]>, or is on git.madism.org in branch ph/parseopt.

Signature · 3 lines
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org
#18 lore raw
In reply to Junio C Hamano
Quoted 7 lines · Junio C Hamano
Quoted 3 lines · Pierre Habouzit

So I'd argue in favor of that:
+ push the patch that forces the stuck forms (that I already posted)

    for 1.5.4.

Ok, sounds sane. You posted multiple serieses; which ones?

Ah, my apologies. I can fetch them from your git repository at madism.org, of course.