Re: [PATCH v2 0/4] stripspace: Implement and use --count-lines option

2015-10-16 Thread Matthieu Moy
Tobias Klauser writes: > - Split patch 2/3 into two patches: patch 2/4 switches git stripspace > to use parse-options and patch 3/4 introduces the new option. Much better now. > - Implement line counting in cmd_stripbuf() instead of (ab-)using >

Re: [PATCH] pull: add angle brackets to usage string

2015-10-16 Thread Ralf Thielow
Alex Henrie wrote: > --- > builtin/pull.c | 2 +- > contrib/examples/git-pull.sh | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/builtin/pull.c b/builtin/pull.c > index a39bb0a..bf3fd3f 100644 > --- a/builtin/pull.c > +++

Re: [PATCH] pull: add angle brackets to usage string

2015-10-16 Thread Junio C Hamano
Alex Henrie writes: > 2015-10-16 10:36 GMT-06:00 Junio C Hamano : >> Makes sense, as all the other in the usage string are >> bracketted. >> >> Does it make sense to do this for contrib/examples, which is the >> historical record, though? > > I didn't

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-16 Thread Junio C Hamano
Tobias Klauser writes: > Use parse-options to parse command-line options instead of a > hand-crafted implementation. > > This is a preparatory patch to simplify the introduction of the > --count-lines option in a follow-up patch. The second paragraph is probably of much

Re: [PATCH] Add fetch.recurseSubmoduleParallelism config option

2015-10-16 Thread Junio C Hamano
Stefan Beller writes: > so maybe > fetch.recurseSubmoduleJobs > fetch.submoduleJobs > fetch.jobs > fetch.connectionsToUse "git remote update" is another example that may want to run multiple independent 'git fetch' in parallel. I think "When the operation I

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-16 Thread Junio C Hamano
Junio C Hamano writes: >> -if (mode == INVAL) >> -usage(usage_msg); > > When given "git stripspace -s blorg", we used to set mode to INVAL > and then showed the correct usage. But we no longer have a check > that corresponds to the old INVAL thing, do we?

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-16 Thread Junio C Hamano
Tobias Klauser writes: >> So this is your output code, which gives only the number of lines >> without the cleaned up result. > > This should better be a simple printf("%zu\n", lines) I guess? I think we actively avoid using %z conversion that is only C99. If you really

Re: [PATCH] Add fetch.recurseSubmoduleParallelism config option

2015-10-16 Thread Stefan Beller
On Mon, Oct 12, 2015 at 4:50 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> There is core.preloadIndex to enable parallel index preload, but >> that is boolean and not giving fine control to the user. We want to give >> fine control to the user here

Re: [PATCH] pull: add angle brackets to usage string

2015-10-16 Thread Junio C Hamano
Ralf Thielow writes: > There seem to be three more places left missing these angle brances > at the usage string. > Junio, feel free to squash this or treat it as a separate patch > on top, if suitable. Thanks. Will queue. > > -- >8 -- > From: Ralf Thielow

[PATCH] usage: do not insist that standard input must come from a file

2015-10-16 Thread Junio C Hamano
The synopsys text and the usage string of subcommands that read list of things from the standard input are often shown like this: git gostak [--distim] < This is problematic in a number of ways: * The way to use these commands is more often to feed them the output from another

Re: [BUG] t7063-status-untracked-cache flaky?

2015-10-16 Thread Junio C Hamano
David Turner writes: > The problem is: > > trash directory.t7063-status-untracked-cache$ diff trace trace.expect > 3,4c3,4 > < directory invalidation: 1 > < opendir: 1 > --- >> directory invalidation: 2 >> opendir: 2 > > > I can repro on a SSD. > > I had to try many

git tag --contains now takes a long time

2015-10-16 Thread Jerry Snitselaar
Is this known and being looked into? I've seen a jump from 12 seconds to over 9 minutes with running git tag --contains on my kernel repo. snits ~/dev/linux> git --version git version 2.6.1.145.gb27dacc snits ~/dev/linux> time git tag --contains 825fcfc next-20151012 next-20151013 v4.3-rc5

Re: [PATCH] usage: do not insist that standard input must come from a file

