From 3bf96dd04bc9bcd59765e9f448473868aa493bb7 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sun, 13 Jun 2010 03:16:32 +0200 Subject: [PATCH] Cache filemode in GitIndex Apparently this was the intention, but never happened Signed-off-by: Robin Rosenberg --- org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java index d5cab0e4c..5da33fd6b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java @@ -353,7 +353,8 @@ public class GitIndex { if (filemode != null) return filemode.booleanValue(); RepositoryConfig config = db.getConfig(); - return config.getBoolean("core", null, "filemode", true); + filemode = Boolean.valueOf(config.getBoolean("core", null, "filemode", true)); + return filemode.booleanValue(); } /** An index entry */