Thread (1 message) 1 message, 1 author, 2022-01-25

Re: A puzzle: reset --hard and hard links

From: Andreas Schwab <hidden>
Date: 2022-01-25 08:55:17

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."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help