All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Marc Strapetz <marc.strapetz@syntevo.com>, git@vger.kernel.org
Subject: Re: Should update-index --refresh force writing the index in case of racy timestamps?
Date: Fri, 17 Dec 2021 16:08:32 -0800	[thread overview]
Message-ID: <xmqqee6a22rj.fsf@gitster.g> (raw)
In-Reply-To: <Ybz9ruQ/uOfFbn3W@camp.crustytoothpaste.net> (brian m. carlson's message of "Fri, 17 Dec 2021 21:14:22 +0000")

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> On 2021-12-17 at 10:44:32, Marc Strapetz wrote:
>> For one of my Git-LFS test repositories, switching between branches quite
>> often results in lots of racy index timestamps. Subsequent calls to "git
>> update-index --refresh" or "git status" will invoke the "lfs" filter over
>> and over again, just to figure out that all entries are still up-to-date.
>> Hence, the index will never be rewritten and racy timestamps will remain.
>> 
>> To break out of this state, it seems favorable to write the index if any
>> racy timestamp is detected. We will be able to provide a patch if this
>> change sounds reasonable.
>
> Sure, this sounds reasonable, especially if, as you mentioned, git
> status already does this.  We might as well make the plumbing commands
> as functional as the porcelain commands.

Given that "update-index --refresh" is a way to say "we know
something changed to make cached stat information dirty even for
otherwise clean paths and we want our 'diff-files' and other
plumbing command to start relying on the cached stat information
again, so please do as much I/O as you need", I agree that it should
do as thourough job as necessary.

  reply	other threads:[~2021-12-18  0:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 10:44 Should update-index --refresh force writing the index in case of racy timestamps? Marc Strapetz
2021-12-17 11:04 ` Marc Strapetz
2021-12-17 21:14 ` brian m. carlson
2021-12-18  0:08   ` Junio C Hamano [this message]
2021-12-22 11:42     ` Marc Strapetz

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=xmqqee6a22rj.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=marc.strapetz@syntevo.com \
    --cc=sandals@crustytoothpaste.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.