Re: Bug? Git checkout fails with a wrong error message
- From
- Holger Hellmuth <hellmuth@ira.uka.de>
- Date
- Jan 16, 2012, 11:07 UTC
- Message-ID
- <4F1404E7.9040805@ira.uka.de>
- In-Reply-To
- <4F128AD0.5020101@unclassified.de>
On 15.01.2012 09:14, Yves Goergen wrote:
Show 15 quoted lines
> On 13.01.2012 20:28 CE(S)T, Holger Hellmuth wrote: >> Is it possible that Visual Studio changes them while you are comitting? > > No. Those files may only be modified while open. > >>> I renamed the file and created a new one with the same name. Is it so >>> simple to crash the Git repository? >> >> Who said anything about crash? git simply doesn't care whether a change >> is because of a rename. It isn't special or different to any change you >> can make to a file > > Well, there is a tracked file about which Git says it's untracked. How > would you describe such internal inconsistency? Maybe corruption would > fit better.
The original point I was trying to make was that git rename is made out of the rather simple operations git add <newname> and git rm <oldname>. Not a seldom used function but the basic operations of the vcs. It must be one heck of a corner case or a bit flip in the hardware.
The most likely place where the corruption could be is the index. This is actually a simple file located in .git\ that can be recreated by deleting that file and doing "git reset". I would shut down tortoise-git (i.e. the explorer) before doing this and use the command line.