Improve commit message validation & remove leading whitespace
commitacf737c3d105f533aa056eba3428c026504c3459
authorThomas Wolf <thomas.wolf@paranor.ch>
Tue, 15 Aug 2017 06:54:40 +0000 (15 08:54 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Mon, 21 Aug 2017 08:17:08 +0000 (21 10:17 +0200)
tree222ec199e999cbdf49bf5c643d052f7282f4b20b
parentd306c4a3c5a31cc80caca99c1d37cebdb44c8d24
Improve commit message validation & remove leading whitespace

Before committing, EGit checked whether the commit message was empty.
However, if a commit message only contained a Change-Id line, it was
considered not empty and would pass. Strengthen the check to consider
commit messages containing only footer lines to be empty.

Also remove leading whitespace (including leading empty lines) before
actually committing.

Change-Id: I6ad287c7bf105f6515f23be18f240047fbd99410
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.core/src/org/eclipse/egit/core/op/CommitOperation.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java