Home » Eclipse Projects » EGit / JGit » After upgrade to 2020-03, egit sees unstaged changes even after replace with HEAD
After upgrade to 2020-03, egit sees unstaged changes even after replace with HEAD [message #1823170] |
Fri, 20 March 2020 13:49  |
Eclipse User |
|
|
|
I upgraded to 2020-03 a couple of days ago. Since then, I've seen a couple of cases of files that show up in the "Unstaged changes" list in the "Git Staging View", and when I look at the changes in the file, there are none. I then right-click on it and select "Replace with HEAD revision". This results in ... no change. The file still has no changes, and still says there are unstaged changes, even after replacing it with the HEAD revision. This is happening in two different repos in our projects.
|
|
| | | | | | | | | | | | | | | | | |
Re: After upgrade to 2020-03, egit sees unstaged changes even after replace with HEAD [message #1823374 is a reply to message #1823333] |
Wed, 25 March 2020 12:06   |
Eclipse User |
|
|
|
Thomas Wolf wrote on Wed, 25 March 2020 01:12Then double check the other files. Do they have CR-LF or LF in the committed version? The problem occurs only for executable files where the committed version in the git repository has CR-LF line endings. (Which, if everybody working on Windows has core.autocrlf = true set, should not occur.)
I just went to my Linux VM, and used that "cat-file" example you cited above. The result showed \r\n sequences. This appears to be the abnormal situation you said should not occur. I believe in this case, "should" means "probably should not happen when people are paying attention".
So, it seems like this situation is a combination of a few problems. Our configuration files, which have been mangled in the repository with execute bits they don't need, and the wrong line endings, and your code somehow has trouble dealing with that mess. :)
|
|
| | | | |
Re: After upgrade to 2020-03, egit sees unstaged changes even after replace with HEAD [message #1823961 is a reply to message #1823958] |
Sat, 04 April 2020 13:03   |
Eclipse User |
|
|
|
Thomas Wolf wrote on Sat, 04 April 2020 08:51And what are the crlf settings in git config and gitattributes? What are the line endings in the file system?
Does the problem persist in a fresh clone?
Does the problem persist if you re-build the index? (Delete it and run a git status on the command line afterwards.)
It would be really helpful if you could put together a small demo repo at Github with which one could reproduce your problems. Without this, we're poking around in the dark.
I'll answer what I can answer for now, and ask some qualifying questions.
The "System" tab in git configuration shows core.autocrlf = true. This is Windows 10, so standard line endings are \r\n.
Curiously, a fresh clone of the same repository, with the same branch checked out, does not show the symptom.
I don't know how to check "gitattributes". I don't know how to delete the index.
If I run "git status" on the command line, I'll need to be reminded how to run the same git that Eclipse is using. My default command line git is from Cygwin, which I believe might present different results.
|
|
| |
Re: After upgrade to 2020-03, egit sees unstaged changes even after replace with HEAD [message #1823963 is a reply to message #1823962] |
Sat, 04 April 2020 14:22   |
Eclipse User |
|
|
|
The process of deleting the index file and then doing a hard reset seemed to set it a good state, without the unexpected file in unstaged changes. When I first deleted the file from the shell, nothing happened until I tried doing a "fetch", and then it produced a surprising result, seeming to put every file in the repository in the unstaged changes list. That's when I did the hard reset, which cleaned everything up.
It's still curious that the changes in the nightly build fixed the problem immediately in one repository, but not the other.
So, I am now using the nightly build, which I did with "Install new software" and using the nightly update site. If I want to revert back to using the latest release for some reason, what do I have to do?
|
|
| | | |
Goto Forum:
Current Time: Sun Mar 23 14:25:49 EDT 2025
Powered by FUDForum. Page generated in 0.07608 seconds
|