Re: commit-graph is cool (overcoming add_missing_tags() perf issues)

2018-10-30 Thread Elijah Newren
On Tue, Oct 30, 2018 at 9:23 AM Ævar Arnfjörð Bjarmason wrote: > > On Wed, Oct 17, 2018 at 8:41 PM Elijah Newren wrote: > > (And in the mean time I gave the user a one-liner to nuke his > > local-only tags that I suspect he doesn't need.) > > Just a note that you can usually set

Re: commit-graph is cool (overcoming add_missing_tags() perf issues)

2018-10-30 Thread Elijah Newren
On Tue, Oct 30, 2018 at 7:22 AM Derrick Stolee wrote: > > On 10/17/2018 2:00 PM, Elijah Newren wrote: > > Hi, > > > > Just wanted to give a shout-out for the commit-graph work and how > > impressive it is. I had an internal report from a user that git > > pushes containing only one new tiny

Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows

2018-10-30 Thread Chris Webster
Resending in text mode. On Tue, Oct 30, 2018 at 10:20 PM Chris Webster wrote: > > On Tue, Oct 30, 2018 at 9:54 PM Junio C Hamano wrote: >> >> "chris via GitGitGadget" writes: >> >> > From: chris >> > >> > Use File::Spec->devnull() for output redirection to avoid messages >> > when Windows

Re: [PATCH 2/3] check_stream_sha1(): handle input underflow

2018-10-30 Thread Junio C Hamano
Jeff King writes: > On Wed, Oct 31, 2018 at 01:03:39AM -0400, Jeff King wrote: > >> Phew. I almost just deleted all of the above, because now I think I'm >> ready to write that comment you asked for. ;) But I left it since maybe >> it makes sense to follow my thought process. > > So here it is

Re: [PATCH 2/3] check_stream_sha1(): handle input underflow

2018-10-30 Thread Jeff King
On Wed, Oct 31, 2018 at 01:03:39AM -0400, Jeff King wrote: > Phew. I almost just deleted all of the above, because now I think I'm > ready to write that comment you asked for. ;) But I left it since maybe > it makes sense to follow my thought process. So here it is in a more succinct form.

Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows

2018-10-30 Thread Junio C Hamano
> Subject: Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows As this is only about contrib/diff-highlight, please make it clear that it is the area the patch affects on its title, i.e. Subject: diff-highlight: use File::Spec->devnull(), not /dev/null or something like that. >

Re: [PATCH 2/3] check_stream_sha1(): handle input underflow

2018-10-30 Thread Jeff King
On Wed, Oct 31, 2018 at 01:44:25PM +0900, Junio C Hamano wrote: > Jeff King writes: > > >> See 692f0bc7 to find who did the fix you stole from, and for what > >> kind of breakage the original fix was made. > > > > Heh. I did not dig into it, but actually thought "I'll bet Junio had to > > get

Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows

2018-10-30 Thread Junio C Hamano
"chris via GitGitGadget" writes: > From: chris > > Use File::Spec->devnull() for output redirection to avoid messages > when Windows version of Perl is first in path. The message 'The Dscho, "Windows version of Perl is first in path" somehow feels contradicting with what one of the topics I

Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows

2018-10-30 Thread Junio C Hamano
Jeff King writes: > On Tue, Oct 30, 2018 at 11:26:36AM -0700, chris via GitGitGadget wrote: > >> From: chris > > You might want to adjust your user.name. :) Yes, absolutely. We'd want to see that the From: line and one of the Signed-off-by: lines are idential. >> Use File::Spec->devnull()

Re: [PATCH 2/3] check_stream_sha1(): handle input underflow

2018-10-30 Thread Junio C Hamano
Jeff King writes: >> See 692f0bc7 to find who did the fix you stole from, and for what >> kind of breakage the original fix was made. > > Heh. I did not dig into it, but actually thought "I'll bet Junio had to > get this right when he wrote the streaming code. No wonder he spotted my > mistake

Re: [PATCH 1/2] ls-remote: do not send ref prefixes for patterns

