@ -48,6 +48,7 @@ import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Config.SectionParser ;
import org.eclipse.jgit.lib.Config.SectionParser ;
import org.eclipse.jgit.lib.CoreConfig.AutoCRLF ;
import org.eclipse.jgit.lib.CoreConfig.AutoCRLF ;
import org.eclipse.jgit.lib.CoreConfig.CheckStat ;
import org.eclipse.jgit.lib.CoreConfig.CheckStat ;
import org.eclipse.jgit.lib.CoreConfig.HideDotFiles ;
import org.eclipse.jgit.lib.CoreConfig.SymLinks ;
import org.eclipse.jgit.lib.CoreConfig.SymLinks ;
/** Options used by the {@link WorkingTreeIterator}. */
/** Options used by the {@link WorkingTreeIterator}. */
@ -67,6 +68,8 @@ public class WorkingTreeOptions {
private final SymLinks symlinks ;
private final SymLinks symlinks ;
private final HideDotFiles hideDotFiles ;
private WorkingTreeOptions ( final Config rc ) {
private WorkingTreeOptions ( final Config rc ) {
fileMode = rc . getBoolean ( ConfigConstants . CONFIG_CORE_SECTION ,
fileMode = rc . getBoolean ( ConfigConstants . CONFIG_CORE_SECTION ,
ConfigConstants . CONFIG_KEY_FILEMODE , true ) ;
ConfigConstants . CONFIG_KEY_FILEMODE , true ) ;
@ -76,6 +79,9 @@ public class WorkingTreeOptions {
ConfigConstants . CONFIG_KEY_CHECKSTAT , CheckStat . DEFAULT ) ;
ConfigConstants . CONFIG_KEY_CHECKSTAT , CheckStat . DEFAULT ) ;
symlinks = rc . getEnum ( ConfigConstants . CONFIG_CORE_SECTION , null ,
symlinks = rc . getEnum ( ConfigConstants . CONFIG_CORE_SECTION , null ,
ConfigConstants . CONFIG_KEY_SYMLINKS , SymLinks . TRUE ) ;
ConfigConstants . CONFIG_KEY_SYMLINKS , SymLinks . TRUE ) ;
hideDotFiles = rc . getEnum ( ConfigConstants . CONFIG_CORE_SECTION , null ,
ConfigConstants . CONFIG_KEY_HIDEDOTFILES ,
HideDotFiles . DOTGITONLY ) ;
}
}
/** @return true if the execute bit on working files should be trusted. */
/** @return true if the execute bit on working files should be trusted. */
@ -103,4 +109,12 @@ public class WorkingTreeOptions {
public SymLinks getSymLinks ( ) {
public SymLinks getSymLinks ( ) {
return symlinks ;
return symlinks ;
}
}
/ * *
* @return how we create '.' - files ( on Windows )
* @since 3 . 5
* /
public HideDotFiles getHideDotFiles ( ) {
return hideDotFiles ;
}
}
}