Fixed a problem when committing mode changes

When HEAD and index contained a regular file (a file with the
executable bit not set) and in the working tree the associated
file was modified to be an executable file then EGit had a bug
while committing this mode change. In EGits commit operation
the index was updated and the tree for the commit got prepared.
The index was updated correctly but the tree to be commited
always contained a regular file. After the Commit operation
we had different entries for this file in index and HEAD.

This commit fixes this by explicitly checking for executable-bit
in the associated index-entry and setting the new TreeEntry
accordingly.

Bug: 307560
Change-Id: Id7f4a87326d32a7c4cdaa199005ee452178f2e7a
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
1 file changed