Rename Repository 'config' as 'repoConfig'

This better matches with the other configuration variable,
'userConfig', and helps to make it clear what config object
we are dealing with.

Change-Id: I2c585649aecc805e8e66db2f094828cd2649e549
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2010-06-24 18:18:46 -07:00
parent 6a822f0ebf
commit c9c57d34de
1 changed files with 8 additions and 8 deletions

View File

@ -110,7 +110,7 @@ public class Repository {
private final FileBasedConfig userConfig;
private final FileBasedConfig config;
private final FileBasedConfig repoConfig;
private final RefDatabase refs;
@ -244,10 +244,10 @@ public Repository(final File d, final File workTree, final File objectDir,
this.fs = fs;
userConfig = SystemReader.getInstance().openUserConfig(fs);
config = new FileBasedConfig(userConfig, fs.resolve(gitDir, "config"));
repoConfig = new FileBasedConfig(userConfig, fs.resolve(gitDir, "config"));
loadUserConfig();
loadConfig();
loadRepoConfig();
if (workDir == null) {
// if the working directory was not provided explicitly,
@ -317,9 +317,9 @@ private void loadUserConfig() throws IOException {
}
}
private void loadConfig() throws IOException {
private void loadRepoConfig() throws IOException {
try {
config.load();
repoConfig.load();
} catch (ConfigInvalidException e1) {
IOException e2 = new IOException(JGitText.get().unknownRepositoryFormat);
e2.initCause(e1);
@ -417,14 +417,14 @@ public FileBasedConfig getConfig() {
throw new RuntimeException(e);
}
}
if (config.isOutdated()) {
if (repoConfig.isOutdated()) {
try {
loadConfig();
loadRepoConfig();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return config;
return repoConfig;
}
/**