2018-10-30 Thread Junio C Hamano
Jeff King writes: > Since b4be74105f (ls-remote: pass ref prefixes when requesting a > remote's refs, 2018-03-15), "ls-remote foo" will pass "refs/heads/foo", > "refs/tags/foo", etc to the transport code in an attempt to let the > other side reduce the size of its advertisement. Jonathan,

Re: [PATCH 2/3] check_stream_sha1(): handle input underflow

2018-10-30 Thread Jeff King
On Wed, Oct 31, 2018 at 01:23:54PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > The bug comes from commit f6371f9210 (sha1_file: add > > read_loose_object() function, 2017-01-13), which > > reimplemented some of the existing loose object functions. > > So it's worth checking if this

Re: Using --word-diff breaks --color-moved

2018-10-30 Thread Junio C Hamano
james harvey writes: > If you use both "--word-diff" and "--color-moved", regardless of the > order of arguments, "--word-diff" takes precedence and "--color-moved" > isn't allowed to do anything. > > I think "--color-moved" should have precedence over "--word-diff". I > cannot think of a

[PATCH 2/2] ls-remote: pass heads/tags prefixes to transport

2018-10-30 Thread Jeff King
Unlike its arbitrary text patterns, the --heads and --tags options to ls-remote are true prefixes. We can pass this information to the transport code. If the v2 protocol is in use, that will reduce the size of the ref advertisement. Note that the test added here succeeds both before and after the

[PATCH 1/2] ls-remote: do not send ref prefixes for patterns

2018-10-30 Thread Jeff King
Since b4be74105f (ls-remote: pass ref prefixes when requesting a remote's refs, 2018-03-15), "ls-remote foo" will pass "refs/heads/foo", "refs/tags/foo", etc to the transport code in an attempt to let the other side reduce the size of its advertisement. Unfortunately this is not correct, as

Re: [PATCH 2/3] check_stream_sha1(): handle input underflow

2018-10-30 Thread Junio C Hamano
Jeff King writes: > The bug comes from commit f6371f9210 (sha1_file: add > read_loose_object() function, 2017-01-13), which > reimplemented some of the existing loose object functions. > So it's worth checking if this bug was inherited from any of > those. The answers seems to be no. The two

[PATCH 0/2] ls-remote and v2 ref prefixes

2018-10-30 Thread Jeff King
This series fixes a bug where ls-remote sends a ref-advertisement prefix when it shouldn't, and then optimizes a spot where it doesn't send one but could. [1/2]: ls-remote: do not send ref prefixes for patterns [2/2]: ls-remote: pass heads/tags prefixes to transport builtin/ls-remote.c |

Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows

2018-10-30 Thread Jeff King
On Tue, Oct 30, 2018 at 11:26:36AM -0700, chris via GitGitGadget wrote: > From: chris You might want to adjust your user.name. :) > Use File::Spec->devnull() for output redirection to avoid messages > when Windows version of Perl is first in path. The message 'The > system cannot find the

Re: [PATCH 0/4] mingw: prevent external PERL5LIB from interfering

2018-10-30 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > An alternative approach which was rejected at the time (because it > interfered with the then-ongoing work to compile Git for Windows using MS > Visual C++) would patch the make_environment_block() function to skip the > specified environment

Re: [PATCH 1/3] commit-reach: implement get_reachable_subset

2018-10-30 Thread Junio C Hamano
"Derrick Stolee via GitGitGadget" writes: > +struct commit_list *get_reachable_subset(struct commit **from, int nr_from, > + struct commit **to, int nr_to, > + int reachable_flag) This is OR'ed into object.flags, and I

Re: [PATCH 0/3] Make add_missing_tags() linear

2018-10-30 Thread Junio C Hamano
"Derrick Stolee via GitGitGadget" writes: > Add a new method in commit-reach.c called get_reachable_subset() which does > a many-to-many reachability test. Starting at the 'from' commits, walk until > the generation is below the smallest generation in the 'to' commits, or all > 'to' commits have

Re: [PATCH v3 0/5] am/rebase: share read_author_script()

2018-10-30 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > Thanks to Junio for the feedback on v2. I've updated patch 4 based on > those comments, the rest are unchanged. Hmph, all these five patches seem to be identical to what I have in 'pu'. Did you send the right version? > v1 cover letter: > > This

Re: [PATCH v3 2/2] worktree: rename is_worktree_locked to worktree_lock_reason

2018-10-30 Thread Junio C Hamano
nbelakov...@gmail.com writes: > From: Nickolai Belakovski > > A function prefixed with 'is_' would be expected to return a boolean, > however this function returns a string. > > Signed-off-by: Nickolai Belakovski > --- Given that there is a clear documentation in worktree.h, and a pointer that

Re: [PATCH v3 1/2] worktree: update documentation for lock_reason and lock_reason_valid

2018-10-30 Thread Junio C Hamano
nbelakov...@gmail.com writes: > From: Nickolai Belakovski > > Clarify that these fields are to be considered implementation details > and direct the reader to use the is_worktree_locked function to retrieve > said information. > > Signed-off-by: Nickolai Belakovski > --- > worktree.h | 4 ++--

Using --word-diff breaks --color-moved

2018-10-30 Thread james harvey
If you use both "--word-diff" and "--color-moved", regardless of the order of arguments, "--word-diff" takes precedence and "--color-moved" isn't allowed to do anything. I think "--color-moved" should have precedence over "--word-diff". I cannot think of a scenario where a user would supply both

Re: [PATCH 12/12] fsck: mark strings for translation

2018-10-30 Thread Jonathan Nieder
Hi, Ævar Arnfjörð Bjarmason wrote: >> On Mon, Oct 29, 2018 at 3:09 PM Junio C Hamano wrote: >>> SZEDER Gábor writes: Nguyễn Thái Ngọc Duy wrote: > -fprintf(stderr, "%s in %s %s: %s\n", > -msg_type, printable_type(obj), describe_object(obj), err); > +

[PATCH 2/3] check_stream_sha1(): handle input underflow

2018-10-30 Thread Jeff King
This commit fixes an infinite loop when fscking large truncated loose objects. The check_stream_sha1() function takes an mmap'd loose object buffer and streams 4k of output at a time, checking its sha1. The loop quits when we've output enough bytes (we know the size from the object header), or

[PATCH 3/3] cat-file: handle streaming failures consistently

2018-10-30 Thread Jeff King
There are three ways to convince cat-file to stream a blob: - cat-file -p $blob - cat-file blob $blob - echo $batch | cat-file --batch In the first two, we simply exit with the error code of streaw_blob_to_fd(). That means that an error will cause us to exit with "-1" (which we try to

[PATCH 1/3] t1450: check large blob in trailing-garbage test

2018-10-30 Thread Jeff King
Commit cce044df7f (fsck: detect trailing garbage in all object types, 2017-01-13) added two tests of trailing garbage in a loose object file: one with a commit and one with a blob. The point of having two is that blobs would follow a different code path that streamed the contents, instead of

Re: Infinite loop regression in git-fsck in v2.12.0

2018-10-30 Thread Jeff King
On Tue, Oct 30, 2018 at 06:56:03PM -0400, Jeff King wrote: > > > while (total_read <= size && > > > +stream->avail_in > 0 && > > > (status == Z_OK || status == Z_BUF_ERROR)) { > > > stream->next_out = buf; > > > stream->avail_out = sizeof(buf); > > > >

Re: Infinite loop regression in git-fsck in v2.12.0

2018-10-30 Thread Jeff King
On Tue, Oct 30, 2018 at 10:56:22PM +0100, Ævar Arnfjörð Bjarmason wrote: > > So maybe a good approach would be that we'd annotate all those test > > whose fsck fails with "this is how it should fail", and run those tests > > under GIT_TEST_FSCK=true, and GIT_TEST_FSCK=true would also be asserting

Re: [RFC v1] Add virtual file system settings and hook proc

2018-10-30 Thread Junio C Hamano
Ben Peart writes: > diff --git a/config.c b/config.c > index 4051e38823..96e05ee0f1 100644 > --- a/config.c > +++ b/config.c > ... > @@ -2307,6 +2311,37 @@ int git_config_get_index_threads(void) > return 0; /* auto */ > } > > +int git_config_get_virtualfilesystem(void) > +{ > + if

Re: Infinite loop regression in git-fsck in v2.12.0

2018-10-30 Thread Jeff King
On Wed, Oct 31, 2018 at 07:28:00AM +0900, Junio C Hamano wrote: > > So we need to distinguish those cases. I think this is the simplest fix: > > > > diff --git a/sha1-file.c b/sha1-file.c > > index dd0b6aa873..a7ff5fe25d 100644 > > --- a/sha1-file.c > > +++ b/sha1-file.c > > @@ -2199,6 +2199,7 @@

Re: Infinite loop regression in git-fsck in v2.12.0

2018-10-30 Thread Junio C Hamano
Jeff King writes: > The problem isn't actually a sha1 mismatch, though that's what > parse_object() will report. The issue is actually that the file is > truncated. So zlib does not say "this is corrupt", but rather "I need > more bytes to keep going". And unfortunately it returns Z_BUF_ERROR

[PATCH 21/24] commit-graph: convert remaining function to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Convert all functions to handle arbitrary repositories in commit-graph.c that are used by functions taking a repository argument already. Notable exclusion is write_commit_graph and its local functions as that only works on the_repository. Signed-off-by: Stefan Beller --- commit-graph.c | 40

[PATCH 22/24] commit: make free_commit_buffer and release_commit_memory repository agnostic

2018-10-30 Thread Stefan Beller
Pass the object pool to free_commit_buffer and release_commit_memory, such that we can eliminate access to 'the_repository'. Also remove the TODO in release_commit_memory, as commit->util was removed in 9d2c97016f (commit.h: delete 'util' field in struct commit, 2018-05-19) Signed-off-by: Stefan

[PATCH 13/24] commit-reach: prepare get_merge_bases to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Similarly to previous patches, the get_merge_base functions are used often in the code base, which makes migrating them hard. Implement the new functions, prefixed with 'repo_' and hide the old functions behind a wrapper macro. Signed-off-by: Stefan Beller --- commit-reach.c

[PATCH 20/24] submodule: don't add submodule as odb for push

2018-10-30 Thread Stefan Beller
In push_submodule(), because we do not actually need access to objects in the submodule, do not invoke add_submodule_odb(). (for_each_remote_ref_submodule() does not require access to those objects, and the actual push is done by spawning another process, which handles object access by itself.)

[PATCH 17/24] commit: prepare logmsg_reencode to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- commit.h| 8 contrib/coccinelle/the_repository.pending.cocci | 9 + pretty.c| 13 +++-- 3 files changed, 24 insertions(+), 6

[PATCH 18/24] pretty: prepare format_commit_message to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- contrib/coccinelle/the_repository.pending.cocci | 10 ++ pretty.c| 15 --- pretty.h| 7 ++- 3 files changed, 24 insertions(+),

[PATCH 19/24] submodule: use submodule repos for object lookup

2018-10-30 Thread Stefan Beller
This converts the 'show_submodule_header' function to use the repository API properly, such that the submodule objects are not added to the main object store. Signed-off-by: Stefan Beller --- submodule.c | 76 ++--- 1 file changed, 61

[PATCH 12/24] commit-reach.c: allow get_merge_bases_many_0 to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index ab2bb1e5d5..bf7a513991 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -216,7 +216,8 @@ static int remove_redundant(struct

[PATCH 14/24] commit-reach: prepare in_merge_bases[_many] to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 15 +-- commit-reach.h | 12 ++-- contrib/coccinelle/the_repository.pending.cocci | 16 3 files changed, 35 insertions(+), 8 deletions(-) diff

[PATCH 16/24] commit: prepare repo_unuse_commit_buffer to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c| 6 -- commit.h| 7 ++- contrib/coccinelle/the_repository.pending.cocci | 8 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/commit.c

[PATCH 15/24] commit: prepare get_commit_buffer to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c| 8 +--- commit.h| 7 ++- contrib/coccinelle/the_repository.pending.cocci | 8 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/commit.c

[PATCH 24/24] t/helper/test-repository: celebrate independence from the_repository

2018-10-30 Thread Stefan Beller
dade47c06c (commit-graph: add repo arg to graph readers, 2018-07-11) brought more independence from the_repository to the commit graph, however it was not completely independent of the_repository, as the previous patches show. To ensure we're not accessing the_repository by accident, we'd ideally

[PATCH 23/24] path.h: make REPO_GIT_PATH_FUNC repository agnostic

2018-10-30 Thread Stefan Beller
git_pathdup uses the_repository internally, but the macro REPO_GIT_PATH_FUNC is specifically made for arbitrary repositories. Switch to repo_git_path which works on arbitrary repositories. Signed-off-by: Stefan Beller --- path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 10/24] commit-reach.c: allow merge_bases_many to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index 080ae0a758..4cf471bfaf 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -95,7 +95,9 @@ static struct commit_list

[PATCH 04/24] object-store: allow read_object_file_extended to read from arbitrary repositories

2018-10-30 Thread Stefan Beller
read_object_file_extended is not widely used, so migrate it all at once. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- object-store.h | 5 +++-- sha1-file.c| 11 ++- streaming.c| 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git

[PATCH 03/24] packfile: allow has_packed_and_bad to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
has_packed_and_bad is not widely used, so just migrate it all at once. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- packfile.c | 5 +++-- packfile.h | 2 +- sha1-file.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index

[PATCH 02/24] sha1_file: allow read_object to read objects in arbitrary repositories

2018-10-30 Thread Stefan Beller
Allow read_object (a file local functon in sha1_file) to handle arbitrary repositories by passing the repository down to oid_object_info_extended. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- sha1-file.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

[PATCH 11/24] commit-reach.c: allow remove_redundant to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index 4cf471bfaf..ab2bb1e5d5 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -156,7 +156,7 @@ struct commit_list

[PATCH 07/24] object: parse_object to honor its repository argument

2018-10-30 Thread Stefan Beller
In 8e4b0b6047 (object.c: allow parse_object to handle arbitrary repositories, 2018-06-28), we forgot to pass the repository down to the read_object_file. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 05/24] object-store: prepare read_object_file to deal with arbitrary repositories

2018-10-30 Thread Stefan Beller
As read_object_file is a widely used function (which is also regularly used in new code in flight between master..pu), changing its signature is painful is hard, as other series in flight rely on the original signature. It would burden the maintainer if we'd just change the signature. Introduce

[PATCH 08/24] commit: allow parse_commit* to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Just like the previous commit, parse_commit and friends are used a lot and are found in new patches, so we cannot change their signature easily. Re-introduce these function prefixed with 'repo_' that take a repository argument and keep the original as a shallow macro. Signed-off-by: Stefan

[PATCH 06/24] object-store: prepare has_{sha1, object}_file[_with_flags] to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- .../coccinelle/the_repository.pending.cocci | 29 +++ object-store.h| 22 ++ sha1-file.c | 15 ++ 3 files changed, 55 insertions(+), 11 deletions(-) diff

[PATCH 09/24] commit-reach.c: allow paint_down_to_common to handle arbitrary repositories

2018-10-30 Thread Stefan Beller
As the function is file local and not widely used, migrate it all at once. Signed-off-by: Stefan Beller --- commit-reach.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index a9da65c462..080ae0a758 100644 --- a/commit-reach.c

[PATCHv2 00/24] Bring more repository handles into our code base]

2018-10-30 Thread Stefan Beller
This resends sb/more-repo-in-api On Thu, Oct 25, 2018 at 2:14 AM SZEDER Gábor wrote: > On Tue, Oct 16, 2018 at 04:35:49PM -0700, Stefan Beller wrote: > > This converts the 'show_submodule_header' function to use > > the repository API properly, such that the submodule objects > > are not added

[PATCH 01/24] Makefile: add pending semantic patches

2018-10-30 Thread Stefan Beller
From: SZEDER Gábor There are basically two main use cases for semantic patches: - To avoid undesirable code patterns, e.g. we should not use sha1_to_hex(oid.hash) or strbuf_addf(, "fixed string"), but use oid_to_hex() or strbuf_addstr(, "fixed string") instead.

Re: Infinite loop regression in git-fsck in v2.12.0

2018-10-30 Thread Ævar Arnfjörð Bjarmason
On Tue, Oct 30 2018, Ævar Arnfjörð Bjarmason wrote: > The test is easy, just add a 'git fsck' at the end of t5000-tar-tree.sh, > but more generally it seems having something like GIT_TEST_FSCK=true is > a good idea. We do a bunch of stress testing of the object store in the > test suite that

Re: Infinite loop regression in git-fsck in v2.12.0

2018-10-30 Thread Jeff King
On Tue, Oct 30, 2018 at 09:03:24PM +0100, Ævar Arnfjörð Bjarmason wrote: > While playing around with having a GIT_TEST_FSCK=true as I suggested in > https://public-inbox.org/git/20181030184331.27264-3-ava...@gmail.com/ I > found that we've had an infinite loop in git-fsck since c68b489e56 >

Infinite loop regression in git-fsck in v2.12.0

2018-10-30 Thread Ævar Arnfjörð Bjarmason
While playing around with having a GIT_TEST_FSCK=true as I suggested in https://public-inbox.org/git/20181030184331.27264-3-ava...@gmail.com/ I found that we've had an infinite loop in git-fsck since c68b489e56 ("fsck: parse loose object paths directly", 2017-01-13) In particular in the while()

[RFC v1] Add virtual file system settings and hook proc

2018-10-30 Thread Ben Peart
From: Ben Peart On index load, clear/set the skip worktree bits based on the virtual file system data. Use virtual file system data to update skip-worktree bit in unpack-trees. Use virtual file system data to exclude files and folders not explicitly requested. Signed-off-by: Ben Peart --- We

[PATCH 0/1] mingw: fix isatty() after dup2()

2018-10-30 Thread Johannes Schindelin via GitGitGadget
This patch has been looong in the waiting (well over a year) for being sent to the Git mailing list; it is a fixup for a change of isatty() on Windows that had long made it into git.git's master branch. Johannes Schindelin (1): mingw: fix isatty() after dup2() compat/mingw.h | 3 +++

[PATCH 1/1] mingw: fix isatty() after dup2()

2018-10-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Since a9b8a09c3c30 (mingw: replace isatty() hack, 2016-12-22), we handle isatty() by special-casing the stdin/stdout/stderr file descriptors, caching the return value. However, we missed the case where dup2() overrides the respective file descriptor. That poses a

[PATCH v2 0/3] index-pack: test updates

2018-10-30 Thread Ævar Arnfjörð Bjarmason
I'd still probalby like to have core.checkCollisions as a config knob to be able to turn it off, but let's see what Jeff comes up with once he finishes his WIP cache patch. In the meantime 1-3/4 of my series is obviously correct test fixes which I'd like queued up first. Ævar Arnfjörð Bjarmason

[PATCH v2 1/3] pack-objects test: modernize style

2018-10-30 Thread Ævar Arnfjörð Bjarmason
Modernize the quoting and indentation style of two tests added in 8685da4256 ("don't ever allow SHA1 collisions to exist by fetching a pack", 2007-03-20), and of a subsequent one added in 4614043c8f ("index-pack: use streaming interface for collision test on large blobs", 2012-05-24) which had

[PATCH v2 2/3] pack-objects tests: don't leave test .git corrupt at end

2018-10-30 Thread Ævar Arnfjörð Bjarmason
Change the pack-objects tests to not leave their .git directory corrupt and the end. In 2fca19fbb5 ("fix multiple issues with t5300", 2010-02-03) a comment was added warning against adding any subsequent tests, but since 4614043c8f ("index-pack: use streaming interface for collision test on large

[PATCH v2 3/3] index-pack tests: don't leave test repo dirty at end

2018-10-30 Thread Ævar Arnfjörð Bjarmason
Change a test added in 51054177b3 ("index-pack: detect local corruption in collision check", 2017-04-01) so that the repository isn't left dirty at the end. Due to the caveats explained in 720dae5a19 ("config doc: elaborate on fetch.fsckObjects security", 2018-07-27) even a "fetch" that fails

[PATCH 4/4] mingw: unset PERL5LIB by default

2018-10-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Git for Windows ships with its own Perl interpreter, and insists on using it, so it will most likely wreak havoc if PERL5LIB is set before launching Git. Let's just unset that environment variables when spawning processes. To make this feature extensible (and

[PATCH 1/4] config: rename `dummy` parameter to `cb` in git_default_config()

2018-10-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This is the convention elsewhere (and prepares for the case where we may need to pass callback data). Signed-off-by: Johannes Schindelin --- config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index

[PATCH 3/4] Move Windows-specific config settings into compat/mingw.c

2018-10-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Signed-off-by: Johannes Schindelin --- cache.h| 8 compat/mingw.c | 18 ++ config.c | 8 environment.c | 1 - 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/cache.h b/cache.h index

[PATCH 0/4] mingw: prevent external PERL5LIB from interfering

2018-10-30 Thread Johannes Schindelin via GitGitGadget
In Git for Windows, we do not support running the Perl scripts with any random Perl interpreter. Instead, we insist on using the shipped one (except for MinGit, where we do not even ship the Perl scripts, to save on space). However, if Git is called from, say, a Perl script running in a different

[PATCH 2/4] Allow for platform-specific core.* config settings

2018-10-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In the Git for Windows project, we have ample precendent for config settings that apply to Windows, and to Windows only. Let's formalize this concept by introducing a platform_core_config() function that can be #define'd in a platform-specific manner. This will allow

[PATCH 0/1] DiffHighlight.pm: Use correct /dev/null for UNIX and Windows

2018-10-30 Thread Chris. Webster via GitGitGadget
Use File::Spec->devnull() for output redirection to avoid messages when Windows version of Perl is first in path. The message 'The system cannot find the path specified.' is displayed each time git is run to get colors. chris (1): Use correct /dev/null for UNIX and Windows

[PATCH 1/1] Use correct /dev/null for UNIX and Windows

2018-10-30 Thread chris via GitGitGadget
From: chris Use File::Spec->devnull() for output redirection to avoid messages when Windows version of Perl is first in path. The message 'The system cannot find the path specified.' is displayed each time git is run to get colors. Signed-off-by: Chris. Webster ---

Re: [PATCH v2 06/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-10-30 Thread Phillip Wood
On 27/10/2018 22:29, Alban Gruin wrote: This refactors sequencer_add_exec_commands() to work on a todo_list to avoid redundant reads and writes to the disk. An obvious way to do this would be to insert the `exec' command between the other commands, and reparse it once this is done. This is not

Re: [PATCH v2 04/16] sequencer: introduce todo_list_write_to_file()

2018-10-30 Thread Phillip Wood
Hi Alban I like the direction this is going, it is an improvement on re-scanning the list at the end of each function. On 27/10/2018 22:29, Alban Gruin wrote: This introduce a new function to recreate the text of a todo list from its commands, and then to write it to the disk. This will be

Re: commit-graph is cool (overcoming add_missing_tags() perf issues)

2018-10-30 Thread Ævar Arnfjörð Bjarmason
On Wed, Oct 17, 2018 at 8:41 PM Elijah Newren wrote: > (And in the mean time I gave the user a one-liner to nuke his > local-only tags that I suspect he doesn't need.) Just a note that you can usually set 'fetch.pruneTags=true' these days to make that happen.

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-10-30 Thread Duy Nguyen
On Tue, Oct 30, 2018 at 7:39 AM Denton Liu wrote: > > This patch offloads completion functionality for format-patch to > __gitcomp_builtin. In addition to this, send-email was borrowing some > completion options from format-patch so those options are moved into > send-email's completions. > >

Re: Lost changes after merge

2018-10-30 Thread Rafael Ascensão
The commits you mentioned are not present on the new pastes. On Tue, Oct 30, 2018 at 03:46:28AM +0100, Gray King wrote: > Sorry, seems the link has been expired, here is the new one: > * Before merge run `git log --format="%h %p %d" -n 20 --all --graph`: > One thing I noticed, is that you're

Re: commit-graph is cool (overcoming add_missing_tags() perf issues)

2018-10-30 Thread Derrick Stolee
On 10/17/2018 2:00 PM, Elijah Newren wrote: Hi, Just wanted to give a shout-out for the commit-graph work and how impressive it is. I had an internal report from a user that git pushes containing only one new tiny commit were taking over a minute (in a moderate size repo with good network

[PATCH 2/3] test-reach: test get_reachable_subset

2018-10-30 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The get_reachable_subset() method returns the list of commits in the 'to' array that are reachable from at least one commit in the 'from' array. Add tests that check this method works in a few cases: 1. All commits in the 'to' list are reachable. This exercises the

[PATCH 3/3] remote: make add_missing_tags() linear

2018-10-30 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The add_missing_tags() method currently has quadratic behavior. This is due to a linear number (based on number of tags T) of calls to in_merge_bases_many, which has linear performance (based on number of commits C in the repository). Replace this O(T * C) algorithm with an

[PATCH 0/3] Make add_missing_tags() linear

2018-10-30 Thread Derrick Stolee via GitGitGadget
As reported earlier [1], the add_missing_tags() method in remote.c has quadratic performance. Some of that performance is curbed due to the generation-number cutoff in in_merge_bases_many(). However, that fix doesn't help users without a commit-graph, and it can still be painful if that cutoff is

[PATCH 1/3] commit-reach: implement get_reachable_subset

2018-10-30 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The existing reachability algorithms in commit-reach.c focus on finding merge-bases or determining if all commits in a set X can reach at least one commit in a set Y. However, for two commits sets X and Y, we may also care about which commits in Y are reachable from at least

Git Test Coverage Report (Tuesday, Oct 30)

2018-10-30 Thread Derrick Stolee
This coverage report uses a new build definition that runs the four suites in parallel, then combines the results into the report below. You can see the build that generated this report at [1]. Thanks, -Stolee [1] https://git.visualstudio.com/git/_build/results?buildId=235=logs --- pu:

Re: [PATCH v3 1/3] [Outreachy] t3903-stash: test without configured user name

2018-10-30 Thread Slavica Djukic
On 26-Oct-18 3:13 AM, Junio C Hamano wrote: Slavica Djukic writes: From: Slavica Please make sure this matches your sign-off below. This is part of enhancement request that ask for 'git stash' to work even if 'user.name' and 'user.email' are not configured. Due to an implementation

Re: [PATCH v7 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-30 Thread Antonio Ospite
On Tue, 30 Oct 2018 10:57:09 +0100 (STD) Johannes Schindelin wrote: > Hi Antonio, > Hi Johannes, > On Thu, 25 Oct 2018, Antonio Ospite wrote: > > > diff --git a/t/t7418-submodule-sparse-gitmodules.sh > > b/t/t7418-submodule-sparse-gitmodules.sh > > new file mode 100755 [...] > > + echo

[PATCH v3 3/5] am: rename read_author_script()

2018-10-30 Thread Phillip Wood
From: Phillip Wood Rename read_author_script() in preparation for adding a shared read_author_script() function to libgit. Signed-off-by: Phillip Wood --- builtin/am.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index

[PATCH v3 4/5] add read_author_script() to libgit

2018-10-30 Thread Phillip Wood
From: Phillip Wood Add read_author_script() to sequencer.c based on the implementation in builtin/am.c and update read_am_author_script() to use read_author_script(). The sequencer code that reads the author script will be updated in the next commit. Signed-off-by: Phillip Wood --- Notes:

[PATCH v3 1/5] am: don't die in read_author_script()

2018-10-30 Thread Phillip Wood
From: Phillip Wood The caller is already prepared to handle errors returned from this function so there is no need for it to die if it cannot read the file. Suggested-by: Eric Sunshine Signed-off-by: Phillip Wood --- builtin/am.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v3 5/5] sequencer: use read_author_script()

2018-10-30 Thread Phillip Wood
From: Phillip Wood Use the new function added in the last commit to read the author script, updating read_env_script() and read_author_ident(). We now have a single code path that reads the author script for am and all flavors of rebase. This changes the behavior of read_env_script() as

[PATCH v3 2/5] am: improve author-script error reporting

2018-10-30 Thread Phillip Wood
From: Phillip Wood If there are errors in a user edited author-script there was no indication of what was wrong. This commit adds some specific error messages depending on the problem. It also relaxes the requirement that the variables appear in a specific order in the file to match the behavior

[PATCH v3 0/5] am/rebase: share read_author_script()

2018-10-30 Thread Phillip Wood
From: Phillip Wood Thanks to Junio for the feedback on v2. I've updated patch 4 based on those comments, the rest are unchanged. v1 cover letter: This is a follow up to pw/rebase-i-author-script-fix, it reduces code duplication and improves rebase's parsing of the author script. After this

Re: js/mingw-http-ssl, was Re: What's cooking in git.git (Oct 2018, #05; Fri, 26)

2018-10-30 Thread Johannes Schindelin
Hi Junio, On Tue, 30 Oct 2018, Junio C Hamano wrote: > Eric Sunshine writes: > > > On Mon, Oct 29, 2018 at 10:10 PM Junio C Hamano wrote: > >> How's this? > >> > >> On platforms with recent cURL library, http.sslBackend configuration > >> variable can be used to choose different SSL

Re: [RFC PATCH] remote: add --fetch option to git remote set-url

2018-10-30 Thread Junio C Hamano
Denton Liu writes: > On Mon, Oct 29, 2018 at 02:57:28PM +0900, Junio C Hamano wrote: > ... >> Earlier you had a check like this: >> >> > + if (push_mode && fetch_mode) >> > + die(_("--push --fetch doesn't make sense")); >> >> If a request to "--fetch" is ignored when "--add" is

Re: [PATCH v7 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-30 Thread Johannes Schindelin
Hi Antonio, On Thu, 25 Oct 2018, Antonio Ospite wrote: > diff --git a/t/t7418-submodule-sparse-gitmodules.sh > b/t/t7418-submodule-sparse-gitmodules.sh > new file mode 100755 > index 00..21a86b89c6 > --- /dev/null > +++ b/t/t7418-submodule-sparse-gitmodules.sh > @@ -0,0 +1,122 @@ >

[PATCH 1/2] t7800: fix quoting

2018-10-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When passing a command-line to call an external diff command to the difftool, we must be prepared for paths containing special characters, e.g. backslashes in the temporary directory's path on Windows. This patch is needed in preparation for the next commit, which will

[PATCH 2/2] mingw: reencode environment variables on the fly (UTF-16 <-> UTF-8)

2018-10-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin On Windows, the authoritative environment is encoded in UTF-16. In Git for Windows, we convert that to UTF-8 (because UTF-16 is *such* a foreign idea to Git that its source code is unprepared for it). Previously, out of performance concerns, we converted the entire

  1   2   >