blob: 8ed8f6d10f13672bcbb73d125101d02c6d7b78e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*
* Copyright (C) 2010, Google Inc. and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* https://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.eclipse.jgit.internal.storage.file;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.Config.SectionParser;
import org.eclipse.jgit.lib.CoreConfig;
class WriteConfig {
/** Key for {@link Config#get(SectionParser)}. */
static final Config.SectionParser<WriteConfig> KEY = WriteConfig::new;
private final int compression;
private final boolean fsyncObjectFiles;
private final boolean fsyncRefFiles;
private WriteConfig(Config rc) {
compression = rc.get(CoreConfig.KEY).getCompression();
fsyncObjectFiles = rc.getBoolean("core", "fsyncobjectfiles", false); //$NON-NLS-1$ //$NON-NLS-2$
fsyncRefFiles = rc.getBoolean("core", "fsyncreffiles", false); //$NON-NLS-1$ //$NON-NLS-2$
}
int getCompression() {
return compression;
}
boolean getFSyncObjectFiles() {
return fsyncObjectFiles;
}
boolean getFSyncRefFiles() {
return fsyncRefFiles;
}
}
|