Git development
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Curtis Allen Smith <curtis.allen.smith@gmail.com>,
	git@vger.kernel.org, Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH v5] read-cache: do not trust a size change when conversion is active
Date: Sun, 18 Oct 2026 13:18:51 +0200	[thread overview]
Message-ID: <20261018111851.GA27528@tb-raspi4> (raw)
In-Reply-To: <xmqq1p9twdhh.fsf@gitster.g>

On Tue, Oct 13, 2026 at 01:29:46PM -0700, Junio C Hamano wrote:
> Curtis Allen Smith <curtis.allen.smith@gmail.com> writes:
> 
> > 	git status --short      # ->  M file.txt
> > 	git diff                # -> empty
> > 	git add file.txt        # -> nothing to commit
> 
> I do not think "git add" would ever say nothing to commit.
> 
> 	git commit file.txt
> 
> may say "nothing added to commit" when there is no modification made
> to file.txt to indicate that there is no change worth comitting.
> 
> There are code paths that make performance trade-offs (see the
> introductory part of Documentation/technical/racy-git.adoc for
> examples) and are designed to tolerate false positives from
> ie_modified(), filtering them out themselves.  I am somewhat
> hesitant to butcher code paths at this low level to make
> unconditional changes that reduce false positives without thinking
> things through.  For example, we may want to disable this new code
> when the 'CE_MATCH_RACY_IS_DIRTY' bit is set.  But the goal
> nevertheless should be to avoid surfacing these false positives,
> which are deliberately allowed as performance trade-offs, to code
> paths like 'git status' that do not further filter them out (as you
> demonstrated above).
> 
> There may be other cases where this patch unknowingly breaks
> carefully made performance trade-offs.


Looking at CE_MATCH_RACY_IS_DIRTY it seems as if the call
to would_convert_to_git()may be better done in ie_match_stat() ?


Beside that I was able to test it with a real live repo,
where a clean filter replaces a TAB with 4 spaces: Now
git status no longer claims the file to be modified
(and refuses to stash or other operations))

[snip]

  reply	other threads:[~2026-10-18 11:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-11 19:51 [PATCH v2 1/2] utf8.c: Prepare workaround for iconv under macOS 14/15 tboegi
2026-01-12  4:58 ` Junio C Hamano
2026-01-12 16:25   ` [PATCH v3 0/2] Workaround " tboegi
2026-01-12 16:25   ` [PATCH v3 1/2] utf8.c: Prepare workaround " tboegi
2026-01-12 16:25   ` [PATCH v3 2/2] utf8.c: Enable " tboegi
2026-10-12 17:56   ` [PATCH v3/RFC 0/1] read-cache: do not trust a size change when conversion tboegi
2026-10-12 17:56   ` [PATCH v3/RFC 1/1] read-cache: do not trust a size change when conversion is active tboegi
2026-10-12 19:11     ` Junio C Hamano
2026-10-13  1:29       ` Junio C Hamano
2026-10-13  6:45         ` Curtis Smith
2026-10-13  5:34     ` Johannes Sixt
2026-10-13  6:48       ` Curtis Smith
2026-10-13  6:58     ` [PATCH v4] " Curtis Allen Smith
2026-10-13  9:44       ` Phillip Wood
2026-10-13 17:57         ` Curtis Smith
2026-10-13 18:01       ` Torsten Bögershausen
2026-10-13 18:02       ` [PATCH v5] " Curtis Allen Smith
2026-10-13 20:29         ` Junio C Hamano
2026-10-18 11:18           ` Torsten Bögershausen [this message]
2026-10-19  5:57             ` Junio C Hamano

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=20261018111851.GA27528@tb-raspi4 \
    --to=tboegi@web.de \
    --cc=curtis.allen.smith@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood123@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