org.eclipse.jgit.lib
Class RepositoryConfig

java.lang.Object
  extended by org.eclipse.jgit.lib.Config
      extended by org.eclipse.jgit.lib.FileBasedConfig
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jgit.lib.Config
Config.SectionParser<T>
 
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.
 
Method Summary
 java.lang.String getAuthorEmail()
           
 java.lang.String getAuthorName()
           
 java.lang.String getCommitterEmail()
           
 java.lang.String getCommitterName()
           
 CoreConfig getCore()
           
 TransferConfig getTransfer()
           
 UserConfig getUserConfig()
           
 
Methods inherited from class org.eclipse.jgit.lib.FileBasedConfig
getFile, load, save, toString
 
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
 

Field Detail

BRANCH_SECTION

public static final java.lang.String BRANCH_SECTION
Section name for a branch configuration.

See Also:
Constant Field Values
Constructor Detail

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).
Method Detail

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.