org.eclipse.jgit.lib
Class RepositoryConfig
java.lang.Object
org.eclipse.jgit.lib.Config
org.eclipse.jgit.lib.FileBasedConfig
org.eclipse.jgit.lib.RepositoryConfig
public class RepositoryConfig
- extends FileBasedConfig
An object representing the Git config file.
This can be either the repository specific file or the user global
file depending on how it is instantiated.
|
Field Summary |
static java.lang.String |
BRANCH_SECTION
Section name for a branch configuration. |
|
Constructor Summary |
RepositoryConfig(Config base,
java.io.File cfgLocation)
Create a Git configuration file reader/writer/cache for a specific file. |
| Methods inherited from class org.eclipse.jgit.lib.Config |
clear, fromText, get, getBoolean, getBoolean, getInt, getInt, getLong, getString, getStringList, getSubsections, setBoolean, setInt, setLong, setString, setStringList, toText, uncache, unset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BRANCH_SECTION
public static final java.lang.String BRANCH_SECTION
- Section name for a branch configuration.
- See Also:
- Constant Field Values
RepositoryConfig
public RepositoryConfig(Config base,
java.io.File cfgLocation)
- Create a Git configuration file reader/writer/cache for a specific file.
- Parameters:
base - configuration that provides default values if this file does
not set/override a particular key. Often this is the user's
global configuration file, or the system level configuration.cfgLocation - path of the file to load (or save).
getCore
public CoreConfig getCore()
- Returns:
- Core configuration values
getTransfer
public TransferConfig getTransfer()
- Returns:
- transfer, fetch and receive configuration values
getUserConfig
public UserConfig getUserConfig()
- Returns:
- standard user configuration data
getAuthorName
public java.lang.String getAuthorName()
- Returns:
- the author name as defined in the git variables
and configurations. If no name could be found, try
to use the system user name instead.
getCommitterName
public java.lang.String getCommitterName()
- Returns:
- the committer name as defined in the git variables
and configurations. If no name could be found, try
to use the system user name instead.
getAuthorEmail
public java.lang.String getAuthorEmail()
- Returns:
- the author email as defined in git variables and
configurations. If no email could be found, try to
propose one default with the user name and the
host name.
getCommitterEmail
public java.lang.String getCommitterEmail()
- Returns:
- the committer email as defined in git variables and
configurations. If no email could be found, try to
propose one default with the user name and the
host name.