diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2022-11-19 16:53:54 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-10 12:07:06 +0000 |
commit | 839c1a574df18b82066de13f85c3cca208cf4f4f (patch) | |
tree | c90c6932aa3d2bf00335092deb9573075aeb9a93 /Meta/lint-commit.sh | |
parent | f93c7fbb5e13a53af13afbfbc66a875175fffa12 (diff) | |
download | serenity-839c1a574df18b82066de13f85c3cca208cf4f4f.zip |
CI: Add a check to report git merge commit
Diffstat (limited to 'Meta/lint-commit.sh')
-rwxr-xr-x | Meta/lint-commit.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Meta/lint-commit.sh b/Meta/lint-commit.sh index 5e04e11c64..878e87c8a4 100755 --- a/Meta/lint-commit.sh +++ b/Meta/lint-commit.sh @@ -34,6 +34,11 @@ while read -r line; do error "Empty line between commit title and body is missing" fi + merge_commit_pattern="^Merge branch" + if [[ $line_number -eq 1 ]] && (echo "$line" | grep -E -q "$merge_commit_pattern"); then + error "Commit is a git merge commit, use the rebase command instead" + fi + category_pattern='^(Revert "|\S+: )' if [[ $line_number -eq 1 ]] && (echo "$line" | grep -E -v -q "$category_pattern"); then error "Missing category in commit title (if this is a fix up of a previous commit, it should be squashed)" |