From: Junio C Hamano <gitster@pobox.com>
To: "ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
"Christian Couder" <christian.couder@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Derrick Stolee" <derrickstolee@github.com>,
"Johannes Schindelin" <johannes.schindelin@gmx.de>,
"Elijah Newren" <newren@gmail.com>,
"James Ramsay" <james@jramsay.com.au>,
"ZheNing Hu" <adlternative@gmail.com>
Subject: Re: [PATCH] pack-objects: introduce --exclude-delta=<pattern> option
Date: Sat, 22 Oct 2022 10:00:36 -0700 [thread overview]
Message-ID: <xmqqr0yzhjyj.fsf@gitster.g> (raw)
In-Reply-To: <pull.1392.git.1666453564661.gitgitgadget@gmail.com> (ZheNing Hu via GitGitGadget's message of "Sat, 22 Oct 2022 15:46:04 +0000")
"ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: ZheNing Hu <adlternative@gmail.com>
>
> The server uses delta compression during git clone to reduce
> the amount of data transferred over the network, but delta
> compression for large binary blobs often does not reduce
> storage size significantly and wastes a lot of CPU. Git now
> disables delta compression for objects that meet these conditions:
>
> 1. files that have -delta set in .gitattributes
> 2. files that its size exceed the big_file_threshold
>
> However, in 1, .gitattributes needs to be set manually by the user,
> and in most cases the user does not actively set it, and it is not
> something that can be actively adjusted on the server aside. In 2,
> the big_file_threshold now defaults to 512MB, and many binary files
> smaller than that will be uselessly delta-compressed, and this is
> made worse if the server actively increases the big_file_threshold.
Who are you trying to help, though? The user has to somehow
manually cause the --exclude-delta=<pattern> to be added at the
server side, so I do not see the new feature as correcting the
weakness you perceive in the approach to mark the undeltifiable
blobs in the attributes system at all. Does this feature assume
that the server operator knows better than the project that can
maintain their own .gitattributes in tree? If so, the server
operator can already use <bare-repository>/info/attributes file
to achieve that already, no?
Now hosting sites may not give hosted projects flexibility to
configure their own server side repositories, like its "config"
and "info/attributes", but that limitation would equally apply
what command line options pack-objects runs with.
So, again, it is not clear who this patch is trying to help and how.
If we assume that the hosting operators can give project owners more
control of how the server side is configured, then we can do that
already without a new option, no?
IOW
> Therefore, we need a way to be able to actively skip the delta
> compression of some files on the server.
I do not quite follow the "Therefore" here.
prev parent reply other threads:[~2022-10-22 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-22 15:46 [PATCH] pack-objects: introduce --exclude-delta=<pattern> option ZheNing Hu via GitGitGadget
2022-10-22 17:00 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr0yzhjyj.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=adlternative@gmail.com \
--cc=avarab@gmail.com \
--cc=christian.couder@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=james@jramsay.com.au \
--cc=johannes.schindelin@gmx.de \
--cc=newren@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox