Skip to content
Snippets Groups Projects
Commit 3f5e72e4 authored by Andreas Dilger's avatar Andreas Dilger Committed by Oleg Drokin
Browse files

LU-553 build: improve checks for commit-msg


Improve the checks done by the commit-msg script.  It now ensures
that all the parts of the commit message are present.
- validate that the Change-Id: generated from 'git hash-object' is
  not empty, since this can happen if git is unhappy with the options
- check for only one Change-Id: line (multiple Signed-off-by: OK)
- describe the "component:" field better, with some examples

If there was an error committing the message, save a copy to a
temporary file, so that it can be edited and re-used, instead of
having to recreate it each time, or fetch it from .git/COMMIT_MSG.

Add a simple regression test with good & bad commit messages, so
it is easier to verify that any changes made to the script will
continue to both detect errors, and pass valid commit messages.

Signed-off-by: default avatarAndreas Dilger <adilger@whamcloud.com>
Change-Id: I15cb3690560400a591598997424cf79dee3a039d
Reviewed-on: http://review.whamcloud.com/1688


Tested-by: Hudson
Tested-by: default avatarMaloo <whamcloud.maloo@gmail.com>
Reviewed-by: default avatarJohann Lombardi <johann@whamcloud.com>
Reviewed-by: default avatarMikhail Pershin <tappro@whamcloud.com>
parent e1929826
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment