From: Derrick Stolee <stolee@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>,
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, me@ttaylorr.com,
Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH] config: set pack.useSparse=true by default
Date: Thu, 19 Mar 2020 20:34:02 -0400 [thread overview]
Message-ID: <7986b9d0-34cb-5a60-484d-ba268dad146a@gmail.com> (raw)
In-Reply-To: <20200319231332.GB129493@google.com>
On 3/19/2020 7:13 PM, Jonathan Nieder wrote:
> Hi,
>
> Derrick Stolee wrote:
>
>> The pack.useSparse config option was introduced by 3d036eb0
>> (pack-objects: create pack.useSparse setting, 2019-01-19) and was
>> first available in v2.21.0. When enabled, the pack-objects process
>> during 'git push' will use a sparse tree walk when deciding which
>> trees and blobs to send to the remote. The algorithm was introduced
>> by d5d2e93 (revision: implement sparse algorithm, 2019-01-16) and
>> has been in production use by VFS for Git since around that time.
>> The features.experimental config option also enabled pack.useSparse,
>> so hopefully that has also increased exposure.
>>
>> It is worth noting that pack.useSparse has a possibility of
>> sending more objects across a push, but requires a special
>> arrangement of exact _copies_ across directories. There is a test
>> in t5322-pack-objects-sparse.sh that demonstrates this possibility.
>>
>> Since the downside is unlikely but the upside is significant, set
>> the default value of pack.useSparse to true. Remove it from the
>> set of options implied by features.experimental.
>>
>> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
>> ---
>> Documentation/config/feature.txt | 3 ---
>> Documentation/config/pack.txt | 4 ++--
>> repo-settings.c | 3 ++-
>> 3 files changed, 4 insertions(+), 6 deletions(-)
>
> Makes sense. Thanks for writing it.
>
> Should this have a test?
I suppose the test that demonstrates the difference in algorithm
in t5322-pack-objects-sparse.sh could be adjusted to drop the
explicit config setting, which would demonstrate that the config
option is being set correctly.
While looking at that test, I see that we use --[no-]sparse
explicitly everywhere to avoid conflicts with the GIT_TEST_*
variable that enables the algorithm. This leads to two things
I will do in v2 that I did not do here:
1. Update the docs for "git pack-objects" because it doesn't
reference that --no-sparse is an option. Point out that the
new default is --sparse.
2. Remove GIT_TEST_PACK_SPARSE which was used to test this sparse
algorithm throughout the test suite.
Thanks,
-Stolee
next prev parent reply other threads:[~2020-03-20 0:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 1:58 [PATCH] config: set pack.useSparse=true by default Derrick Stolee via GitGitGadget
2020-03-19 23:13 ` Jonathan Nieder
2020-03-20 0:34 ` Derrick Stolee [this message]
2020-03-20 12:27 ` [PATCH v2] " Derrick Stolee via GitGitGadget
2020-03-20 12:38 ` [PATCH v3 0/2] " Derrick Stolee via GitGitGadget
2020-03-20 12:38 ` [PATCH v3 1/2] " Derrick Stolee via GitGitGadget
2020-03-20 12:38 ` [PATCH v3 2/2] pack-objects: flip the use of GIT_TEST_PACK_SPARSE Derrick Stolee via GitGitGadget
2020-03-20 20:43 ` [PATCH v2] config: set pack.useSparse=true by default Junio C Hamano
2020-03-20 21:14 ` Derrick Stolee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7986b9d0-34cb-5a60-484d-ba268dad146a@gmail.com \
--to=stolee@gmail.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=jrnieder@gmail.com \
--cc=me@ttaylorr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).