diff options
author | Martin Liska <mliska@suse.cz> | 2021-08-17 14:57:40 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-08-18 10:36:35 +0200 |
commit | 0684c8d3effab2c9c1b29938f5e56c77106af564 (patch) | |
tree | abf1088f6a04e30c0d637a3eecccf019871fc1ca /contrib/git-commit-mklog.py | |
parent | 1bf976a5de69ecd9b1e10eb7515357b98e78faf7 (diff) | |
download | gcc-0684c8d3effab2c9c1b29938f5e56c77106af564.zip gcc-0684c8d3effab2c9c1b29938f5e56c77106af564.tar.gz gcc-0684c8d3effab2c9c1b29938f5e56c77106af564.tar.bz2 |
commit-mklog: Add --co argument.
The argument can be used for addition of Co-Authored-By lines
with --trailer='Co-Authored-By=Mona Lisa Octocat <mona@github.com>'.
contrib/ChangeLog:
* gcc-git-customization.sh: Wrap $@ in quotes.
* git-commit-mklog.py: Add new argument --co.
* mklog.py: Skip the Co-Authored-By lines.
Diffstat (limited to 'contrib/git-commit-mklog.py')
-rwxr-xr-x | contrib/git-commit-mklog.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/git-commit-mklog.py b/contrib/git-commit-mklog.py index 9c59fb9..eda3fc4 100755 --- a/contrib/git-commit-mklog.py +++ b/contrib/git-commit-mklog.py @@ -37,6 +37,8 @@ if __name__ == '__main__': help='Add the specified PRs (comma separated)') parser.add_argument('-p', '--fill-up-bug-titles', action='store_true', help='Download title of mentioned PRs') + parser.add_argument('--co', + help='Add Co-Authored-By trailer (comma separated)') args, unknown_args = parser.parse_known_args() myenv['GCC_FORCE_MKLOG'] = '1' @@ -49,5 +51,9 @@ if __name__ == '__main__': if mklog_args: myenv['GCC_MKLOG_ARGS'] = ' '.join(mklog_args) + if args.co: + for author in args.co.split(','): + unknown_args.append(f'--trailer "Co-Authored-By: {author}"') + commit_args = ' '.join(unknown_args) subprocess.run(f'git commit {commit_args}', shell=True, env=myenv) |