Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Git staging view falsely shows modified file
Git staging view falsely shows modified file [message #1780774] Fri, 26 January 2018 16:08 Go to next message
Eclipse UserFriend
Since a view days I experience the problem that it shows that a file was deleted which is not deleted. Even more git status on the command line it gives that there are no untracked changes. I even tried a git reset --hard and a newly cloning the repo into a new workspace. Any tips what I'm doing wrong here?
Re: Git staging view falsely shows modified file [message #1780801 is a reply to message #1780774] Sat, 27 January 2018 15:12 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

- which version of EGit are you using
- on which platform (OS, Java version) are you using it
- what is the exact path name of the file

Re: Git staging view falsely shows modified file [message #1780802 is a reply to message #1780801] Sat, 27 January 2018 15:13 Go to previous messageGo to next message
Eclipse UserFriend
I forgot: is the repo you are working on a public one? Can you share the url?
Re: Git staging view falsely shows modified file [message #1780805 is a reply to message #1780802] Sat, 27 January 2018 16:58 Go to previous messageGo to next message
Eclipse UserFriend
hi Chris,

oh sorry for not immediately providing that info:

* EGIT: 4.9.2.201712150930-r
* OS is Windows 10
* Java Oracle: java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
* Repo is public: http://git.eclipse.org/c/4diac/org.eclipse.4diac.ide.git
the problem happens in the development branch
* The repo-root relative file name is:
plugins\org.eclipse.fordiac.ide.model.edit\icons\full\ctool16\CreateDeviceType_attributedeclarations_AttributeDeclaration.gif

I just gave it a try in a Debian testing VM and there I could not reproduce the problem.

Cheers,
Alois



Re: Git staging view falsely shows modified file [message #1780852 is a reply to message #1780805] Mon, 29 January 2018 04:03 Go to previous messageGo to next message
Eclipse UserFriend
I am quite sure this has to do with you working on a filesystem which not case sensitive (see [1]). Git stores file pathes case sensitive (e.g. you may have a file src/a.txt and src/A.txt). If you checkout those content on windows (or MacOS) you have a problem because the fs doesn't support a.txt and A.txt existing in the same folder. I inspected your repo and saw the same issue:

> git clone https://git.eclipse.org/r/4diac/org.eclipse.4diac.ide
Cloning into 'org.eclipse.4diac.ide'...
remote: Counting objects: 3656, done
remote: Finding sources: 100% (73/73)
remote: Total 6854 (delta 0), reused 6854 (delta 0)
Receiving objects: 100% (6854/6854), 15.76 MiB | 521.00 KiB/s, done.
Resolving deltas: 100% (2356/2356), done.
> cd org.eclipse.4diac.ide/
> git checkout develop
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
Switched to a new branch 'develop'
> git ls-files --recurse-submodules |  grep -i createdevicetype_attr
plugins/org.eclipse.fordiac.ide.model.edit/icons/full/ctool16/CreateDeviceType_attributeDeclarations_AttributeDeclaration.gif
plugins/org.eclipse.fordiac.ide.model.edit/icons/full/ctool16/CreateDeviceType_attributedeclarations_AttributeDeclaration.gif
> 


You should fix your repo not to contain such cases. Make sure that developers on Windows,Mac have the git option core.ignorecase is set to true.
To repair the repo maybe tools from [2] may help. But I have no personal experience with them

[1] https://en.wikipedia.org/wiki/Comparison_of_file_systems
[2] https://www.google.de/search?q=git+check+repo+case+sensitive
Re: Git staging view falsely shows modified file [message #1780917 is a reply to message #1780852] Mon, 29 January 2018 18:20 Go to previous message
Eclipse UserFriend
Hi,

oh, thanks for pointing that out. As Linux was for the last 10 years my main development platform I would have never thought about that. I will set the attribute and then think about fixing the repo.

cheers,
Alois
Previous Topic:Ssh prompting unexpectedly depending on .ssh/config
Next Topic:Using gitlab flow with JGit
Goto Forum:
  


Current Time: Wed Jul 23 14:15:27 EDT 2025

Powered by FUDForum. Page generated in 0.05448 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top