Class CommitConfig

java.lang.Object
org.eclipse.jgit.lib.CommitConfig

public class CommitConfig extends Object
The standard "commit" configuration parameters.
Since:
5.13
  • Field Details

  • Method Details

    • getCommitTemplatePath

      @Nullable public String getCommitTemplatePath()
      Get the path to the commit template as defined in the git commit.template property.
      Returns:
      the path to commit template or null if not present.
    • getCommitEncoding

      @Nullable public String getCommitEncoding()
      Get the encoding of the commit as defined in the git i18n.commitEncoding property.
      Returns:
      the encoding or null if not present.
    • getCommitTemplateContent

      @Nullable public String getCommitTemplateContent() throws FileNotFoundException, IOException, ConfigInvalidException
      Get the content to the commit template as defined in commit.template. If no i18n.commitEncoding is specified, UTF-8 fallback is used.
      Returns:
      content of the commit template or null if not present.
      Throws:
      IOException - if the template file can not be read
      FileNotFoundException - if the template file does not exists
      ConfigInvalidException - if a commitEncoding is specified and is invalid