示例#1
0
 public CoreConfig(RepositoryConfig repoConfig)
 {
     this.Compression = repoConfig.GetInt("core", "compression", Constants.DefaultCompression);
     this.PackIndexVersion = repoConfig.GetInt("pack", "indexversion", 0);
 }
示例#2
0
 /**
  * Update properties by setting fields from the configuration.
  * <p>
  * If a property is not defined in the configuration, then it is left
  * unmodified.
  *
  * @param rc configuration to read properties from.
  */
 public void fromConfig( RepositoryConfig rc)
 {
     setPackedGitOpenFiles(rc.GetInt("core", null, "packedgitopenfiles", getPackedGitOpenFiles()));
     setPackedGitLimit(rc.GetInt("core", null, "packedgitlimit", getPackedGitLimit()));
     setPackedGitWindowSize(rc.GetInt("core", null, "packedgitwindowsize", getPackedGitWindowSize()));
     setPackedGitMMAP(rc.GetBoolean("core", null, "packedgitmmap", isPackedGitMMAP()));
     setDeltaBaseCacheLimit(rc.GetInt("core", null, "deltabasecachelimit", getDeltaBaseCacheLimit()));
 }