Community
Participate
Working Groups
Build Identifier: 20110615-0604 EGit handles executable flags on files in Windows completely wrong. Committing a file with mode 755 (+x) causes a file with mode 644 (-x) to end up in the repository. If there is a file with mode 755 in the repository and on the disk, EGit will show that the file has changed. It seems to me that EGit incorrectly internally removes the executable flag for both comparison and commit, which breaks compatibility with other Git software like command line git. This is possibly related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=361570 I consider this a major pain as it requires manual work for every file added to an EGit project (chmod 644), which I do pretty much every day. Reproducible: Always Steps to Reproduce: 1. Create a new class in Eclipse in a Egit project. This automatically sets the executable bit on the file. 2. Commit the file using EGit. This commits the file with mode 644 to the repository. Expected would be a commit with the actual mode of the file. 3. "git diff" in Cygwin shows that the file has changed since the last commit (old mode 100644, new mode 100755). This is correct. EGit on the other hand shows that there are no changes. This is wrong. To make it even more interesting: 4. Commit the file using Cygwin git commit. This commits the file with mode 755. 5. EGit now shows the file has changed and there seems to be no way to resolve it in EGit (except committing again, as 644). "Replace with" -> "HEAD revision" or "File in Git Index" have no effect.
I think that my problem is related with this bug. On windows, every time I commit a file using EGIT, such a file loses its executable permission. This is an inconvenience when I'm dealing for example with .sh scripts which needs to be executed. Every time I have to change such files, I have to do the following: 1. Commit a file 2. Change the permission via command file (git update-index --chmod=+x "file") 3. Commit such a change in the Git Staging View. Eclipse Indigo SR1 Eclipse EGit 1.1.0.201109151100-r org.eclipse.egit.feature.group Eclipse EGit
I pushed a potential fix for this issue for review: http://egit.eclipse.org/r/#change,4828
Merged into master as commit c15c46e41e10283858c151a7ddf8451d1cd0cc6c
Still broken the same way in 1.3.0.201202151440-r