From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Christoph Groth <christoph@grothesque.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Stat cache in .git/index hinders syncing of repositories
Date: Sat, 18 Jan 2020 19:42:04 +0000 [thread overview]
Message-ID: <20200118194204.GC6570@camp.crustytoothpaste.net> (raw)
In-Reply-To: <87pnfgshxu.fsf@drac>
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
On 2020-01-18 at 19:06:21, Christoph Groth wrote:
> But if the above is not feasible for some reason, would it be possible
> to provide a switch for disabling stat caching optimization?
Git is going to perform really terribly on repositories of any size if
you disable stat caching, so we're not very likely to implement such a
feature. Even if we did implement it, you probably wouldn't want to use
it.
However, there are the core.checkStat and core.trustctime options which
can control which information is used in the stat caching. You can
restrict it to the whole second part of mtime and the file size if you
want. See git-config(1) for more details.
Note that this assumes that (a) your sync tool can honor mtimes and (b)
that your sync tool syncs to another system of the same type. You may
still run into problems if you share files between Linux and Windows
because symbolic links are different sizes there. (This also bites
WSL.) Since rsync can do the former, I think it's a reasonable
expectation that other tools can as well.
One final word of caution: you probably want to activate your sync tool
only manually and only when the repository is idle. Tools like Dropbox
that automatically sync files one by one have been known to corrupt
repositories because the way they sync data leaves the repository in an
inconsistent state and doesn't honor standard POSIX file system
semantics which Git relies on for integrity.
Hopefully with that information you can find a configuration and tool
that work for you.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]
next prev parent reply other threads:[~2020-01-18 19:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 23:57 Stat cache in .git/index hinders syncing of repositories Christoph Groth
2020-01-18 18:15 ` Junio C Hamano
2020-01-18 19:06 ` Christoph Groth
2020-01-18 19:42 ` brian m. carlson [this message]
2020-01-18 22:04 ` Christoph Groth
2020-01-20 12:01 ` Johannes Schindelin
2020-01-20 23:53 ` Christoph Groth
2020-01-21 2:53 ` brian m. carlson
2020-01-24 9:16 ` Christoph Groth
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=20200118194204.GC6570@camp.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=christoph@grothesque.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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;
as well as URLs for NNTP newsgroup(s).