Re: [PATCH 1/1] fetch: Cache the want OIDs for faster lookup

2019-09-15 Thread Jeff King
On Sun, Sep 15, 2019 at 02:18:02PM -0700, Masaya Suzuki wrote: > During git-fetch, the client checks if the advertised tags' OIDs are > already in the fetch request's want OID set. This check is done in a > linear scan. For a repository that has a lot of refs, repeating this > scan takes 15+ minut

Re: [PATCH 1/1] fetch: Cache the want OIDs for faster lookup

2019-09-15 Thread Masaya Suzuki
On Sun, Sep 15, 2019 at 7:35 PM Derrick Stolee wrote: > > On 9/15/2019 5:18 PM, Masaya Suzuki wrote: > > During git-fetch, the client checks if the advertised tags' OIDs are > > already in the fetch request's want OID set. This check is done in a > > linear scan. For a repository that has a lot of

Re: [PATCH 1/1] fetch: Cache the want OIDs for faster lookup

2019-09-15 Thread Derrick Stolee
On 9/15/2019 5:18 PM, Masaya Suzuki wrote: > During git-fetch, the client checks if the advertised tags' OIDs are > already in the fetch request's want OID set. This check is done in a > linear scan. For a repository that has a lot of refs, repeating this > scan takes 15+ minutes. In order to speed

Re: [PATCH] commit-graph: use commit_list_count()

2019-09-15 Thread Derrick Stolee
On 9/15/2019 1:07 PM, René Scharfe wrote: > Let commit_list_count() count the number of parents instead of > duplicating it. Also store the result in an unsigned int, as that's > what the function returns, and the count is never negative. I was unfamiliar with this method, but it obviously remove

[GIT PULL] gitk update

2019-09-15 Thread Paul Mackerras
Hi Junio, Whenever it's convenient, please do a pull from my gitk repository at git://ozlabs.org/~paulus/gitk.git to get four commits updating gitk. Thanks, Paul. Gabriele Mazzotta (1): gitk: Do not mistake unchanged lines fo

Re: [PATCH] gitk: Do not mistake unchanged lines with submodule changes

2019-09-15 Thread Paul Mackerras
On Sat, Mar 23, 2019 at 06:00:36PM +0100, Gabriele Mazzotta wrote: > Unchanged lines are prefixed with a white-space, thus unchanged lines > starting with either " <" or " >" are mistaken for submodule changes. > Check if a line starts with either " <" or " >" only if we listing > the changes of

Re: [PATCH] doc: provide guidance on user.name format

2019-09-15 Thread brian m. carlson
On 2019-09-15 at 22:18:07, Junio C Hamano wrote: > "brian m. carlson" writes: > > diff --git a/Documentation/git-commit-tree.txt > > b/Documentation/git-commit-tree.txt > > index 4b90b9c12a..34a8496b0e 100644 > > --- a/Documentation/git-commit-tree.txt > > +++ b/Documentation/git-commit-tree.txt

[PATCH v4] Documentation: fix build with Asciidoctor 2

2019-09-15 Thread brian m. carlson
Our documentation toolchain has traditionally been built around DocBook 4.5. This version of DocBook is the last DTD-based version of DocBook. In 2009, DocBook 5 was introduced using namespaces and its syntax is expressed in RELAX NG, which is more expressive and allows a wider variety of syntax f

Re: [PATCH] doc: provide guidance on user.name format

2019-09-15 Thread Junio C Hamano
"brian m. carlson" writes: > Users may or may not read the documentation, but at least we've done our > best at providing them helpful information should they choose to do so. Good. > Documentation/git-commit-tree.txt | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation

Re: [PATCH v3] Documentation: fix build with Asciidoctor 2

2019-09-15 Thread brian m. carlson
On 2019-09-15 at 22:05:55, SZEDER Gábor wrote: > On Sun, Sep 15, 2019 at 09:26:21PM +, brian m. carlson wrote: > > > > diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh > > > > index d49089832d..b3e76ef863 100755 > > > > --- a/ci/test-documentation.sh > > > > +++ b/ci/test-docume

Re: [PATCH v3] Documentation: fix build with Asciidoctor 2

