Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-09 Thread Junio C Hamano
Jeff King writes: > Generation numbers are a little trickier, though, because they imply an > actual topological traversal. It might actually be easier to couple this > with the connectivity check we do after index-pack finishes (though I've > often wondered if we could drop that check in favor o

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Jeff King
On Fri, Sep 06, 2019 at 02:46:22PM -0700, Junio C Hamano wrote: > > You're right that we could isolate the new write to the refs we > > just received. We could use the more cumbersome write_commit_graph() > > method with a list of commit oids as starting points. I'm happy to > > make that change i

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Jeff King
On Fri, Sep 06, 2019 at 02:57:55PM -0700, Junio C Hamano wrote: > > I think the "stock git without any other job infrastructure" is > > a very important scenario. Putting the simplest version of > > "commit-graph writes in-line with every push" seems to be ripe > > for failure under load. I'd rath

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Jeff King
On Fri, Sep 06, 2019 at 05:04:17PM -0400, Derrick Stolee wrote: > On 9/6/2019 4:42 PM, Junio C Hamano wrote: > > Jeff King writes: > > > >> I suppose so. But I think the "stock git without any other job > >> infrastructure" case would still benefit. > > > > Oh, no question about it. > > > > I

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Junio C Hamano
Derrick Stolee writes: > On 9/6/2019 4:42 PM, Junio C Hamano wrote: >> Jeff King writes: >> >>> I suppose so. But I think the "stock git without any other job >>> infrastructure" case would still benefit. >> >> Oh, no question about it. >> >> I did question if an automatic writing would benef

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Junio C Hamano
Derrick Stolee writes: >>> + write_commit_graph_reachable(get_object_directory(), >>> +commit_graph_flags, >>> +&split_opts); >>> + } >> >> As a low-impact change this is good. >> >> For longer term, i

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Derrick Stolee
On 9/6/2019 4:42 PM, Junio C Hamano wrote: > Jeff King writes: > >> I suppose so. But I think the "stock git without any other job >> infrastructure" case would still benefit. > > Oh, no question about it. > > I did question if an automatic writing would benefit the side that > receives a push

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Junio C Hamano
Jeff King writes: > I suppose so. But I think the "stock git without any other job > infrastructure" case would still benefit. Oh, no question about it. I did question if an automatic writing would benefit the side that receives a push when you brought up the usual "fetch.* and receive.* for se

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Jeff King
On Fri, Sep 06, 2019 at 11:24:12AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Sure, but wouldn't that similarly apply to fetching? What is it that > > makes bursts of pushes more likely than bursts of fetches? > > Because people tend to use a repository as a gathering point? You >

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Junio C Hamano
Jeff King writes: > Sure, but wouldn't that similarly apply to fetching? What is it that > makes bursts of pushes more likely than bursts of fetches? Because people tend to use a repository as a gathering point? You may periodically fetch from and push to a repository, and you may even do so at

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Jeff King
On Fri, Sep 06, 2019 at 01:00:40PM -0400, Derrick Stolee wrote: > On 9/5/2019 4:37 PM, Junio C Hamano wrote: > > Jeff King writes: > > > >> Do we want to to have fetch.writeCommitGraph, receive.writeCommitGraph, > >> and then a master transfer.writeCommitGraph? > > > > If anything, it may be go

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-06 Thread Derrick Stolee
On 9/5/2019 4:37 PM, Junio C Hamano wrote: > Jeff King writes: > >> Do we want to to have fetch.writeCommitGraph, receive.writeCommitGraph, >> and then a master transfer.writeCommitGraph? > > If anything, it may be good for consistency. > > I am not sure if it is a good idea to trigger writing

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-05 Thread Junio C Hamano
Jeff King writes: > Do we want to to have fetch.writeCommitGraph, receive.writeCommitGraph, > and then a master transfer.writeCommitGraph? If anything, it may be good for consistency. I am not sure if it is a good idea to trigger writing the commit graph when accepting a push, though. It tends

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-03 Thread Jeff King
On Mon, Sep 02, 2019 at 07:22:02PM -0700, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee > > The commit-graph feature is now on by default, and is being > written during 'git gc' by default. Typically, Git only writes > a commit-graph when a 'git gc --auto' command passes the gc.a

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-03 Thread Derrick Stolee
On 9/3/2019 3:05 PM, Junio C Hamano wrote: > "Derrick Stolee via GitGitGadget" writes: > >> diff --git a/builtin/fetch.c b/builtin/fetch.c >> index 53ce99d2bb..d36a403859 100644 >> --- a/builtin/fetch.c >> +++ b/builtin/fetch.c >> @@ -23,6 +23,7 @@ >> #include "packfile.h" >> #include "list-obj

Re: [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-03 Thread Junio C Hamano
"Derrick Stolee via GitGitGadget" writes: > diff --git a/builtin/fetch.c b/builtin/fetch.c > index 53ce99d2bb..d36a403859 100644 > --- a/builtin/fetch.c > +++ b/builtin/fetch.c > @@ -23,6 +23,7 @@ > #include "packfile.h" > #include "list-objects-filter-options.h" > #include "commit-reach.h" >

[PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-02 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The commit-graph feature is now on by default, and is being written during 'git gc' by default. Typically, Git only writes a commit-graph when a 'git gc --auto' command passes the gc.auto setting to actualy do work. This means that a commit-graph will typically fall behind th