python,tests,misc: Remove Gerrit-ID insertion from pre-commit

Change-Id: I4db06415c9d0bbba7a6db56d7e9febf6491003bf
This commit is contained in:
Bobby R. Bruce
2024-06-21 05:11:21 -07:00
parent 1512eddd43
commit 3429da7787
3 changed files with 14 additions and 213 deletions

View File

@@ -142,18 +142,19 @@ if len(commit_header) > max_header_size:
+ ")"
)
# Then there must be at least one empty line between the commit header and
# the commit description
if commit_message_lines[1] != "":
_printErrorQuit(
"Please add an empty line between the commit title and "
"its description"
)
if len(commit_message_lines) > 1:
# Then there must be at least one empty line between the commit header and
# the commit description
if commit_message_lines[1] != "":
_printErrorQuit(
"Please add an empty line between the commit title and "
"its description"
)
# Encourage providing descriptions
if re.search(
"^(Signed-off-by|Change-Id|Reviewed-by):", commit_message_lines[2]
):
print("Warning: Commit does not have a description")
# Encourage providing descriptions
if re.search(
"^(Signed-off-by|Change-Id|Reviewed-by):", commit_message_lines[2]
):
print("Warning: Commit does not have a description")
sys.exit(0)