Re: Files modified, even after: git reset --hard
- From
- Martin <git@mfriebe.de>
- Date
- Jul 26, 2021, 19:57 UTC
- Message-ID
- <67f35be7-3317-6486-cdb6-62eb691eaf10@mfriebe.de>
- In-Reply-To
- <CAPx1GvdM7CzsbT1SWW9+OPcG9FL7WXQ7YD6aM7P0krujp_OrkQ@mail.gmail.com>
On 26/07/2021 04:59, Chris Torek wrote:
Show 25 quoted lines
> On Sun, Jul 25, 2021 at 6:34 PM Martin <git@mfriebe.de> wrote: >> Actually there is something else. >> >> If a file has line-endings that will change, then >> git add --renormalize . >> git commit -m foo >> will commit those files. >> >> But I am now also getting files, that show modified, but that can not be >> committed renormalized (0 lines changed). > > I believe (but can't demonstrate) that this is a temporary condition. > > Git has a number of cheats to make `git status` and other ops fast. > These cheats *assume* that the committed files, the index copies > of files, and the working tree copies of files all agree in terms of > line endings as coordinated through `core.autocrlf` and `.gitattributes` > settings. > > When they *don't* agree, you get phantom differences. Running > commands like `git diff` show no differences because of these > phantom states. Eventually this clears up on its own when the > cheats really *do* agree with the settings. Changing the settings > is what disturbs the cheats. >
Is it possible that those cheats also look at the "replaced" (rather than the "replacement") commit(s)?
I am pretty sure I have "git replace"d all blobs for some of the files, and yet they do get phantoms.