From: Junio C Hamano <gitster@pobox.com>
To: "Xing Xin" <bupt_xingxin@163.com>
Cc: "blanet via GitGitGadget" <gitgitgadget@gmail.com>,
git@vger.kernel.org, "Xing Xin" <xingxin.xx@bytedance.com>
Subject: Re: [PATCH] read-cache: hash the shared index even with index.skipHash
Date: Fri, 27 Nov 2026 10:44:14 -0800 [thread overview]
Message-ID: <xmqqwlpy8681.fsf@gitster.g> (raw)
In-Reply-To: <5dfa732c.94b8.1a21d16a974.Coremail.bupt_xingxin@163.com> (Xing Xin's message of "Fri, 27 Nov 2026 20:59:14 +0800 (CST)")
"Xing Xin" <bupt_xingxin@163.com> writes:
>> the most from skipHash? And this patch is breaking the skipHash feature
>> for the use case that would benefit the most. And not hashing the index
>> files that are not bases would not save as much, since they are expected
>> to be much smaller.
>
> Per write, yes. But what skipHash saves is the hashing done on each
> write, and the shared index is only written when it is rewritten,
> which the split index is designed to make rare. The frequent writes
> are of the small split index, where, as you say, there is little to
> save.
That is a very good justification to give in the proposed commit log
message and also in the documentation (the behaviour may already be
documented in this initial version of the patch, but the reason why the
base index ignores the skipHash configuration deserves a mention, too).
> - index.skipHash is only ever a configuration variable: it is either
> implied by feature.manyFiles, or set as index.skipHash, by the user
> or by Scalar, which writes index.skipHash=true into the repository
> configuration and resets it on "scalar reconfigure".
>
> - The split index is enabled by core.splitIndex, which neither a
> feature.* setting nor Scalar sets, or by "git update-index
> --split-index", which stays in effect while core.splitIndex is
> unset.
>
> When both are set in the configuration, there is no telling which one
> the user cares about more.
Isn't that mostly a defect of Scalar? Such a tool that configures the
repository without close supervision by the user should be responsible
for ensuring that the resulting set of configuration variables gives a
coherent story of what the user wants.
But by going the route of your patch, we no longer have to worry about
these two features conflicting, so I would say it is a good direction to
go.
Thanks.
next prev parent reply other threads:[~2026-11-27 18:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 13:57 [PATCH] read-cache: hash the shared index even with index.skipHash blanet via GitGitGadget
2026-11-26 19:21 ` Junio C Hamano
2026-11-27 12:59 ` Xing Xin
2026-11-27 18:44 ` Junio C Hamano [this message]
2026-11-28 9:27 ` [PATCH v2] " blanet via GitGitGadget
2026-11-28 21:41 ` Junio C Hamano
2026-11-30 7:47 ` Xing Xin
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=xmqqwlpy8681.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=bupt_xingxin@163.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=xingxin.xx@bytedance.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