Add core.filemode to CoreConfig
Let CoreConfig cache the value of core.filemode so clients like EGit can take advantage of it. Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
This commit is contained in:
parent
da1ea27fa2
commit
2054c3fb8a
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2010, Chris Aniszczyk <caniszczyk@gmail.com>
|
||||
* Copyright (C) 2009, Christian Halstrick <christian.halstrick@sap.com>
|
||||
* Copyright (C) 2009, Google Inc.
|
||||
* Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
|
||||
|
@ -79,12 +80,15 @@ public static enum AutoCRLF {
|
|||
|
||||
private final boolean logAllRefUpdates;
|
||||
|
||||
private final boolean fileMode;
|
||||
|
||||
private final AutoCRLF autoCRLF;
|
||||
|
||||
private CoreConfig(final Config rc) {
|
||||
compression = rc.getInt("core", "compression", DEFAULT_COMPRESSION);
|
||||
packIndexVersion = rc.getInt("pack", "indexversion", 2);
|
||||
logAllRefUpdates = rc.getBoolean("core", "logallrefupdates", true);
|
||||
fileMode = rc.getBoolean("core", "filemode", true);
|
||||
autoCRLF = rc.getEnum("core", null, "autocrlf", AutoCRLF.FALSE);
|
||||
}
|
||||
|
||||
|
@ -110,6 +114,13 @@ public boolean isLogAllRefUpdates() {
|
|||
return logAllRefUpdates;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return whether to trust file modes
|
||||
*/
|
||||
public boolean isFileMode() {
|
||||
return fileMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return whether automatic CRLF conversion has been configured
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue