Community
Participate
Working Groups
Build Identifier: 201110171000 When replacing a file in the staging view sometimes the contents are replaced (which is what I expect) but the file still shows in the Unstaged Changes pane (not what I expect). When I diff the file, there are no changes. Once this happens I can go to the command line and 'git status' shows the file as modified, but 'git diff' shows no changes (meaning, git agrees with EGit). This only happens occasionally, and I haven't found a reliable way to reproduce 100% of the time. Reproducible: Sometimes Steps to Reproduce: 1. in the staging view, right click a file in the Unstaged Changes 2. choose 'Replace with File in Git Index' 3. sometimes the file stays in Unstaged Changes. If I double-click the entry in Unstaged Changes (to see the diff) there are no differences.
Could you check for changes in line endings ? What's your setting for core.autocrlf ?
(In reply to comment #1) > Could you check for changes in line endings ? > What's your setting for core.autocrlf ? That's a really good idea. My ~/.gitconfig has autocrlf set to false. I'll check that out the next time I reproduce it. Also, I've never seen this in 1.0. It seemed to first occur in egit 1.1
ok I can finally consistently reproduce this. note: I have core.autocrlf set to false To reproduce: 1. make a change to a Java or Groovy file 2. run the Eclipse code formatter 3. stage the file 4. unstage the file 5. right click on it in the Git Staging view -> Replace with File in Git Index The contents will have been replaced but the file still shows up in the `Unstaged changes` panel. Running `git status` from the command line also shows the file as being modified though the diff is empty. I have Eclipse setup to format my code each save, so I may see this bug in the following use case: 1. make a bunch of changes (formatter is run on each save) 2. stage all of the files 3. unstage the one file I don't want to commit 4. replace that file with the one in the git index 5. see the bug
Hi, Do you still see this issue in 1.2? There were fixes both checkout and the staging view that may have fixed this issue.
fixed in 1.2! Thank you!!