Re: [PATCH 1/5] eoie: default to not writing EOIE section

2018-11-21 Thread Junio C Hamano
Jeff King writes: > Yes, there are two ways to write this. With a conditional to initialize > and return or to return the default, as we have here: > >> > >+ if (!git_config_get_bool("index.recordendofindexentries", )) >> > >+ return val; >> > >+ return 0; > > Or initialize the default

Re: [PATCH 1/5] eoie: default to not writing EOIE section

2018-11-21 Thread Jeff King
On Tue, Nov 20, 2018 at 02:21:51PM +0100, SZEDER Gábor wrote: > On Tue, Nov 20, 2018 at 08:06:16AM -0500, Ben Peart wrote: > > >diff --git a/read-cache.c b/read-cache.c > > >index 4ca81286c0..1e9c772603 100644 > > >--- a/read-cache.c > > >+++ b/read-cache.c > > >@@ -2689,6 +2689,15 @@ void

Re: [PATCH 1/5] eoie: default to not writing EOIE section

2018-11-20 Thread Ben Peart
On 11/20/2018 1:11 AM, Jonathan Nieder wrote: Since 3b1d9e04 (eoie: add End of Index Entry (EOIE) extension, 2018-10-10) Git defaults to writing the new EOIE section when writing out an index file. Usually that is a good thing because it improves threaded performance, but when a Git

Re: [PATCH 1/5] eoie: default to not writing EOIE section

2018-11-20 Thread SZEDER Gábor
On Tue, Nov 20, 2018 at 08:06:16AM -0500, Ben Peart wrote: > >diff --git a/read-cache.c b/read-cache.c > >index 4ca81286c0..1e9c772603 100644 > >--- a/read-cache.c > >+++ b/read-cache.c > >@@ -2689,6 +2689,15 @@ void update_index_if_able(struct index_state *istate, > >struct lock_file *lockfile >

Re: [PATCH 1/5] eoie: default to not writing EOIE section

2018-11-20 Thread Ben Peart
On 11/20/2018 1:11 AM, Jonathan Nieder wrote: Since 3b1d9e04 (eoie: add End of Index Entry (EOIE) extension, 2018-10-10) Git defaults to writing the new EOIE section when writing out an index file. Usually that is a good thing because it improves threaded performance, but when a Git

[PATCH 1/5] eoie: default to not writing EOIE section

2018-11-19 Thread Jonathan Nieder
Since 3b1d9e04 (eoie: add End of Index Entry (EOIE) extension, 2018-10-10) Git defaults to writing the new EOIE section when writing out an index file. Usually that is a good thing because it improves threaded performance, but when a Git repository is shared with older versions of Git, it