From: Andreas Schwab <schwab@linux-m68k.org>
To: Michael Herrmann <michael@herrmann.io>
Cc: Junio C Hamano <gitster@pobox.com>,
"brian m. carlson" <sandals@crustytoothpaste.net>,
git@vger.kernel.org
Subject: Re: A puzzle: reset --hard and hard links
Date: Tue, 25 Jan 2022 09:49:55 +0100 [thread overview]
Message-ID: <875yq842to.fsf@igel.home> (raw)
In-Reply-To: <CABrKpmDjrTPhL_55YaXEAVTEmu8iZEsKUJYab7OgK0=w9d_7MA@mail.gmail.com> (Michael Herrmann's message of "Mon, 24 Jan 2022 18:50:49 -0300")
On Jan 24 2022, Michael Herrmann wrote:
> My suspicion is that Git keeps a cache of the stat(...) result of
> files. An additional hard link increases the .st_nlink count of this
> struct. `git reset` compares the cached stat(...) values to the actual
> ones and sees that one has changed. `git status` does the same but is
> smart enough to realize that the additional hard link does not change
> anything. It writes this to the cache. `git reset` should also be
> smart!
See the core.trustctime config.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2022-01-25 8:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 20:37 A puzzle: reset --hard and hard links Michael Herrmann
2022-01-19 22:20 ` brian m. carlson
2022-01-19 22:37 ` Junio C Hamano
2022-01-20 8:59 ` Michael Herrmann
2022-01-20 22:20 ` brian m. carlson
2022-01-21 12:50 ` Michael Herrmann
2022-01-24 13:48 ` Michael Herrmann
2022-01-24 18:07 ` Junio C Hamano
2022-01-24 18:16 ` Michael Herrmann
2022-01-24 21:19 ` Junio C Hamano
2022-01-24 21:50 ` Michael Herrmann
2022-01-25 8:49 ` Andreas Schwab [this message]
2022-01-25 11:33 ` Ævar Arnfjörð Bjarmason
2022-01-25 13:29 ` Andreas Schwab
2022-01-25 14:30 ` Michael Herrmann
2022-01-26 2:14 ` brian m. carlson
2022-01-26 18:46 ` Junio C Hamano
2022-01-24 22:18 ` rsbecker
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=875yq842to.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=michael@herrmann.io \
--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 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).