Top Description Fields Constructors Methods
org.eclipse.jgit.lib

public Class UserConfig

extends Object
Class Inheritance
Imports
org.eclipse.jgit.lib.Config.SectionParser, org.eclipse.jgit.util.SystemReader

The standard "user" configuration parameters.

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private String
private boolean
private boolean
private boolean
private boolean
public static final Config.SectionParser<UserConfig>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String

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.
getAuthorEmail
()

Get the author email as defined in git variables and configurations.

public String

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.
getAuthorName
()

Get the author name as defined in the git variables and configurations.

public String

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.
getCommitterEmail
()

Get the committer email as defined in git variables and configurations.

public String

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.
getCommitterName
()

Get the committer name as defined in the git variables and configurations.

private static String

Returns:

try to construct email for logged on user using system information
getDefaultEmail
()

private static String

Returns:

try to get user name of the logged on user from the operating system
getDefaultUserName
()

private static String
private static String
public boolean

Returns:

true if the author email was not explicitly configured but constructed from information the system has about the logged on user
isAuthorEmailImplicit
()

Whether the author email was not explicitly configured but constructed from information the system has about the logged on user

public boolean

Returns:

true if the author name was not explicitly configured but constructed from information the system has about the logged on user
isAuthorNameImplicit
()

Whether the author name was not explicitly configured but constructed from information the system has about the logged on user

public boolean

Returns:

true if the author email was not explicitly configured but constructed from information the system has about the logged on user
isCommitterEmailImplicit
()

Whether the author email was not explicitly configured but constructed from information the system has about the logged on user

public boolean

Returns:

true if the committer name was not explicitly configured but constructed from information the system has about the logged on user
isCommitterNameImplicit
()

Whether the committer name was not explicitly configured but constructed from information the system has about the logged on user

private static String
private static SystemReader
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authorEmailback to summary
private String authorEmail
authorNameback to summary
private String authorName
committerEmailback to summary
private String committerEmail
committerNameback to summary
private String committerName
isAuthorEmailImplicitback to summary
private boolean isAuthorEmailImplicit
isAuthorNameImplicitback to summary
private boolean isAuthorNameImplicit
isCommitterEmailImplicitback to summary
private boolean isCommitterEmailImplicit
isCommitterNameImplicitback to summary
private boolean isCommitterNameImplicit
KEYback to summary
public static final Config.SectionParser<UserConfig> KEY

Key for Config#get(SectionParser).

Constructor Detail

UserConfigback to summary
private UserConfig(Config rc)

Method Detail

getAuthorEmailback to summary
public String getAuthorEmail()

Get the author email as defined in git variables and configurations.

Returns:String

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.

getAuthorNameback to summary
public String getAuthorName()

Get the author name as defined in the git variables and configurations.

Returns:String

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.

getCommitterEmailback to summary
public String getCommitterEmail()

Get the committer email as defined in git variables and configurations.

Returns:String

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.

getCommitterNameback to summary
public String getCommitterName()

Get the committer name as defined in the git variables and configurations.

Returns:String

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.

getDefaultEmailback to summary
private static String getDefaultEmail()
Returns:String

try to construct email for logged on user using system information

getDefaultUserNameback to summary
private static String getDefaultUserName()
Returns:String

try to get user name of the logged on user from the operating system

getEmailInternalback to summary
private static String getEmailInternal(Config rc, String envKey)
getNameInternalback to summary
private static String getNameInternal(Config rc, String envKey)
isAuthorEmailImplicitback to summary
public boolean isAuthorEmailImplicit()

Whether the author email was not explicitly configured but constructed from information the system has about the logged on user

Returns:boolean

true if the author email was not explicitly configured but constructed from information the system has about the logged on user

isAuthorNameImplicitback to summary
public boolean isAuthorNameImplicit()

Whether the author name was not explicitly configured but constructed from information the system has about the logged on user

Returns:boolean

true if the author name was not explicitly configured but constructed from information the system has about the logged on user

isCommitterEmailImplicitback to summary
public boolean isCommitterEmailImplicit()

Whether the author email was not explicitly configured but constructed from information the system has about the logged on user

Returns:boolean

true if the author email was not explicitly configured but constructed from information the system has about the logged on user

isCommitterNameImplicitback to summary
public boolean isCommitterNameImplicit()

Whether the committer name was not explicitly configured but constructed from information the system has about the logged on user

Returns:boolean

true if the committer name was not explicitly configured but constructed from information the system has about the logged on user

stripInvalidCharactersback to summary
private static String stripInvalidCharacters(String s)
systemback to summary
private static SystemReader system()