2019-09-15 Thread SZEDER Gábor
On Sun, Sep 15, 2019 at 09:26:21PM +, brian m. carlson wrote: > > > diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh > > > index d49089832d..b3e76ef863 100755 > > > --- a/ci/test-documentation.sh > > > +++ b/ci/test-documentation.sh > > > @@ -8,6 +8,8 @@ > > > filter_log () { >

Re: [PATCH] credential: add nocache option to the credentials API

2019-09-15 Thread Masaya Suzuki
On Mon, Aug 26, 2019 at 9:28 AM Junio C Hamano wrote: > > Jeff King writes: > > > I was thinking that Git itself could treat "ttl=0" specially, the same > > as your nocache, and avoid passing it along to any helpers during the > > approve stage. That would make it exactly equivalent to your patch

Re: [PATCH v3] Documentation: fix build with Asciidoctor 2

2019-09-15 Thread brian m. carlson
On 2019-09-15 at 09:59:52, SZEDER Gábor wrote: > On Sat, Sep 14, 2019 at 07:49:19PM +, brian m. carlson wrote: > > test -n "$ALREADY_HAVE_ASCIIDOCTOR" || > > gem install --version 1.5.8 asciidoctor > > So, since the documentation can now be built with Asciidoctor v2, is > it already ti

[PATCH 1/1] fetch: Cache the want OIDs for faster lookup

2019-09-15 Thread Masaya Suzuki
During git-fetch, the client checks if the advertised tags' OIDs are already in the fetch request's want OID set. This check is done in a linear scan. For a repository that has a lot of refs, repeating this scan takes 15+ minutes. In order to speed this up, create a oid_set for other refs' OIDs. S

[PATCH 0/1] fetch: Cache the want OIDs for faster lookup

2019-09-15 Thread Masaya Suzuki
When mirroring a repository with a lot of refs, there is a case where the client takes a long time to calculate the want OIDs. This is observable with Chromium's repository for example. $ mkdir testing $ cd testing $ git init . --bare $ git remote add origin master https://chromium.googlesource.co

[PATCH] commit-graph: use commit_list_count()

2019-09-15 Thread René Scharfe
Let commit_list_count() count the number of parents instead of duplicating it. Also store the result in an unsigned int, as that's what the function returns, and the count is never negative. Signed-off-by: René Scharfe --- commit-graph.c | 17 ++--- 1 file changed, 6 insertions(+),

[PATCH 2/2] diff, log doc: small grammer, format, and language fixes

2019-09-15 Thread Johannes Sixt
- Replace "SHA-1" by "object name", the modern name for hashes. - Correct a few grammar weaknesses. - Do not accidentally format a phrase in teletype font where quotes are intended. Signed-off-by: Johannes Sixt --- I do not have the toolchain to check that a correct result is produced. Doc

[PATCH 1/2] diff, log doc: say "patch text" instead of "patches"

2019-09-15 Thread Johannes Sixt
A poster on Stackoverflow was confused that the documentation of git-log promised to generate "patches" or "patch files" with -p, but there were none to be found. Rewrite the corresponding paragraph to talk about "patch text" to avoid the confusion. Shorten the language to say "X does Y" in place

[PATCH 4/3] list-objects-filter: use empty string instead of NULL for sparse "base"

2019-09-15 Thread Jeff King
On Sat, Sep 14, 2019 at 09:09:42PM -0400, Jeff King wrote: > On Mon, Sep 09, 2019 at 01:08:24PM -0400, Jeff King wrote: > > > I'll work up what I sent earlier into a real patch, and include some of > > this discussion. > > Here it is. I pulled Jon's tests out into their own patch (mostly > becau

Re: [PATCH 2/3] list-objects-filter: delay parsing of sparse oid

2019-09-15 Thread Jeff King
On Sat, Sep 14, 2019 at 09:13:19PM -0400, Jeff King wrote: > --- a/list-objects-filter-options.c > +++ b/list-objects-filter-options.c > @@ -63,17 +63,8 @@ static int gently_parse_list_objects_filter( > return 0; > > } else if (skip_prefix(arg, "sparse:oid=", &v0)) { > -

Re: [PATCH 2/2] sha1-name: check for overflow of N in "foo^N" and "foo~N"

2019-09-15 Thread René Scharfe
Am 15.09.19 um 17:15 schrieb brian m. carlson: > This approach seems reasonable. I must admit some curiosity as to how > you discovered this issue, though. Did you have a cat assisting you in > typing revisions? Found it by reading the code, but I'm not sure anymore what I was actually looking f

Re: [PATCH 2/2] sha1-name: check for overflow of N in "foo^N" and "foo~N"

2019-09-15 Thread brian m. carlson
On 2019-09-15 at 12:10:28, René Scharfe wrote: > Reject values that don't fit into an int, as get_parent() and > get_nth_ancestor() cannot handle them. That's better than potentially > returning a random object. > > If this restriction turns out to be too tight then we can switch to a > wider dat

[PATCH 2/2] sha1-name: check for overflow of N in "foo^N" and "foo~N"

2019-09-15 Thread René Scharfe
Reject values that don't fit into an int, as get_parent() and get_nth_ancestor() cannot handle them. That's better than potentially returning a random object. If this restriction turns out to be too tight then we can switch to a wider data type, but we'd still have to check for overflow. Signed-

[PATCH 1/2] rev-parse: demonstrate overflow of N for "foo^N" and "foo~N"

2019-09-15 Thread René Scharfe
If the number gets too high for an int, weird things may happen, as signed overflows are undefined. Add a test to show this; rev-parse "sucessfully" interprets 1 to be the same as 0, at least on x64 with GCC 9.2.1 and Clang 8.0.1, which is obviously bogus. Signed-o

Re: [PATCH v3] Documentation: fix build with Asciidoctor 2

2019-09-15 Thread SZEDER Gábor
On Sat, Sep 14, 2019 at 07:49:19PM +, brian m. carlson wrote: > Our documentation toolchain has traditionally been built around DocBook > 4.5. This version of DocBook is the last DTD-based version of DocBook. > In 2009, DocBook 5 was introduced using namespaces and its syntax is > expressed in

Re: git-gui: automatically move focus to staged file before typing commit message?

2019-09-15 Thread Birger Skogeng Pedersen
Hi Pratyush, On Sat, Sep 14, 2019 at 11:15 PM Pratyush Yadav wrote: > Why should it only happen when the commit message widget is selected? > What's wrong with directly switching focus when all the files are > staged? > > What I have in mind is once there are no more files to stage, the focus > d