fast-import slowness when importing large files with small differences

2018-06-29 Thread Mike Hommey
Hi, I noticed some slowness when fast-importing data from the Firefox mercurial repository, where fast-import spends more than 5 minutes importing ~2000 revisions of one particular file. I reduced a testcase while still using real data. One could synthesize data with kind of the same properties, b

ag/rebase-i-append-todo-help, was Re: What's cooking in git.git (Jun 2018, #07; Thu, 28)

2018-06-29 Thread Alban Gruin
Hi Junio, Le 28/06/2018 à 23:40, Junio C Hamano a écrit : > * ag/rebase-i-append-todo-help (2018-06-14) 2 commits > - rebase--interactive: rewrite append_todo_help() in C > - Merge branch 'ag/rebase-p' into ag/rebase-i-append-todo-help > (this branch is used by ag/rebase-i-rewrite-todo.) > >

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

2018-06-29 Thread Johannes Schindelin
Hi Junio, On Thu, 28 Jun 2018, Junio C Hamano wrote: > What I meant by "many separte grep calls" was to contrast these two > approaches: > > * Have one typical output spelled out as "expect", take an output >from an actual run into "actual", make them comparable and then >do a compare (

Re: [PATCH 1/1] Makefile: fix the "built from commit" code

2018-06-29 Thread Johannes Schindelin
Hi Peff, On Thu, 28 Jun 2018, Jeff King wrote: > On Thu, Jun 28, 2018 at 10:27:32AM -0700, Junio C Hamano wrote: > > > Johannes Schindelin writes: > > > > >> I.e.: > > >> > > >> FOO='with spaces' > > >> BAR=$FOO sh -c 'echo $BAR' > > >> > > >> works just fine. > > > > > > $ x="two spa

[PATCH v2 1/1] Makefile: fix the "built from commit" code

2018-06-29 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In ed32b788c06 (version --build-options: report commit, too, if possible, 2017-12-15), we introduced code to let `git version --build-options` report the current commit from which the binaries were built, if any. To prevent erroneous commits from being reported (e.g. wh

[PATCH v2 0/1] Fix "built from commit" logic

2018-06-29 Thread Johannes Schindelin via GitGitGadget
When I tried recently to build macOS installers via Tim Harper's wonderful project at https://github.com/timcharper/git_osx_installer, it worked (with a couple of quirks), but it reported to be built from a commit that I first could not place. Turns out that the git_osx_installer project insist

Re: [PATCH v7 07/22] commit-graph: add 'verify' subcommand

2018-06-29 Thread Derrick Stolee
On 6/27/2018 5:59 PM, Jonathan Tan wrote: +int verify_commit_graph(struct repository *r, struct commit_graph *g) I haven't had the time to review this patch set, but I did rebase my object store refactoring [1] on this and wrote a test: static void test_verify_commit_graph(const char *gitd

Re: [PATCH v5 0/9] Document/fix/warn about rebase incompatibilities and inconsistencies

2018-06-29 Thread Phillip Wood
Hi Elijah On 27/06/18 08:23, Elijah Newren wrote: > git-rebase has lots of options that are mutually incompatible. Even among > aspects of its behavior that is common to all rebase types, it has a number > of inconsistencies. This series tries to document, fix, and/or warn users > about many of

Re: What's cooking in git.git (Jun 2018, #07; Thu, 28)

2018-06-29 Thread Derrick Stolee
On 6/28/2018 6:42 PM, Stefan Beller wrote: On Thu, Jun 28, 2018 at 2:40 PM Junio C Hamano wrote: * ds/commit-graph-fsck (2018-06-27) 22 commits [...] "git fsck" learns to make sure the optional commit-graph file is in a sane state. Is this ready for 'next'? I hope so, as I plan to re

Re: [PATCH] sequencer: use configured comment character

2018-06-29 Thread Johannes Schindelin
Hi Junio, On Thu, 28 Jun 2018, Junio C Hamano wrote: > Aaron Schrab writes: > > > Use configured comment character when generating comments about branches > > in an instruction sheet. Failure to honor this configuration causes a > > failure to parse the resulting instruction sheet. > > > > Sig

Re: [PATCH v3 09/32] commit: add repository argument to lookup_commit

2018-06-29 Thread Derrick Stolee
On 6/28/2018 9:21 PM, Stefan Beller wrote: Add a repository argument to allow callers of lookup_commit to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the p

Re: [PATCH v3 10/32] commit: add repository argument to parse_commit_buffer

2018-06-29 Thread Derrick Stolee
On 6/28/2018 9:22 PM, Stefan Beller wrote: Add a repository argument to allow the callers of parse_commit_buffer to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As

Re: [PATCH v3 00/32] object-store: lookup_commit

2018-06-29 Thread Derrick Stolee
On 6/28/2018 9:21 PM, Stefan Beller wrote: This continues the elimination of global variables in the object store and teaches lookup_commit[_reference] and alike to handle a_repository. This is also available as https://github.com/stefanbeller/git/tree/object-store-lookup-commit or applies on to

[GSoC][PATCH v5 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-29 Thread Alban Gruin
This rewrites (the misnamed) setup_reflog_action() from shell to C. The new version is called prepare_branch_to_be_rebased(). A new command is added to rebase--helper.c, “checkout-base”, as well as a new flag, “verbose”, to avoid silencing the output of the checkout operation called by checkout_ba

[GSoC][PATCH v5 0/3] rebase -i: rewrite reflog operations in C

2018-06-29 Thread Alban Gruin
This patch series rewrites the reflog operations from shell to C. This is part of the effort to rewrite interactive rebase in C. The first commit is dedicated to creating a function to silence a command, as the sequencer will do in several places with these patches. This branch is based on ag/re

[GSoC][PATCH v5 3/3] rebase -i: rewrite checkout_onto() in C

2018-06-29 Thread Alban Gruin
This rewrites checkout_onto() from shell to C. A new command (“checkout-onto”) is added to rebase--helper.c. The shell version is then stripped. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 7 ++- git-rebase--interactive.sh | 25 - sequencer.c

[GSoC][PATCH v5 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-29 Thread Alban Gruin
This adds a new function, run_command_silent_on_success(), to redirect the stdout and stderr of a command to a strbuf, and then to run that command. This strbuf is printed only if the command fails. It is functionnaly similar to output() from git-rebase.sh. run_git_commit() is then refactored to u

Re: [PATCH] sequencer: use configured comment character

2018-06-29 Thread Junio C Hamano
Johannes Schindelin writes: > In short: the code is fine, but yes, I had to convince myself by looking > through the code. (Hinting at a possible improvement of the commit > message.) Yup, that exactly was what I was hoping readers to realize.

[RFC PATCH 02/13] commit-reach: move ref_newer from remote.c

2018-06-29 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- builtin/remote.c | 1 + commit-reach.c | 52 commit-reach.h | 2 ++ http-push.c | 1 + remote.c | 48 +--- remote.h | 1 - 6 files changed, 57 in

[RFC PATCH 00/13] Consolidate reachability logic

2018-06-29 Thread Derrick Stolee
This RFC is a bit unpolished because I was mostly seeing where the idea could go. I wanted to achieve the following: 1. Consolidate several different commit walks into one file 2. Reduce duplicate reachability logic 3. Increase testability (correctness and performance) 4. Improve performance of re

[RFC PATCH 06/13] commit-reach: move can_all_from_reach_with_flag()

2018-06-29 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- commit-reach.c | 61 + commit-reach.h | 8 +++ upload-pack.c | 62 +++--- 3 files changed, 72 insertions(+), 59 deletions(-) diff --git a/commit-reach.c b/commit-re

[RFC PATCH 01/13] commit-reach: move walk methods from commit.c

2018-06-29 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- Makefile | 1 + commit-reach.c | 359 + commit-reach.h | 41 ++ commit.c | 358 4 files changed, 401 insertions(+), 358 deletions(-) create mode 1

[RFC PATCH 12/13] commit-reach: use is_descendant_of for ref_newer

2018-06-29 Thread Derrick Stolee
The ref_newer method is used by 'git push' to detect if a force-push is requried. This method does not use any kind of cutoff when walking, so in the case of a force-push will walk all reachable commits. The is_descendant_of method already uses paint_down_to_common along with cutoffs. By translati

[RFC PATCH 10/13] commit-reach: test is_descendant_of

2018-06-29 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- t/helper/test-reach.c | 2 ++ t/t6600-test-reach.sh | 25 + 2 files changed, 27 insertions(+) diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c index 88639a2945..14aaef5bff 100644 --- a/t/helper/test-reach.c +++ b/t/helper/test-

[RFC PATCH 09/13] commit-reach: test can_all_from_reach

2018-06-29 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- commit-reach.c| 52 +++ commit-reach.h| 4 +++- t/helper/test-reach.c | 7 -- t/t6600-test-reach.sh | 51 +++--- upload-pack.c | 2 +- 5 files changed, 105

[RFC PATCH 13/13] commit-reach: use can_all_from_reach

2018-06-29 Thread Derrick Stolee
The is_descendant_of method previously used in_merge_bases() to check if the commit can reach any of the commits in the provided list. This had two performance problems: 1. The performance is quadratic in worst-case. 2. A single in_merge_bases() call requires walking beyond the target commit i

[RFC PATCH 03/13] commit-reach: move commit_contains from ref-filter

2018-06-29 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- commit-reach.c | 119 +++ commit-reach.h | 44 +-- fast-import.c | 1 + ref-filter.c | 147 +++-- 4 files changed, 141 insertions(+), 170 deletions(-) diff --git a/

[RFC PATCH 04/13] upload-pack: make reachable() more generic

2018-06-29 Thread Derrick Stolee
In anticipation of moving the reachable() method to commit-reach.c, modify the prototype to be more generic to flags known outside of upload-pack.c. Also rename 'want' to 'from' to make the statement more clear outside of the context of haves/wants negotiation. Signed-off-by: Derrick Stolee ---

[RFC PATCH 08/13] test-reach: test reduce_heads()

2018-06-29 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- t/t6600-test-reach.sh | 26 ++ 1 file changed, 26 insertions(+) diff --git a/t/t6600-test-reach.sh b/t/t6600-test-reach.sh index c9337b6b46..0f60db9c60 100755 --- a/t/t6600-test-reach.sh +++ b/t/t6600-test-reach.sh @@ -78,4 +78,30 @@ test

[RFC PATCH 05/13] upload-pack: refactor ok_to_give_up()

2018-06-29 Thread Derrick Stolee
In anticipation of consolidating all commit reachability algorithms, refactor ok_to_give_up() in order to allow splitting its logic into an external method. Signed-off-by: Derrick Stolee --- upload-pack.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff

[RFC PATCH 11/13] commit-reach: make can_all_from_reach... linear

2018-06-29 Thread Derrick Stolee
The can_all_from_reach_with_flags() algorithm is currently quadratic in the worst case, because it calls the reachable() method for every 'from' without tracking which commits have already been walked or which can already reach a commit in 'to'. Rewrite the algorithm to walk each commit a constant

[RFC PATCH 07/13] test-reach

2018-06-29 Thread Derrick Stolee
--- Makefile | 1 + t/helper/test-reach.c | 123 ++ t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t6600-test-reach.sh | 81 5 files changed, 207 insertions(+) create mode 100644 t/helper/test-re

Re: [PATCH v3] fetch-pack: support negotiation tip whitelist

2018-06-29 Thread Junio C Hamano
Jonathan Tan writes: >> fetch is a perfect example of supporting all three. I can do >> >> git fetch origin SHA1 >> git fetch origin master >> git fetch origin refs/heads/*:refs/heads/* > > OK, Brandon managed to convince me that this is fine. I've included glob > support, supporting the s

Re: [PATCH 2/3] .mailmap: assume Jason McMullan to be the same person

2018-06-29 Thread Junio C Hamano
Stefan Beller writes: > Over the years of contributing to open source, I realized the world of > open source is smaller than I originally thought and a name is still > a pretty unique thing. So let's assume these two author idents are the > same person. > > In 10813e0d3c7 (.mailmap: update long-l

Re: [GSoC][PATCH v5 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-29 Thread Junio C Hamano
Alban Gruin writes: > + git rebase--helper --prepare-branch "$switch_to" ${verbose:+--verbose} > init_basic_state > > init_revisions_and_shortrevisions > diff --git a/sequencer.c b/sequencer.c > index d9545b366..dd0cf3cb5 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -3134

Re: [GSoC][PATCH v5 0/3] rebase -i: rewrite reflog operations in C

2018-06-29 Thread Junio C Hamano
Alban Gruin writes: > This patch series rewrites the reflog operations from shell to C. This > is part of the effort to rewrite interactive rebase in C. > > The first commit is dedicated to creating a function to silence a > command, as the sequencer will do in several places with these patches.

Re: [RFC PATCH 00/13] Consolidate reachability logic

2018-06-29 Thread Derrick Stolee
This RFC is available as a GitHub pull request [1]. Thanks, -Stolee [1] https://github.com/derrickstolee/git/pull/8

Re: [PATCH 1/3] .mailmap: merge different spellings of names

2018-06-29 Thread Junio C Hamano
Stefan Beller writes: > This is a continuation of 94b410bba86 (.mailmap: Map email > addresses to names, 2013-07-12), merging names that are > spelled differently but have the same author email to the > same person. > > Most spellings differed in accents or the order of names. Thanks. This one

Re: [PATCH 3/3] .mailmap: map names with multiple emails to the same author identity

2018-06-29 Thread Junio C Hamano
Stefan Beller writes: > There are multiple author idents who have different email addresses, but > the same name; assume they are the same person, as the world of open source > is actually rather small. Thanks for an interesting experiment. As with 2/3, I suspect that most of the contents in th

Re: [PATCH v3 00/32] object-store: lookup_commit

2018-06-29 Thread Junio C Hamano
Stefan Beller writes: > This continues the elimination of global variables in the object store and > teaches lookup_commit[_reference] and alike to handle a_repository. > > This is also available as > https://github.com/stefanbeller/git/tree/object-store-lookup-commit > or applies on top of 02f70

Re: [PATCH v3 00/32] object-store: lookup_commit

2018-06-29 Thread Junio C Hamano
Junio C Hamano writes: > One technique these (not just this) recent efforts seem to be > forgetting is to introduce "new" names that take a_repo and then > make the existing one a thin wrapper that calls the new one with > &the_repo as the argument. FWIW, here is how I am resolving semantic conf

Re: [GSoC][PATCH v5 0/3] rebase -i: rewrite reflog operations in C

2018-06-29 Thread Junio C Hamano
Junio C Hamano writes: > Let's aggregate these topics into a single topic, and perhaps call > it ag/rebase-i-in-c or something like that. Pretending as if they > are separately replaceable does not make much sense, as you are not > rerolling the earlier one and keep going forward with producing

Re: [PATCH v3 00/32] object-store: lookup_commit

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 11:03 AM Junio C Hamano wrote: > > Junio C Hamano writes: > > > One technique these (not just this) recent efforts seem to be > > forgetting is to introduce "new" names that take a_repo and then > > make the existing one a thin wrapper that calls the new one with > > &the_

Re: [PATCH 3/3] .mailmap: map names with multiple emails to the same author identity

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 10:42 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > There are multiple author idents who have different email addresses, but > > the same name; assume they are the same person, as the world of open source > > is actually rather small. > > Thanks for an interesti

send-email: change the default value of sendmail.validate

2018-06-29 Thread Drew DeVault
The purpose of this configuration option is to prevent your emails from blowing up on SMTP servers (rather than Extended SMTP servers). However, I find it often confuses people whose patches are otherwise correct, and they don't know how to solve the issue. I haven't seen an SMTP server in a very

Re: [PATCH v3 00/32] object-store: lookup_commit

2018-06-29 Thread Junio C Hamano
Stefan Beller writes: > On Fri, Jun 29, 2018 at 11:03 AM Junio C Hamano wrote: >> >> Junio C Hamano writes: >> >> > One technique these (not just this) recent efforts seem to be >> > forgetting is to introduce "new" names that take a_repo and then >> > make the existing one a thin wrapper that

Re: [PATCH 3/3] .mailmap: map names with multiple emails to the same author identity

2018-06-29 Thread Junio C Hamano
Stefan Beller writes: >> It may be even better if we can arraange the author of the patch to >> be the one who is involved, with "Helped-by: Stefan". > > ok, I'll think how I can help but not write the code. I do not think there is any code required. All it takes is a volunteer coordinater who

Re: What's cooking in git.git (Jun 2018, #07; Thu, 28)

2018-06-29 Thread Junio C Hamano
Stefan Beller writes: >> * jt/remove-pack-bitmap-global (2018-06-21) 2 commits >> - pack-bitmap: add free function >> - pack-bitmap: remove bitmap_git global variable >> >> The effort to move globals to per-repository in-core structure >> continues. > > This is mostly done, though Peff seems

Re: fast-import slowness when importing large files with small differences

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 3:18 AM Mike Hommey wrote: > > Hi, > > I noticed some slowness when fast-importing data from the Firefox mercurial > repository, where fast-import spends more than 5 minutes importing ~2000 > revisions of one particular file. I reduced a testcase while still > using real da

[PATCH] xdiff: reduce indent heuristic overhead

2018-06-29 Thread Stefan Beller
This patch was written originally for mercurial at https://phab.mercurial-scm.org/rHGc420792217c89622482005c99e959b9071c109c5 changeset: 36674:c420792217c8 user:Jun Wu date:Sat Mar 03 12:39:11 2018 -0800 files: mercurial/thirdparty/xdiff/xdiffi.c descri

Re: fast-import slowness when importing large files with small differences

2018-06-29 Thread Jeff King
On Fri, Jun 29, 2018 at 01:14:52PM -0700, Stefan Beller wrote: > Interesting pieces regarding performance: > > c420792217c8 xdiff: reduce indent heuristic overhead > https://phab.mercurial-scm.org/rHGc420792217c89622482005c99e959b9071c109c5 > > f33a87cf60cc xdiff: add a preprocessing step that t

Re: fast-import slowness when importing large files with small differences

2018-06-29 Thread Stefan Beller
+cc Jun Wu, original author of these patches On Fri, Jun 29, 2018 at 1:39 PM Jeff King wrote: > > Interesting pieces regarding performance: > > > > c420792217c8 xdiff: reduce indent heuristic overhead > > https://phab.mercurial-scm.org/rHGc420792217c89622482005c99e959b9071c109c5 Going by the ma

Re: What's cooking in git.git (Jun 2018, #07; Thu, 28)

2018-06-29 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 28 2018, Junio C Hamano wrote: > The tip of 'next' has been rewound and it currently has only 4 > topics. Quite a many topics are cooking in 'pu' and need to be > sifted into good bins (for 'next') and the remainder. Help is > appreciated in that area ;-) Per my https://public-inb

Re: [PATCH] xdiff: reduce indent heuristic overhead

2018-06-29 Thread Junio C Hamano
Stefan Beller writes: > This patch was written originally for mercurial at > https://phab.mercurial-scm.org/rHGc420792217c89622482005c99e959b9071c109c5 > > changeset: 36674:c420792217c8 > user:Jun Wu > date:Sat Mar 03 12:39:11 2018 -0800 > files: mercurial

Re: [RFC PATCH 01/13] commit-reach: move walk methods from commit.c

2018-06-29 Thread Stefan Beller
Hi Derrick, > +/* Remember to update object flag allocation in object.h */ > +#define PARENT1 (1u<<16) > +#define PARENT2 (1u<<17) > +#define STALE (1u<<18) > +#define RESULT (1u<<19) Something is up with whitespaces here, apart from that this patch looks good.

Re: [RFC PATCH 03/13] commit-reach: move commit_contains from ref-filter

2018-06-29 Thread Stefan Beller
Hi Derrick, > +struct ref_filter_cbdata { > + struct ref_array *array; > + struct ref_filter *filter; > + struct contains_cache contains_cache; > + struct contains_cache no_contains_cache; These members also seem to be moved whitespace-inconsistently. Could you clarify in

Re: [RFC PATCH 05/13] upload-pack: refactor ok_to_give_up()

2018-06-29 Thread Stefan Beller
Hi Derrick, > -static int ok_to_give_up(void) > +static int can_all_from_reach_with_flag(struct object_array from, This method is hard to read; at first I thought you missed a word, but then I realized that it asks "can all 'from' members reach ['something'] and we pass in the 'flag', so maybe

Re: [RFC PATCH 06/13] commit-reach: move can_all_from_reach_with_flag()

2018-06-29 Thread Stefan Beller
Hi Derrick, > +static int reachable(struct commit *from, int with_flag, int assign_flag, > time_t min_commit_date) [...] > + if (commit->date < min_commit_date) > + continue; [...] > +int can_all_from_reach_with_flag(struct object_array from, > +

Re: [RFC PATCH 01/13] commit-reach: move walk methods from commit.c

2018-06-29 Thread Junio C Hamano
Derrick Stolee writes: > Signed-off-by: Derrick Stolee > --- > Makefile | 1 + > commit-reach.c | 359 + > commit-reach.h | 41 ++ > commit.c | 358 > 4 files changed, 401 inserti

Re: [RFC PATCH 07/13] test-reach

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > +# Construct a grid-like commit graph with points (x,y) > +# with 1 <= x <= 10, 1 <= y <= 10, where (x,y) has > +# parents (x-1, y) and (x, y-1), keeping in mind that > +# we drop a parent if a coordinate is nonpositive. > +# > +#

Re: [RFC PATCH 03/13] commit-reach: move commit_contains from ref-filter

2018-06-29 Thread Junio C Hamano
Derrick Stolee writes: > +int commit_contains(struct ref_filter *filter, struct commit *commit, > + struct commit_list *list, struct contains_cache *cache) This is a symbol that is used to be file-local private. Is it named appropriately in the new context, which is "globally vi

Re: [RFC PATCH 04/13] upload-pack: make reachable() more generic

2018-06-29 Thread Junio C Hamano
Derrick Stolee writes: > In anticipation of moving the reachable() method to commit-reach.c, > modify the prototype to be more generic to flags known outside of > upload-pack.c. Also rename 'want' to 'from' to make the statement > more clear outside of the context of haves/wants negotiation. FWI

Re: [RFC PATCH 08/13] test-reach: test reduce_heads()

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > > Signed-off-by: Derrick Stolee > --- > t/t6600-test-reach.sh | 26 ++ > 1 file changed, 26 insertions(+) > > diff --git a/t/t6600-test-reach.sh b/t/t6600-test-reach.sh > index c9337b6b46..0f60db9c60 100755 > --- a/t

Re: fast-import slowness when importing large files with small differences

2018-06-29 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 29 2018, Mike Hommey wrote: > I noticed some slowness when fast-importing data from the Firefox mercurial > repository, where fast-import spends more than 5 minutes importing ~2000 > revisions of one particular file. I reduced a testcase while still > using real data. One could synth

Re: [PATCH v3 00/32] object-store: lookup_commit

2018-06-29 Thread Brandon Williams
On 06/29, Junio C Hamano wrote: > Stefan Beller writes: > > > On Fri, Jun 29, 2018 at 11:03 AM Junio C Hamano wrote: > >> > >> Junio C Hamano writes: > >> > >> > One technique these (not just this) recent efforts seem to be > >> > forgetting is to introduce "new" names that take a_repo and then

Re: [PATCH] fetch: when deepening, check connectivity fully

2018-06-29 Thread Jonathan Tan
> > That is the way it should work, but after thinking about it once more, I > > realize that it isn't. > > > > opt->shallow_file is not set to anything. And fetch-pack updates the > > shallow file by itself (at least, that is my understanding of > > update_shallow() in fetch-pack.c) before fetch c

Re: [RFC PATCH 11/13] commit-reach: make can_all_from_reach... linear

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > > The can_all_from_reach_with_flags() algorithm is currently quadratic in > the worst case, because it calls the reachable() method for every 'from' > without tracking which commits have already been walked or which can > already reach a comm

Re: [RFC PATCH 13/13] commit-reach: use can_all_from_reach

2018-06-29 Thread Stefan Beller
Hi Derrick, On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > > The is_descendant_of method previously used in_merge_bases() to check if > the commit can reach any of the commits in the provided list. This had > two performance problems: > > 1. The performance is quadratic in worst-case. > >

Re: fast-import slowness when importing large files with small differences

2018-06-29 Thread Mike Hommey
On Sat, Jun 30, 2018 at 12:10:24AM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Jun 29 2018, Mike Hommey wrote: > > > I noticed some slowness when fast-importing data from the Firefox mercurial > > repository, where fast-import spends more than 5 minutes importing ~2000 > > revisions of one

[PATCH] xdiff: reduce indent heuristic overhead

2018-06-29 Thread Stefan Beller
From: Jun Wu This patch was written originally for mercurial at [1], adding a limit on how long we'd be looking for an optimal indent heuristic. Choose the limit high enough to only limit edge cases. Adds some threshold to avoid expensive cases, like: ``` #!python open('a', 'w')

Re: [PATCH] xdiff: reduce indent heuristic overhead

2018-06-29 Thread Jun Wu
Excerpts from Stefan Beller's message of 2018-06-29 16:37:41 -0700: > [...] > Jun, Junio > > By changing the authorship we'd want to have a sign off from the original > author, > before applying; in the previous attempt, I was merely taking the code from > mercurial as their copy of xdiff is also

Re: [RFC PATCH 03/13] commit-reach: move commit_contains from ref-filter

2018-06-29 Thread Derrick Stolee
On 6/29/2018 5:38 PM, Stefan Beller wrote: Hi Derrick, +struct ref_filter_cbdata { + struct ref_array *array; + struct ref_filter *filter; + struct contains_cache contains_cache; + struct contains_cache no_contains_cache; These members also seem to be moved whitespace-i

Re: [RFC PATCH 06/13] commit-reach: move can_all_from_reach_with_flag()

2018-06-29 Thread Derrick Stolee
On 6/29/2018 5:47 PM, Stefan Beller wrote: Hi Derrick, +static int reachable(struct commit *from, int with_flag, int assign_flag, time_t min_commit_date) [...] + if (commit->date < min_commit_date) + continue; [...] +int can_all_from_reach_with_flag(str

Re: [RFC PATCH 07/13] test-reach

2018-06-29 Thread Derrick Stolee
On 6/29/2018 5:54 PM, Stefan Beller wrote: On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: +# Construct a grid-like commit graph with points (x,y) +# with 1 <= x <= 10, 1 <= y <= 10, where (x,y) has +# parents (x-1, y) and (x, y-1), keeping in mind that +# we drop a parent if a coordinat

I am Mr. Hussein Harmuh from Syria. I got my information while I was searching a trusted person, I have a very profitable business offer for you and I can assure you that you will not regret being par

2018-06-29 Thread Hussein Harmuh
Col. Hussein Kharmusch