aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
diff options
context:
space:
mode:
authorKevin Sawicki <kevin@github.com>2012-01-03 15:07:02 -0800
committerKevin Sawicki <kevin@github.com>2012-01-03 15:07:02 -0800
commitc15c46e41e10283858c151a7ddf8451d1cd0cc6c (patch)
tree82cf987f52309bca742d4d09811ab331a2ac9eca /org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
parentd57c00e03696571afd92baf76cce03275b158bef (diff)
downloadjgit-c15c46e41e10283858c151a7ddf8451d1cd0cc6c.tar.gz
jgit-c15c46e41e10283858c151a7ddf8451d1cd0cc6c.zip
Retain executable mode of existing files on Windows
Currently files in a repository marked as executable will have that mode unset when modified and committed on systems that do not support detection of this mode since the working tree iterator will never report this mode for any entries. This change updates WorkingTreeIterator to be able to determine the target file mode to be used for the index through consideration of the configured WorkingTreeOptions. Bug: 364956 Change-Id: Iae496baa011b8a59d9329ec73615482b03d34a5a
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
index 7e670304d9..f3e47ae011 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
@@ -171,7 +171,7 @@ public class AddCommand extends GitCommand<DirCache> {
DirCacheEntry entry = new DirCacheEntry(path);
if (c == null || c.getDirCacheEntry() == null
|| !c.getDirCacheEntry().isAssumeValid()) {
- FileMode mode = f.getEntryFileMode();
+ FileMode mode = f.getIndexFileMode(c);
entry.setFileMode(mode);
if (FileMode.GITLINK != mode) {