aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-12-07 18:13:36 -0800
committerShawn O. Pearce <spearce@spearce.org>2010-12-08 10:03:19 -0800
commit11fd0fe03ae471d1a6528070b4fee884b0ffea1d (patch)
tree7aaf70ec3c80c2ecb42d63071d749f9185f4a746 /org.eclipse.jgit.pgm/src
parentc181e1ab8ac52ff8ce02f95affc8f79cfbfff323 (diff)
downloadjgit-11fd0fe03ae471d1a6528070b4fee884b0ffea1d.tar.gz
jgit-11fd0fe03ae471d1a6528070b4fee884b0ffea1d.zip
Clarify WorkingTreeOptions and filemode usage
To improve runtime performance, caching the WorkingTreeOptions inside of the Config object using the Config.SectionParser API allows the WorkingTreeOptions to be accessed more efficiently whenever a FileTreeIterator is constructed for the Repository. Instead of passing the filemode handling option into isModified(), the WorkingTreeIterator should always honor whatever setting has been configured in this repository, as defined by its own copy of the WorkingTreeOptions. This simplifies all of the callers as they no longer need to lookup core.filemode on their own. A few locations were changed from always using a hardcoded "true" on the file mode to passing what is actually configured in the repository. This is a behavior change, but corrects what should be considered to be bugs as the core.filemode variable wasn't always being used. Change-Id: Idb176736fa0dc97af372f1d652a94ecc72fb457c Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
index 8d0b504c37..ca9710491c 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
@@ -97,7 +97,10 @@ public class AbstractTreeIteratorHandler extends
final String name = params.getParameter(0);
if (new File(name).isDirectory()) {
- setter.addValue(new FileTreeIterator(new File(name), FS.DETECTED, WorkingTreeOptions.createDefaultInstance()));
+ setter.addValue(new FileTreeIterator(
+ new File(name),
+ FS.DETECTED,
+ clp.getRepository().getConfig().get(WorkingTreeOptions.KEY)));
return 1;
}