Package org.eclipse.jgit.lib
Class UserConfig
java.lang.Object
org.eclipse.jgit.lib.UserConfig
The standard "user" configuration parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private String
private String
private String
private boolean
private boolean
private boolean
private boolean
static final Config.SectionParser
<UserConfig> Key forConfig.get(SectionParser)
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the author email as defined in git variables and configurations.Get the author name as defined in the git variables and configurations.Get the committer email as defined in git variables and configurations.Get the committer name as defined in the git variables and configurations.private static String
private static String
private static String
getEmailInternal
(Config rc, String envKey) private static String
getNameInternal
(Config rc, String envKey) boolean
Whether the author email was not explicitly configured but constructed from information the system has about the logged on userboolean
Whether the author name was not explicitly configured but constructed from information the system has about the logged on userboolean
Whether the author email was not explicitly configured but constructed from information the system has about the logged on userboolean
Whether the committer name was not explicitly configured but constructed from information the system has about the logged on userprivate static String
private static SystemReader
system()
-
Field Details
-
KEY
Key forConfig.get(SectionParser)
. -
authorName
-
authorEmail
-
committerName
-
committerEmail
-
isAuthorNameImplicit
private boolean isAuthorNameImplicit -
isAuthorEmailImplicit
private boolean isAuthorEmailImplicit -
isCommitterNameImplicit
private boolean isCommitterNameImplicit -
isCommitterEmailImplicit
private boolean isCommitterEmailImplicit
-
-
Constructor Details
-
UserConfig
-
-
Method Details
-
getAuthorName
Get the author name as defined in the git variables and configurations.- 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
Get the committer name as defined in the git variables and configurations.- 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
Get the author email as defined in git variables and configurations.- 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
Get the committer email as defined in git variables and configurations.- 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.
-
isAuthorNameImplicit
public boolean isAuthorNameImplicit()Whether the author name was not explicitly configured but constructed from information the system has about the logged on user- Returns:
- true if the author name was not explicitly configured but constructed from information the system has about the logged on user
-
isAuthorEmailImplicit
public boolean isAuthorEmailImplicit()Whether the author email was not explicitly configured but constructed from information the system has about the logged on user- Returns:
- true if the author email was not explicitly configured but constructed from information the system has about the logged on user
-
isCommitterNameImplicit
public boolean isCommitterNameImplicit()Whether the committer name was not explicitly configured but constructed from information the system has about the logged on user- Returns:
- true if the committer name was not explicitly configured but constructed from information the system has about the logged on user
-
isCommitterEmailImplicit
public boolean isCommitterEmailImplicit()Whether the author email was not explicitly configured but constructed from information the system has about the logged on user- Returns:
- true if the author email was not explicitly configured but constructed from information the system has about the logged on user
-
getNameInternal
-
getDefaultUserName
- Returns:
- try to get user name of the logged on user from the operating system
-
getEmailInternal
-
stripInvalidCharacters
-
getDefaultEmail
- Returns:
- try to construct email for logged on user using system information
-
system
-