2015-10-16 Thread Junio C Hamano
Jonathan Nieder writes: >> --stdin:: >> -Read file names from stdin instead of from the command-line. >> +Read pathnames from stdin instead of from the command-line. > > Here I have to read the description of "-z" to understand that pathnames > come one per line.

Re: [PATCH 05/12] git submodule update: Use its own list implementation.

2015-10-16 Thread Junio C Hamano
Stefan Beller writes: > Discussions turned out that we cannot parallelize the whole loop below > `git submodule--helper list` in `git submodule update`, because some > changes should be done only one at a time, such as messing up a submodule > and leave it up to the user to

Re: [PATCH] usage: do not insist that standard input must come from a file

2015-10-16 Thread Jonathan Nieder
Junio C Hamano wrote: > The synopsys text and the usage string of subcommands that read list nit: s/synopsys/synopsis/ [...] > +++ b/Documentation/git-cat-file.txt > @@ -10,7 +10,7 @@ SYNOPSIS > > [verse] > 'git cat-file' (-t [--allow-unknown-type]| -s [--allow-unknown-type]| -e |

Re: [PATCH 03/12] git submodule update: Move branch calculation to where it's needed

2015-10-16 Thread Junio C Hamano
Stefan Beller writes: > The branch variable is used only once so calculate it only when needed. > > Signed-off-by: Stefan Beller > --- Makes sense. > git-submodule.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 05/12] git submodule update: Use its own list implementation.

2015-10-16 Thread Stefan Beller
On Fri, Oct 16, 2015 at 2:02 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Discussions turned out that we cannot parallelize the whole loop below >> `git submodule--helper list` in `git submodule update`, because some >> changes should be done only

Re: [BUG] t7063-status-untracked-cache flaky?

2015-10-16 Thread David Turner
On Fri, 2015-10-16 at 17:22 +0200, Torsten Bögershausen wrote: > On 15.10.15 09:52, Lars Schneider wrote: > > Hi, > > > > I noticed that "t7063-status-untracked-cache.sh" occasionally fails with > > "not ok 24 - test sparse status with untracked cache". > > I can't reproduce it here. > Do you

Re: [PATCH 01/12] git submodule update: Announce skipping submodules on stderr

2015-10-16 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > git-submodule.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/git-submodule.sh b/git-submodule.sh > index 8b0eb9a..578ec48 100755 > --- a/git-submodule.sh > +++

Re: [PATCH 01/12] git submodule update: Announce skipping submodules on stderr

2015-10-16 Thread Stefan Beller
On Fri, Oct 16, 2015 at 1:37 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Signed-off-by: Stefan Beller >> --- >> git-submodule.sh | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/git-submodule.sh

Re: [PATCH 02/12] git submodule update: Announce uninitialized modules on stderr

2015-10-16 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > git-submodule.sh | 2 +- > t/t7400-submodule-basic.sh | 12 ++-- > 2 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/git-submodule.sh b/git-submodule.sh >

Re: [BUG] t7063-status-untracked-cache flaky?

2015-10-16 Thread David Turner
On Fri, 2015-10-16 at 13:34 -0700, Junio C Hamano wrote: > David Turner writes: > > > The problem is: > > > > trash directory.t7063-status-untracked-cache$ diff trace trace.expect > > 3,4c3,4 > > < directory invalidation: 1 > > < opendir: 1 > > --- > >> directory

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-16 Thread Tobias Klauser
On 2015-10-15 at 18:52:54 +0200, Matthieu Moy wrote: > Tobias Klauser writes: > > > --- a/Documentation/git-stripspace.txt > > +++ b/Documentation/git-stripspace.txt > > @@ -9,7 +9,7 @@ git-stripspace - Remove unnecessary whitespace > >

Re: [PATCH v4 02/26] refs: make repack_without_refs and is_branch public

2015-10-16 Thread Michael Haggerty
On 10/15/2015 09:46 PM, David Turner wrote: > is_branch was already non-static, but this patch declares it in the > header. The commit message no longer reflects the patch. > Signed-off-by: Ronnie Sahlberg > Signed-off-by: David Turner >

[PATCH] fetch: only show "Fetching remote" when verbose mode is enabled

