Package org.eclipse.jgit.lib
Class CommitConfig
java.lang.Object
org.eclipse.jgit.lib.CommitConfig
The standard "commit" configuration parameters.
- Since:
- 5.13
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Config.SectionParser<CommitConfig>Key forConfig.get(SectionParser). -
Method Summary
Modifier and TypeMethodDescriptionGet the encoding of the commit as defined in the giti18n.commitEncodingproperty.Get the content to the commit template as defined incommit.template.Get the path to the commit template as defined in the gitcommit.templateproperty.
-
Field Details
-
KEY
Key forConfig.get(SectionParser).
-
-
Method Details
-
getCommitTemplatePath
Get the path to the commit template as defined in the gitcommit.templateproperty.- Returns:
- the path to commit template or
nullif not present.
-
getCommitEncoding
Get the encoding of the commit as defined in the giti18n.commitEncodingproperty.- Returns:
- the encoding or
nullif not present.
-
getCommitTemplateContent
@Nullable public String getCommitTemplateContent() throws FileNotFoundException, IOException, ConfigInvalidExceptionGet the content to the commit template as defined incommit.template. If noi18n.commitEncodingis specified, UTF-8 fallback is used.- Returns:
- content of the commit template or
nullif not present. - Throws:
IOException- if the template file can not be readFileNotFoundException- if the template file does not existsConfigInvalidException- if acommitEncodingis specified and is invalid
-