From: Junio C Hamano <gitster@pobox.com>
To: Curtis Allen Smith <curtis.allen.smith@gmail.com>
Cc: git@vger.kernel.org, "Torsten Bögershausen" <tboegi@web.de>
Subject: Re: [PATCH 1/2] read-cache: do not trust a size change when conversion is active
Date: Thu, 08 Oct 2026 22:37:27 -0700 [thread overview]
Message-ID: <xmqqfqyfwi20.fsf@gitster.g> (raw)
In-Reply-To: <20261008204603.1988-2-curtis.allen.smith@gmail.com> (Curtis Allen Smith's message of "Thu, 8 Oct 2026 14:45:03 -0600")
Curtis Allen Smith <curtis.allen.smith@gmail.com> writes:
> "git status" can report a file as modified while "git diff" and
> ...
> next run of the tool flags everything again.
>
> Signed-off-by: Curtis Allen Smith <curtis.allen.smith@gmail.com>
> ---
That's overly verbose.
> read-cache.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++--
> t/t0020-crlf.sh | 45 +++++++++++++++++
> 2 files changed, 171 insertions(+), 3 deletions(-)
And it is curious why we need so much new code, especially after
reading an explaination in the proposed log message that makes it
sound as if "we let ce_modified_check_fs() to compare converted
result already when timestamps differ, and it is just the matter of
doing the same when sizes are the same" is what is happening in the
patch. Why do we need to add a new function that compares converted
data? A new function is not automatically a bad thing. If there is
already an existing code path that does the same thing, a new
function may be a good way to replace that code path with a more
generic code and apply essentially the same logic implemented by
that new more generic code to a new code path. But in such a
refactoring patch, we usually see a comparable number of removed
lines, which is not what we see in the diffstat above.
next prev parent reply other threads:[~2026-10-09 5:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 20:45 [PATCH 0/2] status: agree with diff and add when conversion is active Curtis Allen Smith
2026-10-08 20:45 ` [PATCH 1/2] read-cache: do not trust a size change " Curtis Allen Smith
2026-10-09 5:37 ` Junio C Hamano [this message]
2026-10-08 20:45 ` [PATCH 2/2] core: add core.convertAwareStatus to opt out of the content check Curtis Allen Smith
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=xmqqfqyfwi20.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=curtis.allen.smith@gmail.com \
--cc=git@vger.kernel.org \
--cc=tboegi@web.de \
/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