2015-10-16 Thread Paul Wise
By default when fetching one remote nothing is printed unless there are changes that need fetching. This makes fetching multiple remotes be just as verbose as fetching a single remote. This is needed when fetching multiple repositories using the myrepos tool in minimal output mode, where myrepos

Re: [PATCH] Use the alternates of the source repository for dissociating clone

2015-10-16 Thread Alexander Riesen
Resend. The previous replies didn't make it to git-ml because of html part inserted by gmail. On 10/15/2015 11:59 PM, Junio C Hamano wrote: Are you talking about making a clone of a repository that was created with "clone --reference", to borrow from the same third repository the original is

Re: [PATCH v3] merge: fix cache_entry use-after-free

2015-10-16 Thread David Turner
On Thu, 2015-10-15 at 13:51 -0700, Junio C Hamano wrote: > David Turner writes: > > >> > +static inline void drop_ce_ref(struct cache_entry *ce) > >> > +{ > >> > +if (ce != NULL) { > >> > +assert(ce->ref_count >= 0); > >> > >> Shouldn't this be

Re: [PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-16 Thread Tobias Klauser
Thanks for the review. On 2015-10-15 at 19:36:17 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > > Rename stripspace() to strbuf_stripspace() and move it to the strbuf > > module as suggested in [1]. > > > > Also switch all current users of

Re: How to rebase when some commit hashes are in some commit messages

2015-10-16 Thread Philip Oakley
From: "Johannes Schindelin" Hi Francois-Xavier, On Thu, 15 Oct 2015, Francois-Xavier Le Bail wrote: On 13/10/2015 15:29, Philip Oakley wrote: > Thus the only sha1 numbers that could be used are those that are > within the (possibly implied) instruction sheet

Re: [PATCH v4 03/26] refs-be-files.c: rename refs to refs-be-files

2015-10-16 Thread Michael Haggerty
On 10/15/2015 09:46 PM, David Turner wrote: > From: Ronnie Sahlberg > > Rename refs.c to refs-be-files.c to indicate that this file now > holds the implementation for the files based refs backend. > A smaller portion of the code in this file is backend agnostic and will > be

Re: [PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-16 Thread Tobias Klauser
On 2015-10-15 at 18:42:23 +0200, Matthieu Moy wrote: > Tobias Klauser writes: > > > Also switch all current users of stripspace() to the new function name > > and keep a temporary wrapper inline function for topic branches still > > using

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-16 Thread Tobias Klauser
On 2015-10-15 at 18:52:54 +0200, Matthieu Moy wrote: > Tobias Klauser writes: > > +static const char * const usage_msg[] = { > > Stick the * to usage_msg please. Just noticed while looking at how other sub-commands define this, the vast

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-16 Thread Matthieu Moy
Tobias Klauser writes: > On 2015-10-15 at 18:52:54 +0200, Matthieu Moy > wrote: >> Tobias Klauser writes: >> > +static const char * const usage_msg[] = { >> >> Stick the * to usage_msg please. > > Just noticed while

Re: submodule: allow submodule directory in gitignore

2015-10-16 Thread Aleksey Komarov
On 12.10.2015 13:30, Aleksey Komarov wrote: > Now, I'm trying to add a submodule to my repository, but fail to understand > why > my .gitignore prevents it from being added. I use the following command to > check > if my submodule will be ignored or not: > > $ git add --dry-run

[PATCH v2 0/4] stripspace: Implement and use --count-lines option

2015-10-16 Thread Tobias Klauser
(1) Move the stripspace() function to the strbuf module adding a prefix and changing all users accordingly. Also introduce a wrapper in case any topic branches still depend on the old name. (2) Switch git stripspace to use parse-options in order to simplify introducing new command

[PATCH v2 3/4] stripspace: Implement --count-lines option

2015-10-16 Thread Tobias Klauser
Implement the --count-lines options for git stripspace to be able to omit calling: git stripspace --strip-comments < infile | wc -l e.g. in git-rebase--interactive.sh. The above command can now be replaced by: git stripspace --strip-comments --count-lines < infile This will make it easier

[PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-16 Thread Tobias Klauser
Use parse-options to parse command-line options instead of a hand-crafted implementation. This is a preparatory patch to simplify the introduction of the --count-lines option in a follow-up patch. Signed-off-by: Tobias Klauser --- builtin/stripspace.c | 56

[PATCH v2 1/4] strbuf: make stripspace() part of strbuf

2015-10-16 Thread Tobias Klauser
Rename stripspace() to strbuf_stripspace() and move it to the strbuf module. The function is also used in other builtins than stripspace, so it makes sense to have it in a more generic place. Since it operates on an strbuf and the function is declared in strbuf.h, move it to strbuf.c and add the

[PATCH v2 4/4] git rebase -i: Use newly added --count-lines option for stripspace

2015-10-16 Thread Tobias Klauser
Use the newly added --count-lines option for 'git stripspace' to count lines instead of piping the entire output to 'wc -l'. Signed-off-by: Tobias Klauser --- Implements the small project idea from

Re: [BUG] t7063-status-untracked-cache flaky?

2015-10-16 Thread Torsten Bögershausen
I can't reproduce it here. Do you want to give us some info about your setup ? OS ? Harddisk, SSD, Fusion ? Does "debug=t verbose=t ./t7063-status-untracked-cache.sh >xx.txt 2>&1" give any more information ? On 15.10.15 09:52, Lars Schneider wrote: > Hi, > > I noticed that

Re: [PATCH v3] merge: fix cache_entry use-after-free

2015-10-16 Thread Junio C Hamano
David Turner writes: > We also do dozens or hundreds of merges per day and only saw this quite > rarely. Interestingly, we could only trigger it with an alternate > hashing function for git's hashmap implementation, and only once a > certain bug in that implementation

Re: git tag --contains now takes a long time

2015-10-16 Thread Junio C Hamano
Jerry Snitselaar writes: > Is this known and being looked into? I've seen a jump from 12 seconds > to over 9 minutes with running git tag --contains on my kernel repo. Thanks for a report. Yes, it seems that there is a recent regression on the 'master' branch, not yet in

Re: [PATCH] usage: do not insist that standard input must come from a file

2015-10-16 Thread Jonathan Nieder
Junio C Hamano wrote: > Here is what I prepared based on your review in an interdiff form. For what it's worth, Reviewed-by: Jonathan Nieder Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More

[ANNOUNCE] Git v2.6.2

2015-10-16 Thread Junio C Hamano
The latest maintenance release Git v2.6.2 is now available at the usual places. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/ The following public repositories all have a copy of the 'v2.6.2' tag and the 'maint' branch that the tag points at: url =

Re: [PATCH] usage: do not insist that standard input must come from a file

2015-10-16 Thread Junio C Hamano
Here is what I prepared based on your review in an interdiff form. A few points to note: * Stole the "fmt-merge-msg" example verbatim ;-) * The description of "show-ref --exclude" mode should be much clearer now. Thanks. diff --git a/Documentation/git-check-attr.txt

Git bug report: git doesn't change working directory

2015-10-16 Thread Khải
I'm using Windows 10. Before I install git 2.6.1.windows.1, I have installed git 1.9.5.github.0 (by installing GitHub Desktop), it works just fine. But when I installed git 2.6.1.windows.1 (from git-scm.com), I'm not able to use git anymore: - The powershell console displayed [(unknown)]

Re: [PATCH] pull: add angle brackets to usage string

2015-10-16 Thread Junio C Hamano
Alex Henrie writes: > Signed-off-by: Alex Henrie > --- Makes sense, as all the other in the usage string are bracketted. Does it make sense to do this for contrib/examples, which is the historical record, though? The first one I found with

Re: [PATCH v2 0/4] stripspace: Implement and use --count-lines option

2015-10-16 Thread Junio C Hamano
Tobias Klauser writes: Be consistent with the subjects, please. > strbuf: make stripspace() part of strbuf s/make/make/ ;-) > stripspace: Use parse-options for command-line parsing s/Use/use/ > stripspace: Implement --count-lines option s/Implement/implement/ >

Re: [PATCH] pull: add angle brackets to usage string

2015-10-16 Thread Alex Henrie
2015-10-16 10:36 GMT-06:00 Junio C Hamano : > Makes sense, as all the other in the usage string are > bracketted. > > Does it make sense to do this for contrib/examples, which is the > historical record, though? I didn't know that contrib/examples was a historical record. The