Also add comment explaining what the script does.
contrib/ChangeLog:
* gcc-changelog/git_email.py: Set exit status on error.
strict=strict)
+# With zero arguments, process every patch file in the ./patches directory.
+# With one argument, process the named patch file.
+# Patch files must be in 'git format-patch' format.
if __name__ == '__main__':
if len(sys.argv) == 1:
allfiles = []
if not email.lines:
print('Error: patch contains no parsed lines', file=sys.stderr)
email.print_errors()
+ sys.exit(1)