1

EGit has the option add Signed-off-by message to any commit. For a project I am crontibuting, it is required to have an extended Signed-off-by message. They require to have the github handle added.

Signed-off-by: Joe Smith <joe.smith@email.com> (github: github_handle)

How can I change the default message?

Christian Rockrohr
  • 1,045
  • 1
  • 14
  • 29

2 Answers2

0

This doesn't seem to be supported yet by egit.

org.eclipse.egit.ui.internal.commit.CommitEditorPage.java#L90 shows a fixed template (hard-coded):

private static final String SIGNED_OFF_BY = "Signed-off-by: {0} <{1}>"; //$NON-NLS-1$

private String getSignedOffByLine(PersonIdent person) {
    return MessageFormat.format(SIGNED_OFF_BY, person.getName(),
            person.getEmailAddress());
}
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

You have to edit the source of Egit/Jgit and tweak the pre-commit message.

Pre-commit hooks were not supported in Egit see Egit hooks do not get triggered and this

But you can achieve this by plane/raw git. Refer this post How to add Git's branch name to the commit message?

Community
  • 1
  • 1
Chandrayya G K
  • 8,719
  • 5
  • 40
  • 68